
Contents
- What are AI guardrails?
- Why do guardrails matter?
- 7 types of AI guardrails
- Guardrail tools and frameworks
- Guardrail tools compared
- How much do AI guardrails cost?
- How to add AI guardrails to a small business chatbot
- OWASP and NIST: the standards to map against
- How to choose a guardrail tool
- Common mistakes
- In short
- AI guardrails: FAQ
What are AI guardrails?
AI guardrails are rules and automated checks that control what goes into a model and what comes out of it. They run in your code, in a gateway or in a cloud service, before and after each model call. The model itself is not changed.
A prompt is screened on the way in and the answer on the way out. If a check fails, the guardrail blocks, masks or rewrites the message, or hands off to a human.
AI guardrails differ from a provider’s built-in safety training, which is generic. Yours encode business rules: allowed topics, data the bot must never reveal and actions it can take.
Why do guardrails matter?
A chatbot that invents a refund policy, leaks an address or obeys instructions hidden in a pasted document is a business risk. OWASP’s guidance on prompt injection says plainly that no foolproof prevention method is known, so the goal is to reduce the chance and the impact.
That is why guardrails work in layers: several cheap checks together catch most problems and log the rest for review.
7 types of AI guardrails
1. Input filtering
Screens user messages for harmful content or banned words before the model sees them, usually with category scores and thresholds you set.
2. Output filtering
Checks the model’s answer before the user sees it. OWASP lists “improper output handling” as its own risk, so also validate format (for example, that JSON is valid) before your code acts on a reply.
3. PII redaction
Detects and masks personal data such as names, phone numbers, card numbers and Social Security numbers, in prompts, responses and logs. Bedrock Guardrails, Model Armor and NeMo Guardrails (through tools like Microsoft Presidio) all offer this.
4. Prompt-injection defense
Prompt injection is when text changes the model’s behavior in ways you did not intend. OWASP separates direct injection (in the user’s message) from indirect injection (hidden in web pages, files or emails the model reads). Classifiers such as Azure Prompt Shields flag likely attempts; least privilege limits damage.
5. Topic restriction
Keeps a bot inside its job; a plumber’s chatbot should not give legal advice. Bedrock calls these denied topics; NeMo uses dialog rails in Colang.
6. Hallucination and grounding checks
Compares an answer with the source documents it was supposed to use and flags claims that are not supported. Bedrock offers contextual grounding checks and Azure offers groundedness detection.
7. Tool and action limits
For agents that can send email, issue refunds or query databases, guardrails include scoped API keys, allowlists and human approval for risky actions. OWASP’s “excessive agency” risk covers exactly this. Our explainer on agentic AI tools shows why agents raise the stakes.
Guardrail tools and frameworks
AWS Bedrock Guardrails
A managed service with six filter types: content filters (hate, insults, sexual, violence, misconduct and prompt attack), denied topics, word filters, sensitive information filters, contextual grounding checks and Automated Reasoning checks. AWS docs say the ApplyGuardrail API can run it without invoking a foundation model. Price: content filters and denied topics $0.15 per 1,000 text units; PII filters $0.10; grounding checks $0.10; Automated Reasoning $0.17 per policy; word filters and regex PII filters free. A text unit is up to 1,000 characters.
Azure AI Content Safety
Detects hate, sexual, violence and self-harm content with adjustable severity thresholds, plus Prompt Shields for direct and indirect injection, groundedness detection, protected material detection and custom categories. Price: a free tier covers 5,000 text records and 5,000 images a month (usage stops at the limit). Microsoft’s retail price list shows Standard text at $0.375 per 1,000 text records and images at $0.75 per 1,000 in East US. A text record is up to 1,000 characters.
Google Cloud Model Armor
Screens prompts and responses for responsible AI categories, prompt injection and jailbreaks, sensitive data (via Sensitive Data Protection) and malicious URLs. Google says it can help whether you deploy AI on Google Cloud or other clouds. Price: free for up to 2 million tokens a month, then $0.10 per additional 1 million tokens; Security Command Center subscriptions include 3 billion tokens a month.
NVIDIA NeMo Guardrails
An open-source Python package (Apache 2.0) for programmable guardrails. It supports input, retrieval, dialog, execution and output rails, uses Colang for flows, and runs as a Python SDK or OpenAI-compatible server. Price: free software; you pay for the compute and any models it calls.
Guardrails AI
An open-source Python framework (Apache 2.0) that combines “validators” from Guardrails Hub into input and output guards, and helps force structured output that matches a Pydantic schema. The repository notes that hosted remote inferencing for validators is being discontinued, with a planned cutoff of August 25, 2026, and validators moving to standard PyPI packages. Price: the framework is free; the company’s site lists no public pricing for paid products.
Meta Llama Guard 4
A 12-billion-parameter safety classifier that can run on a single GPU. It is natively multimodal (text plus image), and its model page lists 14 hazard categories (S1 to S14), from violent crimes to elections and code interpreter abuse, which you can customize. Price: downloadable model; you host it.
OpenAI moderation endpoint
Uses the omni-moderation-latest model, accepts text and images, and returns 13 categories such as harassment, hate, illicit, self-harm, sexual and violence. Price: OpenAI says the endpoint is free to use. It covers harmful content only, not PII, topics or injection.
Datadog AI Guard
Datadog lists AI Guard, a runtime guardrail product, from $0.80 per 1 million tokens scanned (annual) or $1.20 on demand.
Guardrail tools compared
| Tool | Type | Covers | Published price |
|---|---|---|---|
| AWS Bedrock Guardrails | Managed (AWS) | Content, prompt attack, topics, PII, grounding, logic checks | $0.10–$0.17 per 1,000 text units per filter; word/regex free |
| Azure AI Content Safety | Managed (Azure) | Harm categories, Prompt Shields, groundedness, protected material | Free 5,000 records/mo; $0.375 per 1,000 text records |
| Google Model Armor | Managed (Google Cloud) | Safety filters, injection, sensitive data, malicious URLs | 2M tokens/mo free; $0.10 per 1M after |
| NeMo Guardrails | Open source | Input, dialog, retrieval, execution, output rails | Free (self-hosted) |
| Guardrails AI | Open source | Validators, structured output | Free framework |
| Llama Guard 4 | Open-weight model | 14 hazard categories, text and image | Free to download; you host |
| OpenAI moderation | API | 13 harmful-content categories | Free |
How much do AI guardrails cost?
Worked example for a 10-person US business with one website chatbot. Assumptions (ours): 30,000 user messages a month, each prompt and each reply under 1,000 characters, so 60,000 checks a month, and roughly 200 tokens per message (about 12 million tokens a month).
- Bedrock Guardrails: content filter + denied topics + PII on 60,000 text units = 60 x ($0.15 + $0.15 + $0.10) = $24. Grounding checks on 30,000 replies add about $3, though AWS’s page should be checked for how source text is counted.
- Azure AI Content Safety: 60,000 text records at $0.375 per 1,000 = $22.50 for one type of check. Budget again for each extra check, such as Prompt Shields.
- Google Model Armor: 12 million tokens minus 2 million free = 10 x $0.10 = $1.
- OpenAI moderation: $0 for harmful-content screening.
- NeMo Guardrails, Guardrails AI, Llama Guard: $0 in license fees, plus your hosting and any GPU for Llama Guard.
The license line is usually small; the real cost is setup, tuning false positives and reviewing logs.
How to add AI guardrails to a small business chatbot
- Write a one-page policy. List allowed topics, banned topics, data the bot must never reveal and when to hand off to a person.
- Tighten the system prompt. Define the bot’s role and limits, as OWASP recommends. Treat this as a first layer, not the only one.
- Add input guardrails. Run each message through a harmful-content filter and an injection classifier. Mark text from documents or websites as untrusted.
- Redact PII both ways. Mask personal data in prompts, replies and logs. Keep regex rules for your own formats, like order numbers.
- Ground the answers. Use retrieval from your own help docs and add a grounding check. If support is weak, reply “I’m not sure” and offer a human.
- Limit actions. Give the bot read-only access by default. Require human approval for refunds, account changes or emails.
- Add output guardrails. Re-check the reply for harmful content, PII and format before sending.
- Log, test and tune. Send blocks to your observability tool, review weekly, run vetted adversarial tests and rate-limit users.
Still choosing the chatbot? See our AI tools for small business roundup.
OWASP and NIST: the standards to map against
OWASP Top 10 for LLM Applications (2025)
The 2025 list is: LLM01 Prompt Injection, LLM02 Sensitive Information Disclosure, LLM03 Supply Chain, LLM04 Data and Model Poisoning, LLM05 Improper Output Handling, LLM06 Excessive Agency, LLM07 System Prompt Leakage, LLM08 Vector and Embedding Weaknesses, LLM09 Misinformation and LLM10 Unbounded Consumption. AI guardrails directly address LLM01, LLM02, LLM05, LLM06, LLM07, LLM09 and LLM10.
OWASP’s prompt injection mitigations double as a checklist: constrain behavior, validate output formats, filter input and output, enforce least privilege, require human approval for risky actions, separate external content and test adversarially.
NIST AI Risk Management Framework
NIST released AI RMF 1.0 on January 26, 2023, for voluntary use. It is organized around four functions: Govern, Map, Measure and Manage. On July 26, 2024, NIST added the Generative AI Profile (NIST AI 600-1), which lists 12 risks including confabulation, data privacy, information security and harmful bias. NIST’s page notes the RMF is being revised under the White House AI Action Plan.
In practice, guardrails are “Manage” controls, and your logs and tests are “Measure.” Pair this with broader controls from our cybersecurity software for small business guide.
How to choose a guardrail tool
- Cloud fit: Already on AWS, Azure or Google Cloud? Start with that provider’s service.
- Coverage: Map each tool to your seven guardrail types. Free moderation APIs often skip PII and grounding.
- Latency: Run independent checks in parallel.
- Customization: Can you define your own topics, words and regex rules?
- Data and logs: Where are prompts processed, and can blocks flow to your monitoring tool?
- Pricing unit: Text units, records or tokens. Estimate your monthly volume in that unit.
Common mistakes
- Relying on the system prompt alone. Instructions are not enforcement.
- Checking input but not output. Leaks and hallucinations happen on the way out.
- Trusting retrieved content. Indirect injection arrives through documents and web pages.
- Giving the bot broad API keys. Scope access to the minimum.
- Setting thresholds once. Review blocked messages and tune regularly.
- No human fallback. A safe handoff beats a confident wrong answer.
In short
AI guardrails are layered checks around your model: filter input, limit tools, verify output and log everything. Small businesses on a major cloud can start with Bedrock Guardrails, Azure AI Content Safety or Model Armor for a few dollars a month at chatbot scale, while teams that want control can use NeMo Guardrails, Guardrails AI or Llama Guard for free. Map your controls to the OWASP LLM Top 10 and NIST AI RMF, then test and tune monthly.
Sources, as read in November 2026: OWASP Top 10 for LLM Applications 2025, OWASP LLM01 Prompt Injection, NIST AI RMF, NIST AI 600-1 publication page, NIST AI 600-1 PDF, Amazon Bedrock pricing, Amazon Bedrock Guardrails docs, Azure AI Content Safety pricing, Azure AI Content Safety product page, Azure Retail Prices API (Content Safety, East US), Google Model Armor overview, Google Model Armor pricing, NVIDIA NeMo Guardrails docs, NeMo Guardrails on GitHub, Guardrails AI on GitHub, Guardrails AI site, Llama Guard 4 model card, OpenAI moderation guide, Datadog pricing (AI Guard).
AI guardrails: FAQ
What are AI guardrails?
AI guardrails are automated checks and rules around a large language model that screen inputs, limit what the model can do and verify outputs. They block harmful content, redact personal data, keep a bot on topic and flag answers not supported by source documents.
What are the main types of AI guardrails?
The main types are input filtering, output filtering, PII redaction, prompt-injection defense, topic restriction, hallucination or grounding checks, and tool and action limits for AI agents.
Are AI guardrails the same as content moderation?
No. Content moderation is one type of guardrail that screens for harmful content. Full guardrails also cover personal data, off-topic requests, prompt injection, grounding and what actions an AI agent is allowed to take.
Can AI guardrails stop all prompt injection?
No. OWASP states that no foolproof prevention method for prompt injection is known. Layered guardrails, least-privilege access and human approval for risky actions reduce both the chance and the impact.
How much do AI guardrails cost?
Open-source tools such as NeMo Guardrails, Guardrails AI and Llama Guard are free to use, and the OpenAI moderation endpoint is free. Managed services charge by usage, such as $0.15 per 1,000 text units for Bedrock content filters or $0.10 per million tokens for Model Armor after 2 million free tokens.
Which guardrail tool is best for a small business?
Use the guardrail service of the cloud you already use: Bedrock Guardrails on AWS, Azure AI Content Safety on Azure or Model Armor on Google Cloud. If you want full control and no license fees, NeMo Guardrails or Guardrails AI are the leading open-source options.
Do guardrails slow down a chatbot?
Each check adds some latency because it is an extra step before or after the model call. Running independent checks in parallel and using fast rule-based filters first keeps the delay small.
How do guardrails relate to the NIST AI RMF?
The NIST AI RMF organizes AI risk work into Govern, Map, Measure and Manage. Guardrails are Manage controls, while the logs and tests that show they work support the Measure function.




Leave a Reply