What Are AI Guardrails? The Layers That Matter
Guardrails are not a single filter you bolt on. They are layers, and most of them live outside the model. A prompt that says "be careful" is not a guardrail.
- Published
The five layers
| Layer | What it does | Example |
|---|---|---|
| Input | Screens what comes in | Detect prompt injection, strip secrets, block off-topic abuse |
| Permissions | Limits what the agent can do | Read-only tools by default; scoped API keys |
| Approvals | Puts a human on risky actions | Refunds above a threshold need sign-off |
| Output | Checks what goes out | Schema validation, PII redaction, policy checks |
| Monitoring | Catches what slipped through | Alerts on unusual actions, sampled human review |
Put guardrails in code, not prompts
Instructions in a prompt are suggestions the model usually follows. Permissions in code are rules it cannot break. If an action must never happen — deleting records, paying out above a limit — enforce it in the tool layer where the model has no say.
Balancing safety and usefulness
Over-strict guardrails produce an assistant that refuses everything and gets abandoned. The goal is proportionate control: light touch on low-risk answers, hard stops on irreversible actions. We tune thresholds using evals that include both attacks and normal questions.
Frequently asked questions
Do guardrails slow the system down?
Well-designed checks add little latency. Heavy checks can run only on risky actions.
Can a model be fully jailbreak-proof?
No model is. That is why permissions and approvals, which do not depend on the model, carry the real weight.
Are guardrails needed for internal tools?
Yes — internal tools often have more powerful access. Scope permissions to the user’s own rights.