Guardrails

가드레일

Place checks and limits around a model to handle disallowed inputs and outputs.

···
html
<div class="scene"><div class="heading">TWO CHECKPOINTS</div><div class="gates"><div id="input">입력 검사</div><span>→</span><div id="model">모델</div><span>→</span><div id="output">출력 검사</div></div><div class="status" id="gate-status">요청 검사 중</div></div>
css
.scene{width:min(94vw,800px);height:min(88vh,326px);padding:clamp(10px,2.7vmin,19px);border:1px solid var(--line);border-radius:13px;background:var(--surface);font:500 clamp(13px,2.4vmin,17px)/1.3 var(--font-sans,sans-serif);position:relative;overflow:hidden}.scene .mono{font-family:ui-monospace,SFMono-Regular,monospace}.scene .muted{color:var(--muted)}.scene .accent{color:var(--accent)}.scene .heading{font-weight:750;color:var(--accent);margin-bottom:clamp(5px,1.6vmin,12px)}.gates{display:flex;align-items:center;justify-content:space-between;gap:4px;height:64%}.gates div{width:29%;height:65%;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;text-align:center;background:var(--bg);transition:.3s}.gates div.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 17%,var(--surface));color:var(--accent)}.gates span{color:var(--accent)}.status{padding:7px;border-left:3px solid var(--accent);background:var(--bg)}
js
const ids=['input','model','output'],notes=['요청 검사 중','허용된 요청 생성 중','응답 형식 확인 중'];let i=0;function draw(){ids.forEach((id,n)=>document.getElementById(id).classList.toggle('active',n===i));document.getElementById('gate-status').textContent=notes[i];i=(i+1)%3}draw();setInterval(draw,800)

Guardrails are controls at model boundaries, such as input checks, tool permissions, and output validation. They can be placed before generation, around tools, and after output.

The demo follows a request through input and output gates. Checks can miss or falsely flag content, so sensitive actions still need separate authorization boundaries.

When to use

Use them when a model calls tools or must return results within defined constraints.

Open as page ↗