Guide
What are AI guardrails?
Guardrails are the checks around a language model that decide what it may read, say and do. This guide explains the main types, how they work, the open-source and managed tools available in 2026, how to run them on your own infrastructure and why they are one layer of defence rather than the whole of it.
In short
AI guardrails, or LLM guardrails, are checks that run outside a language model to screen what goes in, what comes out and what an application or agent is about to do. They block, rewrite or escalate unsafe prompts, harmful answers, leaked personal data and unauthorised tool calls. They reduce risk but can be bypassed, so pair them with deterministic limits.
DefinitionAI guardrails are predefined rules and checks, implemented outside a model's weights, that control and limit what an AI system accepts, produces and does, so that it stays within an organisation's safety, security and business policies.
Key takeaways
- Guardrails are separate components around the model, configured, versioned and logged by you, that check inputs, outputs and proposed actions against your policies.
- The main types are input, output, topical, sensitive-data, grounding and action guardrails. They use rules, small classifiers, safety models and LLM judges, each trading accuracy against latency and cost.
- Open-source frameworks and open-weight safety models run on your own servers; the managed guardrails of AWS, Microsoft and Google process content in their clouds.
- Check licence, language coverage and maintenance before you choose: in 2026 one popular toolkit was archived, and some safety models are English-only or carry licence terms that need legal review in the EU.
- NIST, the UK NCSC, Germany's BSI and OWASP agree that guardrails reduce risk but can be bypassed, so least privilege, authorisation outside the model, human approval and logging must hold when a guardrail fails.
What are AI guardrails?
AI guardrails, also called LLM guardrails, are checks that run around a large language model (LLM), in the application rather than inside the model, to decide what the model may receive, what it may return and what an application or agent may do with its output. Each check compares content or an action with a policy, then allows it, blocks it, rewrites it or sends it to a person.
The European standard ETSI EN 304 223, published in December 2025, defines guardrails as predefined constraints or rules that control and limit an AI system’s outputs and behaviours. NIST’s ARIA evaluation programme adds a useful nuance: a guardrail specifies both what may and what may not be shared, so withholding permitted content counts as a failure, just as releasing prohibited content does.
Guardrails differ from the two other places where model behaviour is shaped:
- Model training. Developers train models to refuse some requests. That behaviour lives in the weights, is the same for every customer and can be weakened by fine-tuning or by clever prompts.
- The system prompt. Instructions guide the model, but the model can ignore them or be talked out of them. OWASP advises implementing guardrails outside the model itself instead of relying on system-prompt instructions.
- Guardrails. Separate components that you configure, version, test and log. They apply your organisation’s policies and keep working when you swap the model.
Why do LLM applications need guardrails?
Because a language model’s output is probabilistic and its input can be manipulated, so an application that passes text straight to users or to other systems inherits every error and every attack. Guardrails catch predictable failures before they reach a person or a system.
The OWASP Top 10 for LLM Applications, whose 2026 edition appeared in August 2026, ranks prompt injection first, followed by sensitive information disclosure and excessive agency. Guardrails address part of most entries: input filters for prompt injection, data filters for disclosure, action checks for excessive agency, output validation for improper output handling, grounding checks for misinformation, and size and rate limits for unbounded consumption. They do little for supply chain risks and data poisoning, which need controls when you build the system. France’s cyber security agency ANSSI likewise recommends filtering both user input and model output as part of defence in depth.
What types of AI guardrails are there?
Guardrails are usually grouped by where they sit and what they check.
- Input guardrails screen prompts and retrieved content before the model sees them: jailbreak and prompt-injection detection, blocked topics, and personal data that should not reach the model.
- Output guardrails screen what the model returns: harmful or toxic content, personal or confidential data, leaked system instructions and format errors.
- Topical guardrails keep an assistant within its purpose, for example an HR assistant that declines to give legal advice, and can steer a conversation along approved flows.
- Grounding guardrails check that an answer is supported by the retrieved sources, which reduces, but does not remove, invented claims in retrieval-augmented generation (RAG).
- Action guardrails check each tool call an agent proposes, its arguments and its destination, before anything runs. Our guide to AI agent security covers them together with agent identity and sandboxing.
- Operational guardrails cap input size, tokens, cost and request rates, so that a loop or an abuse pattern cannot exhaust capacity or budgets.
NVIDIA’s NeMo Guardrails framework uses a similar split, with input, dialogue, retrieval, execution and output rails, and Microsoft’s Foundry guardrails check four points: user input, tool call, tool response and output.
How do AI guardrails work?
Most guardrails combine several detection methods, ordered from cheapest to most expensive:
- Rules. Regular expressions, keyword lists, allow-lists of tools and domains, and JSON schema validation. Fast and predictable, but easy to evade by rephrasing.
- Small classifiers. Models trained to detect one thing, such as prompt injection. Meta reports 19 to 92 milliseconds per check for its two Prompt Guard 2 classifiers on a data-centre GPU.
- Safety models. Language models fine-tuned to judge whether a prompt or response breaks a policy, such as Llama Guard 4, Granite Guardian or Qwen3Guard. IBM positions its 8-billion-parameter Granite Guardian for moderate latency budgets, such as monitoring and spot checks.
- Policy-reasoning models and LLM judges. Larger models that apply a written policy or rubric. They are the most flexible and the slowest: OpenAI describes its gpt-oss-safeguard as compute-intensive and suggests pre-filtering with smaller classifiers.
- Deterministic authorisation. For actions, a policy service outside the model decides whether a tool call is allowed for this user and this task.
A common design runs a cheap first stage on every request and sends only flagged content to a slower, more accurate second stage. Frameworks also hide latency: NeMo Guardrails can run input checks in parallel with the main model. Every method trades false positives, which block legitimate users, against false negatives, which let harmful content through, so measure both on your own traffic before you set thresholds.
Which AI guardrail tools are there?
Open-source frameworks and safety models run on your own infrastructure; the hyperscalers offer managed services. We checked each project’s repository, model card or documentation on 4 November 2026.
| Tool | What it does | Licence and points to check |
|---|---|---|
| NVIDIA NeMo Guardrails (0.24) | Framework with input, dialogue, retrieval, execution and output rails, configured in Colang | Apache 2.0. Sends anonymous usage telemetry to NVIDIA by default since version 0.22 (May 2026); opt out in sovereign set-ups |
| Guardrails AI (0.11) | Framework that builds input and output guards from validators | Apache 2.0. Hosted hub and inference shut down in August 2026; validators now run locally. The company was acquired by Harvey in September 2026 |
| Meta Llama Guard 4 and Prompt Guard 2 | 12B safety classifier for text and images; small prompt-attack classifiers | Llama 4 Community License. The Llama 4 use policy withholds rights to its multimodal models from companies based in the EU; get legal review |
| IBM Granite Guardian 4.1 | Judge for harm, jailbreaks, RAG groundedness and tool-call hallucination, with your own criteria | Apache 2.0. Trained and tested on English only |
| Qwen3Guard | Moderation models from 0.6B to 8B, including a streaming variant | Apache 2.0. Covers 119 languages and dialects |
| OpenAI gpt-oss-safeguard | Reasoning classifier that applies a policy you write | Apache 2.0. Slower and costlier than small classifiers |
| NVIDIA Nemotron Content Safety (3 and 3.5) | Multimodal safety classifiers; 3.5 adds custom policies | NVIDIA open model licences and Gemma terms. Twelve languages, including German, French, Spanish, Italian and Dutch |
| Amazon Bedrock Guardrails | Managed content, topic, word, sensitive-data, grounding and Automated Reasoning checks | AWS service. Checks text from any model via the ApplyGuardrail API, but runs in AWS |
| Azure AI Content Safety | Managed Prompt Shields, harm categories, protected material and agent task adherence | Azure service. Its self-hosted containers retire on 30 April 2027 |
| Google Cloud Model Armor | Managed safety filters, prompt-injection and jailbreak detection, sensitive data and malicious URLs | Google Cloud service. Checks each turn on its own and does not decode Base64 or other encodings |
Two other widely cited toolkits need care: Protect AI’s LLM Guard was archived in July 2026, and Meta’s LlamaFirewall, an MIT-licensed framework for agent guardrails, has had no release since May 2025.
Can you run AI guardrails on-premises?
Yes. Open-source frameworks and open-weight safety models run on your own servers next to a self-hosted model, so prompts and answers can stay inside your infrastructure. Managed services work differently: Amazon Bedrock Guardrails and Google’s Model Armor can check content for models hosted elsewhere, but they process it in their providers’ clouds, and Bedrock’s Standard tier uses cross-Region inference. Microsoft’s only self-hosted option, the Azure AI Content Safety containers, must stay connected to Azure for metering and retires on 30 April 2027.
Four checks matter on your own infrastructure:
- Telemetry. Set the documented opt-out for NeMo Guardrails’ usage reporting before deployment, and block outbound traffic from inference and guardrail hosts anyway.
- Languages. Test in the languages your users write in. Granite Guardian 4.1 is English-only, while Qwen3Guard and NVIDIA’s Nemotron models cover German, French and other European languages.
- Licences. Apache 2.0 and MIT components are the simplest to approve; Llama, Gemma and NVIDIA model licences carry their own terms.
- Maintenance. Pin versions, watch each project’s releases and keep an exit plan, because two widely used toolkits changed status in 2026.
In an air-gapped deployment, import, verify and update every guardrail model through the same controlled process as the main model.
What can’t guardrails do?
Guardrails reduce risk; they do not remove it, and every authority that has studied them says so.
- NIST states that current mitigations do not offer full protection against all attacker techniques, and that detection systems can themselves be attacked and may fail in the same ways as the models they monitor.
- The UK National Cyber Security Centre (NCSC) says prompt injection will remain a residual risk that cannot be fully mitigated with a product or appliance, warns that attacks can be rephrased endlessly to evade deny-lists, and advises buyers to beware of vendors who claim to stop it.
- OWASP’s 2026 Top 10 states that no reliable prevention mechanism for prompt injection exists today, and calls the defence architectural rather than interceptive.
- Germany’s Federal Office for Information Security (BSI) finds that countermeasures significantly reduce the likelihood of a successful attack but do not eliminate it.
Measured results confirm it. In February 2026 the UK AI Security Institute published an automated method that produced universal jailbreaks against two of the strongest commercial classifier defences; against OpenAI’s GPT-5 input classifier it scored 75.6% on average across a set of harmful questions. In a red-teaming competition analysed by NIST and published in March 2026, at least one successful attack was found against each of the 13 frontier models tested.
So treat guardrails as one layer, and design the system so that a bypass cannot cause serious harm: least-privilege tools, authorisation outside the model, human approval for high-impact steps, sensitive data out of reach of untrusted content, and a log of every decision. Our article on guardrails architecture for on-premises AI agents shows how the layers fit together, and our post on prompt injection defences for RAG covers retrieval in particular.
How do you test and tune guardrails?
Test guardrails like any other model: on a labelled set of benign, borderline and malicious inputs from your own use cases, measuring how often they block legitimate requests and how often they miss harmful ones.
- Measure both errors. Count over-blocking as a failure, as NIST’s ARIA programme does, and agree acceptable rates for each guardrail with the business owner.
- Compare at a fixed cost. Meta reports detection at a fixed false-positive rate and attack prevention at a fixed loss of usefulness; ask vendors for the same, measured on your data.
- Attack adaptively and repeatedly. NIST advises testing new mitigations with someone actively trying to break them, and its agent-hijacking evaluations found success rates rising when attacks were repeated.
- Retest on every change. Rerun the suite when the model, prompts, retrieval or guardrail configuration change. Managed classifiers can change too: Microsoft rolled out an updated harm and Prompt Shields model in October 2026.
- Log decisions. Record which guardrail fired, on what and with which outcome, so you can investigate incidents and tune thresholds.
Our guide to LLM evaluation explains how to build the test set and score the results.
Do guardrails help with EU AI Act compliance?
They can contribute, but the Act does not mention guardrails, so their role is an interpretation. For high-risk AI systems, Article 15 requires resilience “against attempts by unauthorised third parties to alter their use, outputs or performance by exploiting system vulnerabilities”, and technical solutions that address, where appropriate, attacks such as inputs designed to make the model err. Article 9 requires risk management that covers reasonably foreseeable misuse, with testing against prior defined metrics and probabilistic thresholds.
Input and output guardrails, together with test evidence of what they catch and miss, support both duties. These obligations apply from 2 December 2027 for Annex III systems and from 2 August 2028 for Annex I systems, under the dates set by Regulation (EU) 2026/1744. Whether a system is high-risk depends on its use case and your role; this guide is not legal advice.
How SysArt implements guardrails
We start from the application’s risks, not from a product list. We map the inputs, outputs and actions of one assistant, RAG system or agent against the OWASP Top 10, choose guardrails that run on your infrastructure, and tune them on test sets built from your own traffic and languages. We then wire their decisions into logging and monitoring, and combine them with the deterministic controls that hold when a guardrail is bypassed. Read more about our AI and LLM security work.
Frequently asked questions
What are AI guardrails?
AI guardrails, also called LLM guardrails, are checks that run outside a language model and screen its inputs, its outputs and the actions an application or agent proposes. Each check compares content or an action with a policy, then allows, blocks, rewrites or escalates it. Unlike instructions in a system prompt, guardrails are separate components you configure, test, version and log, and they keep working when you change the model.
What types of AI guardrails are there?
The common types are input guardrails, which screen prompts and retrieved content for injection attempts and sensitive data; output guardrails, which screen answers for harmful content, data leaks and format errors; topical guardrails, which keep an assistant within its purpose; grounding guardrails, which check answers against sources; action guardrails, which check tool calls before they run; and operational limits on tokens, cost and request rates.
Which open-source guardrail tools are there?
Frameworks include NVIDIA NeMo Guardrails and Guardrails AI, both under Apache 2.0, and Meta's LlamaFirewall under MIT. Self-hostable safety models include IBM Granite Guardian, Qwen3Guard and OpenAI's gpt-oss-safeguard under Apache 2.0, Meta's Llama Guard 4 and Prompt Guard 2 under the Llama 4 licence, and NVIDIA's Nemotron Content Safety models. Check maintenance status: Protect AI's LLM Guard was archived in July 2026.
Can guardrails stop prompt injection?
No. They make it harder, but NIST states that current mitigations do not offer full protection, the UK National Cyber Security Centre says prompt injection cannot be fully mitigated with a product, and OWASP's 2026 Top 10 says no reliable prevention mechanism exists today. Design the system so that a successful injection cannot do serious harm: least-privilege tools, authorisation outside the model, human approval for high-impact actions and full logging.
Can AI guardrails run on-premises?
Yes. Open-source frameworks such as NeMo Guardrails and open-weight safety models such as Granite Guardian or Qwen3Guard run on your own servers next to a self-hosted model, so prompts and answers stay inside your infrastructure. Managed services from AWS, Microsoft and Google process content in their clouds, and Microsoft's self-hosted Content Safety containers retire on 30 April 2027. Switch off any default telemetry before deployment.
What are Amazon Bedrock Guardrails?
Amazon Bedrock Guardrails is a managed AWS service that applies content filters, including prompt-attack detection, denied topics, word filters, sensitive-information filters, contextual grounding checks and Automated Reasoning checks. Through its ApplyGuardrail API it can check text from any model, not only models on Bedrock. It runs in AWS, and its Standard tier uses cross-Region inference, which matters when you assess data residency.
Do guardrails help with EU AI Act compliance?
They can contribute, but the Act does not mention guardrails. For high-risk systems, Article 15 requires resilience against attempts by unauthorised third parties to alter a system's use, outputs or performance, and Article 9 requires risk management that covers foreseeable misuse, with testing against prior defined metrics. Guardrails with test evidence support both duties, which apply from 2 December 2027 for Annex III systems. This is not legal advice.
Sources
- ETSI EN 304 223 V2.1.1: Securing Artificial Intelligence, baseline cyber security requirements for AI models and systems (December 2025) · checked 4 November 2026
- NIST AI 700-2: ARIA pilot evaluation report, glossary definition of guardrail violations (November 2025) · checked 4 November 2026
- NIST AI 100-2 E2025: Adversarial Machine Learning, a Taxonomy and Terminology of Attacks and Mitigations (March 2025) · checked 4 November 2026
- OWASP GenAI Security Project: Top 10 for LLM Applications 2026 (version 1.0, August 2026) · checked 4 November 2026
- OWASP GenAI Security Project: LLM07:2025 System Prompt Leakage, guardrails outside the LLM · checked 4 November 2026
- UK National Cyber Security Centre: Prompt injection is not SQL injection (it may be worse) (8 December 2025) · checked 4 November 2026
- BSI: Evasion attacks on LLMs, countermeasures in practice, version 1.0 (6 November 2025) · checked 4 November 2026
- ANSSI: Security recommendations for a generative AI system, recommendation R25 (29 April 2024) · checked 4 November 2026
- UK AI Security Institute: Boundary point jailbreaking, a new way to break the strongest AI defences (17 February 2026) · checked 4 November 2026
- NIST: Insights into AI agent security from a large-scale red-teaming competition (23 March 2026) · checked 4 November 2026
- NVIDIA NeMo Guardrails: repository, licence and telemetry notice (release 0.24.1, 16 September 2026) · checked 4 November 2026
- NVIDIA NeMo Guardrails documentation: rail types · checked 4 November 2026
- Guardrails AI: repository and news on the hub and hosted inference sunset (release 0.11.0, August 2026) · checked 4 November 2026
- Meta: Llama Guard 4 12B model card and Llama 4 Community License, Hugging Face (April 2025) · checked 4 November 2026
- Meta: Llama 4 Acceptable Use Policy · checked 4 November 2026
- Meta: Llama Prompt Guard 2 86M model card, including latency per classification, Hugging Face (April 2025) · checked 4 November 2026
- IBM: Granite Guardian 4.1 8B model card, Hugging Face (April 2026) · checked 4 November 2026
- Qwen (Alibaba Cloud): Qwen3Guard repository · checked 4 November 2026
- OpenAI: gpt-oss-safeguard 20b model card, Hugging Face (October 2025) · checked 4 November 2026
- NVIDIA: Nemotron 3 Content Safety model card, Hugging Face (16 March 2026) · checked 4 November 2026
- Protect AI: LLM Guard repository, archived on 8 July 2026 · checked 4 November 2026
- Amazon Bedrock user guide: Amazon Bedrock Guardrails · checked 4 November 2026
- Amazon Bedrock user guide: guardrail safeguard tiers and cross-Region inference · checked 4 November 2026
- Microsoft Learn: Azure AI Content Safety containers, retirement on 30 April 2027 · checked 4 November 2026
- Google Cloud: Model Armor overview, including limitations · checked 4 November 2026
- AI Act Service Desk: Article 15, accuracy, robustness and cybersecurity (consolidated text as at 27 July 2026) · checked 4 November 2026
- AI Act Service Desk: Article 9, risk management system · checked 4 November 2026
- AI Act Service Desk: Article 113, application dates as amended by Regulation (EU) 2026/1744 · checked 4 November 2026