AI architecture

Updated 4 min read

AI Guardrails: Decide What the Model Is Allowed to Do

A model can sound convincing and still make the wrong decision. The real question is what happens after that decision reaches a database, a customer or a payment system.

Imagine an AI assistant working with supplier invoices. It spots a change in bank details, interprets the accompanying message as a routine update and suggests moving ahead. Perhaps the change is legitimate. Perhaps it is not. The assistant's confidence does not settle the question.

Now give the same assistant permission to update the supplier record and approve the payment. We have changed the risk without necessarily changing the model at all.

That is where AI guardrails become an architectural issue. They define what the system is allowed to do when the model is wrong, manipulated or simply uncertain.

The failure is not always a spectacular jailbreak

When people discuss AI safety, they often picture someone deliberately trying to defeat a system prompt. That risk exists, but ordinary misunderstandings deserve equal attention. An agent can select the wrong customer, confuse an old document with a current policy or misread a request that sounds perfectly reasonable.

A better prompt may reduce mistakes. It cannot enforce a transaction limit, revoke database access or prove that the person asking for an action has authority to request it.

I would treat instructions to the model as one part of the design, not as the final control. The controls that matter most should still work when the model ignores them.

Draw the boundary around consequences

Start with the consequences rather than a list of fashionable guardrail tools. What could the assistant do that would be difficult to undo?

Reading public product documentation is one level of risk. Sending a message in the company's name is another. Changing an account balance, deleting customer data or approving a transfer belongs in a different category again.

That distinction suggests several controls: only the data needed for the current task should be available; tools should enforce permissions independently; sensitive changes may require human approval; spending and usage need limits; and executed actions need an audit trail.

The point is not to route every answer through a manager. It is to decide which outcomes require a second decision-maker, even if the AI appears confident.

A useful guardrail survives a bad model response

Suppose an agent is allowed to prepare refunds, but anything above an agreed limit needs approval. The application should check the amount before calling the payment tool. Asking the model to remember the limit in every answer is not a substitute.

The same applies to identity. An agent helping one employee should not suddenly obtain access to another team's confidential records. That is an authorization rule for the system handling the tool call. I discuss this boundary separately in AI Tool Permissions.

For incoming documents, assume that some text may be untrusted. A document can contain instructions that look like part of the task but are actually attempts to redirect the assistant. Isolation of data and instructions matters here; see Prompt Injection Defense.

Some checks belong after the model's answer: validating output structure, checking business rules, detecting a request for an unsupported action. But validation should have an explicit failure path. Quietly accepting an invalid result defeats the purpose of adding the check.

Approval is a product decision

Human review is often proposed as the safe option. It can be, provided the reviewer sees enough context to make a real decision.

A confirmation button that says only “AI wants to proceed” transfers liability without transferring understanding. The person needs to see the intended action, affected records, relevant evidence and what cannot be rolled back.

Review also costs time. If a workflow creates hundreds of low-risk approval requests, people will learn to click through them. It is better to distinguish routine actions from exceptions and give the exceptions a meaningful review.

This is why guardrails should be designed together with the business process, not bolted on by the AI team after launch.

Measure the controls, not just the model

Teams often track answer quality while overlooking what happens when a policy blocks an action. How often does that happen? Are the blocks justified? Do users have a sensible route to complete their work? Which decisions still need manual intervention?

Too many false positives can make a useful product unusable. Too few controls create another problem: the first serious incident becomes the moment the organization discovers how much authority it handed over.

Before expanding autonomy, I would want evidence that permissions are enforced, sensitive actions are traceable and the recovery procedure works. Model evaluations help, but they do not replace those checks. The related question of testing AI behaviour is covered in AI Evaluation.

Good guardrails are rarely visible in a successful demo. Their value shows up in the mistake that stops at the right boundary instead of travelling through the rest of the company.