ENES

AI guardrails

Checks placed around an AI model to stop unwanted questions and answers.

A user's message passes an input check, goes through an AI model and then an output check before reaching the user; a jailbreak attempt and a card number are blocked along the way

AI guardrails are the rules and filters a company puts around a language model so that its app behaves as intended. The model itself is trained to be helpful and avoid harm, but a bank's assistant needs more specific limits: do not give investment advice, do not talk about competitors, never show a full card number, stay polite even when the customer is not.

They usually sit on both sides of the model. An input check looks at what the user sends and blocks or rewrites things like jailbreak attempts, prompt injection or off-topic requests. An output check reads the model's answer before the user sees it: it can hide personal data, catch toxic language, refuse forbidden topics or check that the answer is backed by the company's documents, to cut down on hallucinations. Some guardrails are simple rules, like a list of banned words; others are a second, smaller model that judges the first.

Cloud providers sell this as a service, such as Amazon Bedrock Guardrails, and there are open-source tools too. Guardrails are not perfect: too strict and they block reasonable questions, too loose and things slip through. They work best as one layer among several, together with careful prompts, limited permissions and human review where the stakes are high.

Keep in mind

Go deeper

Related terms

More in AI