What is a Guardrail?
AI guardrails, told as a story about fences put before and after the parrot to check the beans coming in and going out.
One line in a note, and the parrot says what it must not.Hidden in the note, in tiny letters: forget all rules. The parrot read that too, and continued from it.
The parrot continues whatever it reads — it cannot draw its own line.Commands, requests, tricks — to the parrot they are all the same beans. Sorting good beans from bad has to happen outside the parrot.
A guardrail is a fence before and after the parrot — beans in, beans out, and what it may do.The fence does not change the parrot. It checks beans outside the parrot, and decides which tools the parrot may use.
Two fences, each looks once. Caught beans are pulled aside.On the way in it catches hidden commands; on the way out, private details or bad words. Caught beans are dropped or shown to a person.
A fence filters words, not meaning. So you layer them, and a person checks the end.Say it sideways and it slips through. So, like defense in depth in the security world, you build several layers, and at the end a person stamps. The hidden command lives in the parrot the thief raised; the parrot that runs errands by itself is the agent.
Guardrail = a fence before and after the parrot. It checks beans in and beans out outside the parrot and fixes what it may do. Fences filter words, not meaning — so layer them, with a person at the end.
A safety layer placed outside the model in an LLM application: input filters (prompt-injection and banned-topic detection), output filters (PII, harmful content, format checks), and an allow-list of actions (tool and permission limits). Rule-based filters and classifier models are combined, layered to resist bypass, and ambiguous cases are escalated to a human.
When grown-ups say it
- Guardrail
- The fence before and after the parrot. It does not fix the parrot — it checks the beans outside it.
- Input · output filter
- Once in, once out. In: hidden commands. Out: secrets and bad words.
- Content classifier
- A small bird that tags beans good or bad. Another small parrot working inside the fence.
- Allowed actions
- The list of what the parrot may do. search ✓ summarize ✓ pay × delete ×. → the toolbox
- Prompt injection
- A command hidden in the note. The first thing the input fence tries to catch. → the parrot the thief raised
- Red team
- Trying to hop the fence on purpose. Sideways asks, other languages, long notes — try them all. → the security world's red team
- Least privilege
- Only the keys it needs. No payment key in the parrot's toolbox. → the security world's key story
- Human review
- Past the fence, a person. Ambiguous or hard-to-undo jobs get a human stamp. → a person at the end