Guardrails are the safety layer around an AI model. They check what goes in, limit what the model can do, and review what comes out, so a helpful but over-confident assistant can't leak private data, call the wrong tool or make a mess before anyone notices.
Why a good model still needs guardrails
A language model is very helpful and very fast, and also occasionally too confident. It predicts likely text, so it can be talked into things, misread a request or state something false with total certainty. On its own in a chat window, that is an annoyance. Connected to your customers, your files and your tools, it is a risk.
Without guardrails, an assistant might:
- Leak private data, such as another customer's address that was in its context.
- Call the wrong tool, like deleting a record when it meant to read one.
- Make promises it can't keep, such as a refund nobody approved.
Guardrails don't make the model perfect. They keep it inside safe boundaries, at three points: before, during and after it works.
Input guardrails: check what goes in
Input guardrails inspect a prompt before the AI sees it, and block what shouldn't get through:
- Prompt injection: text that tries to override the assistant's instructions, such as 'ignore your previous instructions'. It can come from the user, or hide inside a web page or document the assistant reads.
- Jailbreak tricks: role-play or wording designed to talk the model out of its rules.
- Off-limits requests: topics the product shouldn't touch at all.
The hidden kind of injection is the harder case: the user is innocent, but an email or web page the assistant reads contains instructions. So input checks should cover everything that enters the model's context, not just what the user types.
Wondering how this was made? How we make these