LLM guardrails
Guardrails are automated checks placed around a large language model (LLM) application to keep its inputs, outputs and actions within set rules. They run outside the model, so they still work when the model is wrong or has been manipulated. A guardrail can block, rewrite, mask or send a request for human approval.
How it works
Input guardrails screen prompts for prompt injection, banned topics and personal data.
Output guardrails validate the format, mask secrets and catch unsupported claims.
Action guardrails limit which tools an agent may call, and require approval for writes.
For example, an output check can match AWS access key IDs, which are 20 characters starting with AKIA, and replace them with [REDACTED] before a response leaves the service.
Why it matters in production
Models are probabilistic, so a rule written in the prompt is a request, not a control. Guardrails enforce the rule in code you can test and log. Each check adds latency and can block good answers, so teams measure false positives the same way they measure errors.
See also
On the One2N blog
Further reading
