AI & LLMs

Guardrails

The checks around a model that catch bad inputs and outputs — policy enforced outside the weights.

Guardrails are the programmatic layer wrapped around an LLM: input filters (injection, abuse, PII), output validators (schema, toxicity, groundedness), and action gates (approval before dangerous tool calls). The principle: never rely on the model to police itself — enforce policy in code you control, because the model is exactly the thing an attacker is trying to steer.

Worked example: guardrails are input/output filters around the model — blocking disallowed requests, redacting PII, checking outputs for unsafe content — a layer independent of the model’s own training. Gotcha: they are defense in depth, not a guarantee; too-aggressive filters cause false refusals, and a determined jailbreak can slip past a single filter, so layer them.