AI engineering · 33 of 42

Guardrails

Checks on the way in and on the way out

Scroll

Checks on the way in and on the way out

Guardrails are the checks around the model rather than the instructions inside it. On the way in: prompt shape, unexpected content, credentials and personal data that should not be there. On the way out: claims that should carry a citation, policy, tone, anything the response should not contain.

The failure path matters as much as the check. Something has to happen when one trips — block, degrade, or hand to a human — and that decision belongs in the design.

Concept 19 named the attack; this is the part that has to hold. It is code you own and can test, which is precisely what makes it different from a paragraph in a system prompt asking the model to behave.

Security
CHECKS ON THE WAY IN AND ON THE WAY OUT request input checks the model output checks response · prompt shape · PII, secrets · claims cited? · policy, tone blocked, or handed to a human Concept 19 named the attack. This is the part that has to hold, and it is code around the model rather than instructions inside it.
A request passing through input checks, the model, and output checks, with failures diverted.