Definition
Guardrails
Checks around a language model that keep inputs and outputs within safe, allowed and useful bounds.
Guardrails include input filtering, topic restrictions, output validation, moderation, refusal rules and escalation paths. In agents they also cover which tools may be used and when a human must approve.
Effective guardrails are layered and tested. Relying only on instructions in the prompt is fragile; the important rules should be enforced in code and in the system's control flow.
Related services
Related terms