AI Glossary Term

What does “Guardrails” mean?

Definition

Rules, checks, and controls that limit unsafe or undesired model behavior.

How Guardrails works

Diagram for Guardrails, steps in order: User request; then Input check: block unsafe asks; then Model generates; then Output check: filter or rewrite; then Safe reply.User requestInput check: block unsafe asksModel generatesOutput check: filter or rewriteSafe reply

Example

A bank's assistant is set up so it will not reveal other customers' data and will refuse to give legal advice. One check screens the request before it reaches the model, and another screens the draft reply before the customer sees it.

Why it matters

Models can be steered into harmful or off-topic output. Guardrails add layers of control around them, though none is perfect.

Common questions

Where do guardrails sit?

Before the model, as input checks; inside it, via training and system prompts; and after it, as output filters.

Can guardrails be bypassed?

Sometimes. Jailbreak and prompt-injection attacks try to get around them, which is why layered defenses and testing are used.

Do guardrails make a model less useful?

They can, if too strict, by refusing legitimate requests. Teams tune them to balance safety and helpfulness.

Learn more in our free guides

Test yourself

See also