Skip to content
Xavi Creus

AI

Guardrails

Guardrails are the rules, filters and checks placed around an AI system to keep its inputs and outputs safe, on topic, compliant and within policy.

Definition

Guardrails are the controls placed around an AI system to keep its behaviour within acceptable limits. They include filters that block harmful or off-topic requests, checks that validate outputs before they reach a user, rules that restrict which tools an agent can call and with what limits, and detectors for personal data, prompt injection or policy violations. Guardrails sit outside the model, in code, so they hold even when the model misbehaves.

In a company, guardrails are what let you put AI in front of customers without lying awake. A banking assistant has guardrails that stop it giving investment advice, mask account numbers in logs, and refuse to discuss anything beyond banking. An agent that issues refunds has a cap per transaction and a mandatory human approval above it. Guardrails are usually layered: system prompt instructions first, then automated checks, then human review for high-risk cases.

Guardrails have matured from simple keyword blocklists to dedicated classifier models and policy engines, and regulation such as the EU AI Act makes documented controls a compliance requirement for many use cases. The misconception is that guardrails are only about safety. They are also about brand, legal exposure and cost control. A well-guarded system is a more predictable one, which is what makes it deployable.

In practice

A retailer's shopping assistant has guardrails that block it from promising delivery dates, quoting prices not in the catalogue tool, or responding to competitor comparisons, and that route any complaint mentioning legal action straight to a person.

Why it matters

Guardrails are how you decide, in advance, what your AI will never do. They translate policy into enforced behaviour and are the difference between a controlled deployment and a public incident.

Frequently asked questions

What are AI guardrails?
AI guardrails are technical and procedural controls that keep an AI system within defined boundaries: filtering inputs, validating outputs, restricting tools and permissions, detecting sensitive data and escalating risky cases to humans. They work alongside the model rather than relying on it to police itself.
Are system prompt instructions enough as guardrails?
No. Instructions in the prompt help but can be bypassed by clever inputs. Real guardrails are enforced in code: permission checks, output validation, spending limits and human approval steps. Use the prompt for guidance and the application layer for enforcement.

Need this explained for your company?

One hour with me is usually enough to turn the vocabulary into a decision.

Book a session