The short version
- An instruction in the prompt, such as “do not discuss pricing”, is a request. The model follows it most of the time, and that is not enough.
- Real safety has six layers: user permissions, input checks, instructions, output checks, limits on actions and human review.
- Match the layers to the risk, and test them by trying to break the system before launch.
The problem
The most common guardrail I see in enterprise AI is a sentence in the system prompt. “Do not discuss pricing.” “Never reveal confidential information.” “Always be professional.”
That sentence is a request, not a control. Models follow instructions most of the time, which is exactly the problem. Most of the time is not good enough for security.
Real guardrails are layered into the architecture, so that no single failure leads to harm.

The six layers
1. Identity and permissions. The system acts with the permissions of the person using it, never more. If a user cannot open a document in the source system, the assistant must not retrieve it. If a user cannot approve a discount, the agent cannot either. Most data leakage risks are solved here, before a model is involved.
The AI should only see and do what the person using it is allowed to see and do.
2. Input checks. Before a request reaches the model: detect and mask personal or confidential data that should not be sent, reject off-topic or malformed requests, and screen for prompt injection, including instructions hidden in retrieved documents and emails. Untrusted content must be treated as data, never as instructions.
Check what goes in. Remove private data, and block hidden instructions that try to trick the AI. This trick is called prompt injection.
3. Model instructions. The system prompt still matters. It sets scope, tone and behavior for the common case. It is the layer that handles most traffic well and none of the adversarial traffic reliably.
4. Output checks. Before anything reaches the user or a downstream system: validate structure against a schema, check that claims are supported by the retrieved sources, screen for harmful or off-policy content, and confirm the response actually answers the question. When a check fails, retry with feedback, fall back to a safe response or route to a person.
Check what comes out before anyone sees it or any system acts on it.
5. Action limits. For systems that act, the tools themselves carry limits. An agent may draft a quote but not send it. It may recommend a price inside an approved band but not outside it. It may update a record but not delete one. Limits live in the tool, not in the prompt, so no clever input can talk the model past them.
Put the limits in the tools the AI uses, not in its instructions. If the tool cannot send a quote, no clever wording can make the AI send one.
6. Human review. For consequential actions, a person approves. The design goal is to make review fast and focused: show the person what the system proposes, the evidence behind it and what it is uncertain about.
Match the layers to the risk
Not every system needs all six at full strength. An internal summarization assistant needs strong identity controls and modest output checks. An agent that changes prices or commits inventory needs every layer, with tight action limits and human approval.
I classify each use case by the cost of a wrong output and the reversibility of any action, then set the guardrail profile from that classification. It keeps controls proportionate, and it stops teams from either over-engineering a low-risk tool or under-protecting a high-risk one.
Test the safety layers
Guardrails need their own evaluation. Before launch, run a red-team exercise: people deliberately trying to make the system leak data, exceed its authority, follow injected instructions or produce off-policy content. Keep every successful attack as a permanent test case.
A red-team exercise is a planned attempt to break your own system, so you find the weak points before someone else does.
Then monitor in production. Track how often each guardrail fires, which inputs trigger it and whether blocked responses were correct blocks or false alarms. A guardrail that never fires may be working, or may be broken. You need the data to know which.
What leaders should ask
Executives are often asked to approve AI systems on the strength of a demo. The better question is how the system fails. Ask the team to show you what happens when someone tries to misuse it, when the data is missing and when the model is wrong. A good team will have the answer ready, because they built the layers to handle exactly those moments.
The rule
If the only thing stopping a harmful action is a sentence in the prompt, there is no guardrail.
Which of your AI systems relies on a prompt instruction as its only control?
The terms, in plain language
| Term | What it means |
|---|---|
| Guardrail | A control that stops an AI system from doing harm |
| System prompt | The standing instructions given to the model |
| Prompt injection | Hidden text that tries to trick the AI into ignoring its instructions |
| Schema | The required structure of an output, such as the fields in a form |
| Red team | People who try to break a system on purpose to find weak points |
| Fallback | The safe response used when a check fails |




