Guardrails

Guardrails are the controls placed around a model to keep its inputs and outputs within safe, policy-compliant, and on-topic bounds. They include content moderation, input and output validation, allowed-topic restrictions, schema enforcement, and human review, forming a defensive layer independent of the model's own training.

Definition

Guardrails

A model's built-in alignment reduces but does not eliminate unsafe or off-policy behavior, so production systems wrap it in guardrails. These can filter or block harmful content, validate that outputs match a required structure, keep a conversation on approved subjects, and gate risky actions behind confirmation.

Guardrails are essential for defending against prompt injection and jailbreaks and for meeting compliance requirements. Effective guardrail design uses defense in depth — combining moderation APIs, validation logic, least-privilege tool access, and evaluation — rather than relying on any single mechanism.

Frequently asked questions

What is Guardrails?

Guardrails are the controls placed around a model to keep its inputs and outputs within safe, policy-compliant, and on-topic bounds. They include content moderation, input and output validation, allowed-topic restrictions, schema enforcement, and human review, forming a defensive layer independent of the model's own training.

Sources

Related terms

← Full AI & prompt engineering glossary

Put Guardrails to work with Prompeteer, the Agentic Contextual AI Platform →