Part 11 of 13 · 1 min read
Quick notes
- Guardrails are checks around the model, enforced in code, at three checkpoints: input, tool call and output. When a check fails, block or re-ask the model.
- Strict argument validation is cheap and effective against malformed input. A strict schema rejected every hostile refund argument in the example and still passed the legitimate calls, in microseconds.
- Syntax is not authorisation. A refund of someone else's order can be perfectly valid by schema; only semantic checks with business state catch it. Combine schema, semantic checks and grants.
- Output guards catch known exfiltration shapes and miss the rest: every plain attempt was flagged, none of the evasions were.
- Count layers that fail for different reasons, and fail closed. Three similar pattern matchers share a blind spot; a schema, a policy and a sandbox do not. Failing closed costs some blocked good traffic, so measure it.