Skip to content

What Are AI Guardrails? Types and Examples

Published Updated

AI guardrails are checks around a model that apply your organisation’s rules to the information it receives, the answers it returns and the actions it takes. A check can remove personal details before they reach the model or hold a proposed action for approval. Choose each check by the mistake it needs to catch and what the system must do when it catches one.

What AI Guardrails Are

An AI guardrail sits at a point where the application can still intervene. It checks a message, a draft answer or a proposed action and decides whether to allow it, change it, block it or hand it to a person.

Model providers can train a model to behave safely across many uses. Application guardrails enforce rules for a particular job. A model may be trained to avoid harmful language, while the application checks whether a reply contains a customer’s account details before showing it.

“Guardrails” can also mean governance practices. Australia’s Voluntary AI Safety Standard set out ten such guardrails. The Australian Government’s Guidance for AI Adoption updates that advice. Technical guardrails are the checks an application runs when someone uses it.

Types of AI Guardrails

Where a guardrail runs determines what it can stop. Check incoming data before the model sees it and check the answer before the user sees it. When an assistant can take action, check the proposed action before it reaches the connected system.

Type What it checks What happens when it trips
Input The request is on an approved topic and contains only information the model can receive. A filter can screen for personal information or signs of prompt injection. Mask personal details before sending the request or reject it when the request itself breaks a rule.
Output Claims have support in source documents, the answer avoids blocked content and any structured result matches the required format. The check can also detect personal information. Withhold an unsupported or disallowed answer. Redact personal details when the rest can safely be shown.
Action The agent may call the proposed tool, the action falls within its spending or volume cap and any required approval is in place. The application denies the action or holds it for a person to approve.
Conversation The exchange stays within the chatbot’s remit and the user has a way to reach a person when required. Explain what the chatbot can help with or pass the request to a staff member.

Guardrail Examples

The right check depends on what a mistake would cost the user. These hypothetical examples show where the application can intervene.

Hypothetical Banking Chatbot

A bank’s chatbot can explain how a savings account works. When a customer asks where they should invest their savings, a topic check treats the request as personal financial advice. The chatbot explains that it can answer general product questions and offers to put the customer in touch with a person.

Hypothetical Construction Knowledge Assistant

A site supervisor asks whether a named inspection is required before a handover. The assistant can answer only from documents the supervisor is allowed to read. An output check compares the proposed answer with the cited passages. If those passages do not cover the inspection, the assistant says it cannot find a source for the answer and directs the supervisor to the project’s quality team.

Hypothetical Logistics Email Agent

An agent drafts a notice about a delayed shipment. The email tool checks whether any recipient is outside the company and whether a staff member has approved that draft and its recipients. If approval is missing, the sender sees a draft awaiting review and the email stays unsent. A change to the message or its recipients requires fresh approval.

Guardrail Tools and Frameworks

Platform filters can cover standard checks such as detecting harmful content or masking common kinds of personal information. Use them when they cover the rule you need and your own tests confirm their behaviour. Add an application check when the rule depends on facts your organisation owns, such as who may read a record or who can authorise a payment.

Tool What it checks
NVIDIA NeMo Guardrails A library for applying configurable checks to user messages, retrieved text, conversation flow, tool calls and responses.
Guardrails AI A Python framework that runs validators on inputs or outputs. It can also generate structured results using a defined schema.
Amazon Bedrock Guardrails Configurable filters for harmful content, denied topics and sensitive information. Its grounding check looks for answers that add claims beyond the source material or miss the question.
Azure AI Content Safety Microsoft’s service for detecting harmful content in text or images, including user prompts and generated content.
Llama Guard Meta’s safety classifier for model inputs and outputs. The application uses its classification to decide whether the content goes through.

Where Guardrails Fall Short

AI guardrails can block legitimate work or let a harmful result through. A false positive occurs when a check blocks a permitted request, such as a question about a policy because it contains a word from a blocked topic. A false negative occurs when the check misses something it was meant to catch, such as personal information it fails to recognise.

Give the assistant only the permissions its task requires. If it can draft an email, the ability to send can stay with a separate approval step. Use human-in-the-loop review for actions where a mistaken decision could cause serious consequences.

Every check takes processing time. A local format check may add little, while calling another model can add waiting time and running costs. Measure the whole response time and cost per request with the checks on. Include retries so the measurement reflects what users will experience when a check trips.

Designing Guardrails for Your Own Assistant

Start with one job and write down what an unacceptable outcome would be. For an assistant that answers questions from internal policies, decide which statements need source support and which records must stay private. If the assistant can update a record, specify which updates are allowed and who must approve them. Give each rule an expected system response so a test can tell whether it worked.

Before launch, build a set of ordinary requests, borderline cases and hostile prompts using fictional data. Include a valid request a filter might reject, a request involving a restricted record and a proposed action without approval. Check the answer the user sees and check the connected system for side effects. A blocked action passes only if the connected system remains untouched.

Once the assistant is live, log each rule that trips and what the application did in response. Include the rule version and a request reference so the team can investigate without copying sensitive messages into the logs. Use AI observability to see which rules trip more often and review samples of allowed traffic for mistakes the filters missed.

Give the system owner responsibility for proposing and testing changes. The relevant policy owner, such as the privacy lead for personal information rules, approves the change. Run the same test cases after changing the rules or model and verify that permitted requests still work alongside the cases that must be blocked.