AI Guardrails
AI guardrails are the layered controls — input filters, output classifiers, policy engines, schema validation, and structured generation — that constrain an AI system to safe, on-policy, and on-task behavior.
Full definition
Guardrails operate at four points: (1) input — block disallowed queries; (2) retrieval — restrict source documents by ACL; (3) generation — constrain to schemas (JSON, function signatures); (4) output — classify and reject unsafe completions. NVIDIA NeMo Guardrails, Llama Guard, and OpenAI's moderation API are common implementations. Guardrails are layered defense, not a single filter, and should fail closed.
Why it matters
Guardrails turn "the model behaved badly" into "the system refused, logged, and alerted." For any user-facing AI, they are non-optional — and they are the boundary between an AI feature you can defend in court and one you cannot.
Example
A healthcare chatbot wraps an LLM with three layers: PHI input redaction, schema-constrained outputs, and a Llama Guard classifier on every response. A jailbreak that bypasses one layer is caught by the other two.
Related terms
- JailbreakA jailbreak is an adversarial prompt or technique that bypasses an AI model's safety guardrails to elicit content or behaviors the model was trained to refuse — for example, hazardous instructions, restricted personal data, or off-policy assertions.
- Prompt InjectionPrompt injection is an attack in which adversarial text — placed directly in user input or hidden inside content the model retrieves — overrides developer system instructions and hijacks the model's behavior, exfiltrating data or causing unauthorized actions.
- AI GovernanceAI governance is the framework of policies, roles, controls, and processes an organization uses to ensure its AI systems are lawful, safe, fair, accountable, and aligned with business intent — across the full lifecycle from problem framing to retirement.
- AI Red-TeamingAI red-teaming is the practice of systematically probing an AI system — using adversarial prompts, jailbreak techniques, and edge-case inputs — to surface harmful, unsafe, biased, or policy-violating behaviors before and after deployment.
Source & further reading
Primary source: Inan et al. — "Llama Guard: LLM-based Input-Output Safeguard" (Meta AI) (2023).
Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/ko/glossary/guardrails/.