Automation and AI

Guardrails

Also called Safety rails, constraints, AI policy controls

Deliberate limits on what a model may say, send or change, enforced by prompts, output checks and permissions.

Quick facts: Guardrails

Category
Automation and AI
Also called
Safety rails, constraints, AI policy controls
Level
Intermediate
Affects
Brand safety, compliance risk, how much review is needed
Where to see it
System prompt settings, workflow conditions in n8n or Make, provider content filters, approval steps
In this article4
  1. How guardrails work
  2. Why guardrails matter
  3. Where guardrails go wrong
  4. Getting it right

How guardrails work

A guardrail is any deliberate constraint placed around a model so that its output stays inside what you are willing to publish or act on. They sit in three places, and a serious setup uses all three.

Before the model runs, instructions in the system prompt tell it what it is for, what it must refuse, and what it must never claim. After the model runs, checks inspect the output: does it match the required format, does it contain a phone number it should not, does it mention a competitor, is it too long for the field it is going into. Around the whole thing sit permission limits, deciding which systems the model may touch at all and whether a person has to approve anything before it leaves the building.

The last kind is the strongest, because it does not rely on the model behaving. A model that has no ability to send an email cannot send a bad one.

Why guardrails matter

Marketing output is public and often legally binding. A model that invents a discount, promises a delivery date, states a medical outcome or answers a refund question with something your policy does not say has created a real problem, and no amount of apologising afterwards unpublishes it. Regulated work — clinics, education consultancies, remittance and finance — carries the additional risk that a careless sentence breaches an advertising rule.

Guardrails are also what makes automation worth doing. If every output has to be read line by line before use, the time saved is small. Trustworthy limits are what let you review by exception instead of reviewing everything.

Where guardrails go wrong

The most common failure is treating the prompt as the whole defence. Instructions in a prompt are strong suggestions, not enforcement; unusual input, a long conversation or a deliberate attempt to talk the model round can all push past them. Anything that genuinely must not happen belongs in code or in permissions, not in a sentence.

The second failure is the opposite: guardrails so tight that the system refuses ordinary requests, which trains staff to bypass it entirely. The third is having no log. If you cannot see what the system was asked and what it answered, you cannot tell whether a guardrail held.

Getting it right

Write down the handful of outcomes that would actually hurt — a false claim about price, a promise you cannot keep, customer data leaving the system, a message sent to the wrong list. Enforce those in code and in access rights, and use the prompt for tone and preference. Keep a person in the loop wherever the output is irreversible, log every request and response, and re-test the limits whenever you change the model or the prompt, because a guardrail proved once is not proved forever.

Do and do not

Do

  • Enforce the serious limits in code, not prompts
  • Log every request and every response
  • Re-test limits after any prompt or model change

Do not

  • Give an AI tool access it does not need
  • Let a model publish anything irreversible unreviewed
  • Set rules so tight staff work around them

Questions people ask about this

Is a good prompt enough to keep an AI tool safe?

No. A prompt shapes behaviour but does not enforce it, and long conversations or unusual input can push a model past its instructions. Anything that must never happen should be blocked by code or by permissions instead: if the tool has no access to your customer list, no wording in a prompt can make it email that list.

Who should approve AI-written content before it goes out?

Someone who would be accountable if it were wrong. In practice that means the person who owns the claim: whoever signs off pricing checks anything about price, and whoever owns compliance checks regulated wording. Reviewing everything defeats the point of automating, so agree which categories go straight out and which always stop for a human.

How do I know a guardrail is actually working?

Test it on purpose and keep the evidence. Write a short list of requests that ought to be refused or corrected, run them whenever the model, the prompt or the workflow changes, and record what came back. Logging every request and response matters just as much, because without it you cannot tell whether a limit held or was never reached.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.