Guardrails
Guardrails are the rules and checks placed around an AI model that constrain what it can receive and what it can do — filtering inputs, validating outputs, and blocking unsafe actions. They are how you keep an unpredictable model inside safe, on-brand, legal boundaries in a real product.
A model on its own will sometimes go off-topic, produce unsafe content, leak data, or take an action it shouldn't. Guardrails sit on the inputs and outputs: input filters for malicious or out-of-scope requests, output validation against a schema or policy, content and safety filters, and hard limits on which actions an agent may take and when a human must approve. They turn 'usually fine' into 'safe to ship.'
When building a product, guardrails are not optional polish — they are how you take responsibility for a component you can't fully predict. The right design is layered and specific to the risk: a customer-facing assistant needs topic and tone guardrails; an agent with tools needs strict permission boundaries and approval steps; anything handling personal data needs filters that match your privacy obligations. We build guardrails as deliberate engineering with their own evals, because the model's confidence is never a substitute for an actual check.
// faq
Frequently asked questions
- What's the difference between guardrails and a system prompt?
- A system prompt asks the model to behave; guardrails enforce it. A prompt is an instruction the model can ignore, misread, or be tricked past via prompt injection. Guardrails are code around the model — input filters, output validation, permission limits, human approval — that hold even when the model misbehaves. Use the prompt to guide, and guardrails to guarantee.