# AI guardrails

> AI guardrails are checks placed around a language model that block, rewrite or escalate inputs and outputs that break your rules on safety, accuracy, privacy or scope.

- Page: https://methodcrew.com/glossary/ai-guardrails
- Last updated: 2026-10-28
- Publisher: [The Method Crew](https://methodcrew.com/)
- Also known as: LLM guardrails

## How it works

A guardrail is code that runs before or after the model call. Input checks inspect what a user or a document sends in: personal data that should be masked, requests outside the assistant's job, text that looks like an injection attempt. Output checks inspect what comes back: whether the answer cites a source from the approved set, whether it quotes a price the system never retrieved, and whether the JSON is valid against the schema.

Some checks are plain rules: regular expressions, allowlists, schema validation. Others use a second, smaller model as a classifier. Open-source and managed options include [NVIDIA NeMo Guardrails](https://docs.nvidia.com/nemo/guardrails/), Guardrails AI, Llama Guard and Amazon Bedrock Guardrails, though many production checks are a short function in your own code. For what the checks should cover, the [OWASP Top 10 for LLM applications](https://genai.owasp.org/llm-top-10/) (2025) is a practical list, from prompt injection to improper output handling and excessive agency.

## How businesses use it

Guardrails decide what an assistant may say and do. We set them per risk, for example:

- A support assistant may only answer from retrieved help articles and must link the one it used.
- An agent that drafts quotes cannot offer a discount above a set limit.
- Any message that mentions legal action, a formal complaint or a medical symptom goes to a person.
- Customer names and card numbers are masked before any text is logged.

We write these rules with the process owner during the Map stage, then test them against real past examples before launch.

## Where it goes wrong

There are two failure modes, and they pull in opposite directions. Loose guardrails let a confident wrong answer reach a customer. Tight ones refuse so often that staff stop using the tool and go back to email.

Guardrails also cannot fix a weak system underneath. If retrieval returns the wrong document, a citation check tells you the answer is unsupported; it cannot find the right one. Track refusal and escalation rates every week with [LLM evaluation](https://methodcrew.com/glossary/llm-evaluation) and [LLMOps](https://methodcrew.com/glossary/llmops) tooling, and tune thresholds against real traffic.

You need fewer of them when a person reviews every output before it goes anywhere. An internal drafting assistant needs data masking and little else.

## Example (hypothetical)

Hypothetical: a property manager's tenant assistant answers repair questions from the maintenance handbook. An output check blocks any reply that promises a repair date, because only the dispatcher can commit to one, and moves those messages to the dispatcher's queue.

## Related terms

- [Prompt injection](https://methodcrew.com/glossary/prompt-injection): Prompt injection is an attack where text given to a language model, typed by a user or hidden in a document, overrides the instructions the system was built with.
- [Human-in-the-loop (HITL)](https://methodcrew.com/glossary/human-in-the-loop): Human-in-the-loop is a workflow design where a person reviews, corrects or approves an AI system's output at set points before it reaches a customer or a system of record.
- [LLM evaluation (evals)](https://methodcrew.com/glossary/llm-evaluation): LLM evaluation scores a language model system's outputs against a fixed set of real test cases, so you can tell whether a change made it better or worse.
- [AI hallucination](https://methodcrew.com/glossary/ai-hallucination): An AI hallucination is output from a language model that is fluent and confident but false, such as an invented citation, policy, figure or product detail.
- [LLMOps (AI observability)](https://methodcrew.com/glossary/llmops): LLMOps is the operating discipline for language model systems in production: tracing every call, tracking cost and latency, monitoring quality, and managing prompt and model changes.

## Services where this matters

- [AI ops monitoring and improvement](https://methodcrew.com/services/ai-ops-monitoring): Quality checks, cost control and model updates for live AI systems. $1,500 to $5,000 per month.
- [Custom AI agents and copilots](https://methodcrew.com/services/custom-ai-agents): Agents that look things up in your CRM or helpdesk and take the next step, with approvals. $15,000 to $90,000 per project.
- [RAG and knowledge systems](https://methodcrew.com/services/rag-knowledge-systems): Your documents turned into an assistant that cites its sources. $15,000 to $75,000 per project.

## Articles that use this term

- [AI agents vs workflow automation vs chatbots: how to pick](https://methodcrew.com/insights/ai-agents-vs-automation-vs-chatbots)
- [AI readiness assessment: the checklist we use and how to score it](https://methodcrew.com/insights/ai-readiness-assessment-checklist)
- [Fractional chief AI officer: what the role covers and what it costs](https://methodcrew.com/insights/fractional-chief-ai-officer)
- [AI acceptable use policy template for employees](https://methodcrew.com/insights/ai-acceptable-use-policy-template)

Full glossary: https://methodcrew.com/glossary
