Input and output guardrails

What are input and output guardrails?

· Glossary

Short answer

Input and output guardrails are the two enforcement surfaces around an AI model: input guardrails screen what reaches the model, and output guardrails screen what leaves it before a customer sees it.

Input guardrails inspect the incoming message and its context before the model reasons about anything. They catch prompt injection attempts, requests outside the agent's scope, and personally identifiable information that should never enter the context window. Output guardrails inspect the drafted response and any proposed actions before they ship: hallucination checks, policy screens, tone review, and blocks on unauthorized commitments such as out-of-policy refunds.

The framing to reject is one-sided protection. Some teams filter inputs and assume a clean prompt produces a safe answer; others moderate outputs and let anything in. Both halves fail alone: an innocent question can still draw a policy-violating answer, and a crafted injection can slip past input filters and reveal itself only in what the model does. The two surfaces catch different failure classes; neither substitutes for the other.

Input guardrails vs output guardrails at a glance

DimensionInput guardrailsOutput guardrails
What they inspectThe incoming message and context, before the model sees itThe drafted response and proposed actions, before the customer sees them
What they blockPrompt injection, off-scope requests, PII entering the contextHallucinations, policy violations, off-tone replies, unauthorized commitments
ExampleHidden "ignore your instructions" text in a message is flagged and neutralizedA drafted reply promising an out-of-policy refund is held and escalated

Aide, the AI platform for customer service, enforces both surfaces through its Agent Governance Engine: every conversation is screened on the way in, every answer and action is checked on the way out, and anything that fails a check is blocked or routed to a human.

Frequently asked questions

Very little. Input screening runs before the model call and output checks run on the drafted response; both are far faster than generation itself. The milliseconds are a good trade against one wrong answer reaching a customer.

The action is stopped, not silently patched. Depending on the rule, the request is refused, the response is regenerated within bounds, or the conversation escalates to a human with the flagged content attached.

Neither. Input guardrails stop bad instructions and data from entering; output guardrails stop bad answers and actions from leaving. Production systems need both.

About Aide

Aide is the AI platform for customer service. Its AI agent answers customers and resolves orders, refunds and returns, inside Zendesk, Gorgias or Front, or on its own with Aide Helpdesk. Built for ecommerce brands, with deep Shopify integration. What is Aide (aide.app)?

The AI platform for customer service

Aide answers customers and resolves Shopify orders in chat, email and your helpdesk. Free to start.