Skip to main content

AI glossary Responsibility

What are AI guardrails?

← All glossary terms
In short

Runtime controls and policies that check what goes into and comes out of an AI model, to keep its behaviour safe, on topic and within the rules.

Explained

AI guardrails are the controls placed around a language model, not inside it, that decide what it may receive, say and do. They combine classifiers that flag harmful or off-topic content, allow and deny lists, structured output schemas, checks on tool calls and escalation to a person when the system is unsure. They work at runtime, between the user and the model, so they can be changed without retraining. They are essential in customer-facing assistants and regulated workflows, where one bad answer has a real cost.

Types of guardrails

  • Input guardrails: detect prompt injection, jailbreak attempts, personal data or requests outside the assistant's scope before they reach the model.
  • Output guardrails: check the answer for harmful content, leaked data, unsupported claims or a broken format before it reaches the user.
  • Topical guardrails: keep the conversation within the use case, for example a bank assistant that declines medical advice.
  • Action guardrails: limit which tools an agent may call, with which parameters, and which actions need human approval.

How they work

Most guardrails run as a layer between the application and the model. Some are rules (regular expressions, lists, schemas). Others are models themselves: smaller classifiers or safety models that label a prompt or a response against a policy, such as Meta's Llama Guard. Toolkits such as NVIDIA's NeMo Guardrails let teams define these rails as configuration that sits outside the main model.

Because they are separate from the model, the same guardrails can protect several models and can be tested and versioned on their own.

Designing them well

  • Start from the real risks of the use case, not from a generic list.
  • Measure both sides: harmful outputs that get through and useful answers that are blocked.
  • Keep a clear path to a person when a guardrail fires on a sensitive case.
  • Log every intervention, so that policies can be reviewed and audited.
  • Treat guardrails as one layer; they do not replace good permissions, data access control or evaluation.

Frequently asked questions

What is an example of an AI guardrail?

A customer service assistant that checks each answer before sending it: it removes any card numbers, blocks advice outside its remit and hands the conversation to an agent when the customer reports fraud. Each of those checks is a guardrail.

Are guardrails the same as alignment?

No. Alignment is built into the model during training, so that it tends to behave as intended. Guardrails are external controls applied at runtime. Production systems usually need both, because no model is perfectly aligned for every use case.

Do guardrails stop prompt injection?

They help, by detecting known attack patterns and limiting what the model can do if it is manipulated. They do not stop it entirely, because new attacks keep appearing. Limiting the agent's permissions is the strongest defence.

Do guardrails make AI slower?

Each check adds some latency, especially when it uses another model. The cost depends on how many checks run and whether they run in parallel. Teams usually keep light checks on every message and heavier ones only where the risk justifies them.

Which tools are used to build AI guardrails?

Common options include open-source toolkits such as NVIDIA NeMo Guardrails, safety classifiers such as Llama Guard, the moderation and safety features of cloud AI platforms and custom rules in the application. Many teams combine several.

Decision guides that use this term

How to put it to work

Where it shows up at Thinkia

Further reading

Sources

Updated: 2026-10-21

Want to see how this applies to your organisation?

Talk to an AI Expert