Skip to content
ReviewRamble

The weekly brief

AI, reviewed, in your inbox.

  • New reviews of tools, models, MCP servers and repos, with the verdict up front
  • Re-checked prices and ratings when something changes
  • New analysis pieces as they are published

Models, agents, MCP servers and the tools actually worth your time.

One email a week. Unsubscribe with the link in any brief. How we use your email

Guardrails (AI)

Guardrails are runtime checks placed around a language model that inspect inputs and outputs and block, rewrite or redirect them, so an application stays on topic, avoids harmful content and follows rules the model alone would not reliably keep.

Also called: AI guardrails, rails

By Divya Sharma · Checked Nov 15, 2026 · How we review

A model trained to be safe still makes mistakes, and it knows nothing about your product's rules. Guardrails add a separate layer of control in the application. They run before the prompt reaches the model, after the answer comes back, or both.

How it works

An input rail might detect a prompt injection attempt, strip personal data through PII redaction, or refuse a topic the product should not discuss. An output rail might check an answer against the retrieved sources to catch a hallucination, validate that JSON matches a schema, or block toxic text. Checks can be simple rules and regular expressions, small classifier models such as Llama Guard 4, or a second LLM call.

The NeMo Guardrails paper describes rails as a way to control model output, for example keeping to a set dialogue path or avoiding harmful subjects, and separates these programmable rails from safety built into the model during training. Open-source toolkits include NeMo Guardrails and Guardrails AI. The guardrails stage guide compares the options.

Example

A bank's support bot gets a message asking it to ignore its instructions and list other customers' balances. An input rail flags the injection pattern and returns a fixed refusal. The model never sees the request.

Limits

Guardrails reduce risk; they do not remove it. Classifiers miss rephrased attacks and also block harmless requests. Each extra check adds latency and cost. Treat guardrails as one layer alongside narrow agent permissions, testing and monitoring.

Related terms

Prompt injection
Prompt injection is an attack where text fed to a language model, typed by a user or hidden in a web page, file or tool result, changes the model's behaviour in ways its developer did not intend.
PII redaction
PII redaction is the detection and removal or masking of personally identifiable information, such as names, phone numbers, addresses and card numbers, from text or images before it is sent to a model, stored in logs or shown to others.
Hallucination (AI)
A hallucination is output from an AI model that sounds fluent and confident but is false, unsupported by its sources or made up, such as an invented citation, quote, statistic or API function.
Jailbreak (LLM)
A jailbreak is a prompt or technique that gets a language model to produce output its safety training is meant to refuse, such as harmful instructions, by role-play, obfuscation, odd encodings or long adversarial text.
AI red teaming
AI red teaming is the practice of deliberately attacking a model or AI application before and after release, with human testers or automated tools, to find harmful outputs, jailbreaks, injections and other failures so they can be fixed.

Sources