How it works · 36 of 37 Core
What are AI guardrails?
Bumpers around the model
Guardrails: Checks around the model (input filters, output filters, action limits) that catch what the model itself might let through.
Loading the animation…
Say it like this Guardrails are checks around the model, on what goes in, what comes out and what it may do, so the model alone isn't the last line of defence.
Under the hood — for builders
- Where the checks sit
- Guardrails wrap the model on three sides: what goes in, what comes out, and what it's allowed to do. Each check can be a simple rule or another, smaller model.
- A model that checks a model
- Llama Guard is a 7-billion-number model trained only to label a request or an answer as safe or unsafe against a list of harm categories you can edit. The same guard runs on both sides of the main model.
- Even strong guards cost something
- Anthropic's Constitutional Classifiers held up through more than 3,000 hours of paid attempts to break them, at the price of a few more refusals and extra compute.
- Rules still earn their place
- Not every check needs a model: a plain pattern that spots a 16-digit card number and masks it is cheap, fast and never talked out of it.
- Too tight is a failure too
- A guard that blocks too much refuses honest customers; teams tune it on real traffic and watch both the gutter balls and the wrongly blocked ones.
- Sources
- Inan et al., Llama Guard, arXiv 2312.06674 · Sharma et al., Constitutional Classifiers, arXiv 2501.18837.
What happens in the guardrails animation, step by step?
- A model with no guardrails. A normal question rolls straight down the lane to a good answer.
- A trick request rolls in. Nothing stops it, the model is talked into it, and another customer's address ends up in the gutter.
- Sometimes the request is fine and the answer is the problem: this one prints your full card number.
- Your turn: switch the bumpers on, then tap a ball to bowl it.
- Bumpers up: an input check before the model, an output check after it. The trick is stopped, the card number masked, and normal questions roll through.
What everyday example explains guardrails?
Bumpers at a bowling lane.
Why should a team care about guardrails?
How companies make models safe enough to ship.