Contents
The Question People Ask Backwards
The usual framing is "could an AI agent do this?" It is the wrong question, because the answer is almost always yes and it tells you nothing. A modern model can be prompted to do arithmetic, to route a ticket, to collect a postcode, to decide whether a number is above a threshold. It will mostly get them right. That is exactly the problem: mostly is a downgrade from a rule that gets them right every time, and you are paying per token for the privilege.
The right question is narrower. Does this step require judgement about inputs I cannot enumerate in advance? If you can write down the inputs and the correct output for each one, you have a specification, and specifications belong in code. If you cannot - because the input is free text, a photo, a messy human intention, a case that does not fit the categories - then you have genuine ambiguity, and that is where a model earns its cost.
This is not an anti-AI argument. It is the argument that makes the AI part work. Every model call you remove from a workflow makes the remaining ones cheaper, faster, easier to test and easier to explain when someone asks why the system did what it did. The teams whose automations hold up over time are the ones who put the model in one place and let deterministic code do the rest.
This post is about how to tell which is which, before you build. It pairs with the mistakes businesses make with AI agents, which covers what goes wrong after you have committed, and with what an agent costs to run each month, which is the other half of the case for keeping the model surface small.
The Five-Question Test
Run each candidate step - not the whole workflow, each step - through these five. Any single "no" is a strong signal that a rule, a query, a form or a scheduled job beats an AI agent.
1. Can you enumerate the correct output for every input you expect?
If a spreadsheet of input-to-output pairs would be complete, you do not have a judgement problem, you have a lookup table. Lookup tables want to be lookup tables. "If the order value is over £500, route to the senior rep" is a rule. "Read this email and work out whether the customer is angry enough to escalate" is not.
2. Is the input structured, or does it arrive as free text?
Structured input - a form submission, a webhook payload, a database row, a CSV - has already been through the interpretation step. Handing structured data to a model to reason about is paying twice for work that has been done. Free text, transcripts, scanned documents, images and open-ended human requests are the genuine use case, because interpretation is exactly the thing that has not happened yet.
3. Does the answer need to be identical every time?
LLMs are probabilistic. The same input can produce a different output, and even with sampling pinned down, a model or prompt version change shifts behaviour. If the process requires that the same input always produces the same result - pricing, tax, entitlement, compliance decisions, anything that gets audited - a probabilistic step is a poor structural fit regardless of how accurate it is on average. See temperature for why "just set it to zero" is not a full answer.
4. What is your latency budget?
A rule executes in single-digit milliseconds. A model call is a network round trip plus generation time, and an agent loop is several of them in sequence. If the step sits inside something with a hard latency budget - a real-time decision, a page render, a phone call where a pause reads as a hang-up - the model has to be doing something no rule can do to earn that delay.
5. What happens when this step is wrong?
This is the one that decides it. A rule that breaks throws an error: a null, an exception, a failed run, something a monitor catches. A model that is wrong returns a confident, well-formed, entirely plausible answer that passes every schema check and flows downstream unnoticed. If a silent wrong answer at this step is expensive, either the step should be deterministic or it needs a checking layer around it - which is more engineering than the rule you were avoiding.
Note what is not on this list: how impressive the task looks, and how much data is involved. Volume is an argument for automation, not specifically for an LLM. A million rows of structured data is a job for a query.
Four Shapes Where a Rule Wins Outright
1. Arithmetic, lookups and thresholds
Totals, tax, discounts, date maths, "is this over the limit", "how many days since". A model will be right most of the time and wrong occasionally, and you will not know which time was which because the output looks the same either way. This is the purest example of the failure-mode problem: a formula that breaks is loud, and a model that miscalculates is silent. Put arithmetic in a formula, a database query or a code step. If the model needs the answer, give it the computed number as an input rather than asking it to derive one.
2. Fixed-path routing
"Enquiries from the contact form go to sales, invoices go to accounts, anything mentioning cancellation goes to retention." If the routing table is finite and the trigger is a structured field, this is a switch statement. Where routing genuinely needs a model is when the categories overlap, the input is free text, and a human currently reads it before deciding. A useful test: if you can write the routing rules on one page and a new starter could apply them correctly on day one, you do not need a model to apply them either.
3. Structured data collection
This is the most common and most expensive misuse. Somebody replaces a booking form with a chat interface, and now: the user supplies fields in an unexpected order, the model misparses a date format, the confirmation loop takes six turns instead of one screen, and the user cannot see what they have already entered. A form shows every field at once, validates as you type, supports autofill, is accessible by default and physically cannot hallucinate a value. A conversation collecting the same fields adds failure modes that did not need to exist.
Conversation earns its place in two situations: when the user genuinely does not know what to ask for and needs help narrowing down, and when the input arrives conversationally anyway because it came in over the phone or by text. If the user already knows what they want and just needs to tell you five things, give them five boxes.
4. Anything with a sub-second latency budget
Fraud checks at the point of payment, inventory decrements, access control, anything in a request path where the user is waiting. These are also usually cases where determinism matters, so they fail two tests at once.
There is a fifth honourable mention: anything a scheduled job already does fine. A nightly report, a sync between two systems, a reminder sent at a fixed interval. A cron trigger plus a template solves it, costs nothing per run, and never surprises anyone. We build plenty of these; they are not glamorous and they are among the most reliable things a business can own.
The Grey Zone: Where the Answer Is 'One Model Call'
Between "obviously a rule" and "obviously needs judgement" sits the majority of real work. The mistake here is not choosing wrongly between rule and agent - it is choosing an agent when a single model call would do.
An agent is a loop: the model decides what to do, calls a tool, reads the result, decides again. That loop is the right structure when the path genuinely cannot be known in advance. It is the wrong structure - expensive, slow, hard to test, hard to debug - when you already know the sequence of steps and just need one interpretive step inside it. Three tiers, in ascending order of cost and descending order of predictability:
| Structure | Use when | What you give up |
|---|---|---|
| Deterministic workflow | The path and the logic are both known | Nothing - this is the default |
| Deterministic workflow with one model call | The path is known; one step needs interpretation (classify this text, extract these fields, draft this reply) | Determinism at that one step only, which you can contain with a schema and a fallback |
| Agent loop | The model must discover the path as it goes, because the next action depends on what the last one returned in ways you cannot enumerate | Predictable cost, predictable latency, straightforward testing |
Most business automation lives in the middle row, and a lot of it gets built as the bottom row because that is what the demos look like. The middle row is where structured extraction shines: hand the model free text, get back a validated object, and let ordinary code take it from there. One call, one predictable cost, a schema you can assert against.
Two design rules make the middle row hold up:
- Constrain the output. Ask for a value from a fixed set, or a validated object, not prose you then have to parse. Anything the model can return that your code cannot handle is a bug waiting for a busy Tuesday.
- Give it a way to say "I don't know". Include an explicit "unclear" or "escalate" option and route that to a person. A model forced to pick from four categories will pick one, even when the right answer is a fifth thing you never thought of. That escape hatch converts a silent wrong answer into a visible exception, which is the whole game.
Regulated, Auditable and Irreversible Decisions
A separate category deserves its own heading because the test is different: some decisions are a poor fit for a probabilistic step not because the model is inaccurate, but because of what you are required to be able to say about the decision afterwards.
If a process has to be reproducible - same input, same output, demonstrably - or explainable to a regulator, an auditor or a court, a step whose behaviour changes between model versions is structurally awkward. Not impossible, but it puts the burden of proof on you, and the engineering to satisfy that burden (versioned prompts, complete decision logs, held-out test sets re-run on every change) is real work that has to be budgeted. We wrote about the logging and evaluation side of that in the agent evals guide and agent observability.
The safer pattern in these settings is to use the model where it does not decide anything: summarising a file for a human reviewer, drafting a document the human signs, surfacing the three cases that look unusual, extracting fields that a person then confirms. The model does the reading; the human and the rules do the deciding. That keeps the audit trail intact and still removes the bulk of the work.
The same logic applies to irreversible actions regardless of regulation. Sending money, deleting records, publishing publicly, emailing a customer list. The question is not "is the model good enough at this?" but "what does the wrong version of this action cost, and can we take it back?" Where the answer is "a lot" and "no", put a human in the loop at the point of action, not at the point of review afterwards. We cover the trust boundary in more depth in AI agent security and privacy.
A Worked Decomposition (Illustrative)
This is an illustrative example, not a client project. Take a request people bring often: "we want an AI agent to handle inbound enquiries."
Decomposed into steps, and run through the test:
| Step | Verdict | Why |
|---|---|---|
| Receive the enquiry from a form or inbox | Rule | A webhook or mailbox trigger. Nothing to interpret. |
| Deduplicate against existing contacts | Rule | A lookup on email or phone. Exact matching, and fuzzy matching is a library, not a model. |
| Read a free-text message and work out what they actually want | Model | Free text, cannot enumerate the inputs, a human currently reads it. This is the real job. |
| Score urgency from that classification plus order history | Rule | Once the intent is a structured value, urgency is arithmetic on fields. |
| Route to the right person or queue | Rule | Finite table, structured input. |
| Draft a first reply | Model | Generation from context. Draft only - a person sends it, at least until the quality is proven. |
| Log everything and update the CRM | Rule | Field writes. Deterministic, and it must be. |
| Send the reply | Rule + human | Outbound to a customer is the irreversible step. Gate it. |
Eight steps, two model calls, no agent loop. The result is faster than a loop, cheaper by an order of magnitude, and every step except two behaves identically every time. When it breaks, you know which step broke. When a stakeholder asks why enquiry 4,102 went to the wrong queue, you can point at a rule and fix it in a minute rather than re-tuning a prompt and hoping.
Compare that to the version where a single agent is handed all eight steps and a set of tools. It will often work. It will cost more per enquiry, take longer, occasionally skip a step, occasionally call a tool twice, and be difficult to explain. The agent version is genuinely better in one situation: when the eight steps are not actually eight steps, because the path varies so much per enquiry that no fixed sequence covers it. If that is your situation, build the loop. If it is not, do not pay for one.
How to Decide in Practice
A short procedure that works before anyone writes anything:
- Write the process out as steps, at the level of "one thing happens". Most people discover here that what they called one task is eleven.
- Mark each step R, M or H - rule, model, human. Be strict: a step is only M if you genuinely cannot enumerate the inputs.
- Count the Ms. Zero is a completely legitimate answer and means you want workflow automation, not an agent. One or two is the common and healthy case. Five or more means either the process is genuinely open-ended, or - more often - you have not decomposed it far enough.
- For each M, write the failure sentence: "if this step is wrong, then ___." If the blank is expensive and silent, add a schema, an "unclear" option and a route to a human before you build anything else.
- Only reach for an agent loop if the sequence itself is unknowable. If you can draw the flowchart, build the flowchart.
The honest summary is that a large share of what gets pitched as AI work is ordinary automation with one interpretive step in the middle, and it is better - cheaper, faster, more reliable, easier to hand over - when it is built that way. That is not a smaller project. It is the same outcome with less to go wrong.
If you want a second pair of eyes on which steps in your process are genuinely M, that is precisely what the free automation audit produces: your process broken into steps, with an honest mark against each one and a note where a rule beats a model. Our automation services page explains what happens if you then want it built and handed over, documentation and recurring plain-language report included. And if you are weighing this against hiring, the AI automation cost page covers the build and hire side while the build cost page covers a single scoped workflow.
FAQ
- How do I know if my workflow needs an AI agent or just automation?
- Break the process into individual steps and ask of each one: can I enumerate the correct output for every input I expect? If yes, that step is a rule - a formula, a lookup, a switch, a query. If no, because the input is free text or a document or an open-ended request that a person currently has to read and interpret, that step is a candidate for a model. Most business processes have zero, one or two genuinely interpretive steps and a long tail of deterministic ones. Build it that way round.
- Why not just use an LLM for everything since it can do all of it?
- Three reasons, and cost is the least important. It is slower, because every step is a network round trip instead of a millisecond of local logic. It is harder to test and explain, because a rule has a definition and a prompt has a behaviour. And its failure mode is worse: a rule that breaks throws a visible error, while a model that is wrong returns a confident, correctly formatted, plausible answer that passes your schema check and flows downstream unnoticed. That last one is what makes over-use of LLMs expensive in ways that never show up on the invoice.
- When is a form better than a chatbot?
- Whenever the user already knows what they want and simply needs to give you a known set of fields. A form shows every field at once, validates as you type, supports browser autofill, is accessible by default and cannot misparse a date. A conversation collecting the same fields introduces ordering problems, parsing errors and multi-turn confirmation loops that did not need to exist. Conversation earns its place when the user does not know what to ask for and needs help narrowing down, or when the input arrives conversationally anyway - over the phone, or by text.
- Can I use an AI agent for calculations if I tell it to be careful?
- You can, and it will usually be right, which is exactly the problem - you have no way to tell the right answers from the wrong ones without checking them, and if you are checking them you may as well have computed them. Arithmetic, date maths, thresholds and lookups belong in a formula, a code step or a database query. Where a model is involved, pass it the computed number as an input rather than asking it to derive one. This costs nothing and removes an entire class of silent error.
- What about compliance-heavy or regulated processes?
- The obstacle there is not accuracy, it is reproducibility and explainability. If you must be able to demonstrate that the same input produces the same decision, a step whose behaviour shifts between model versions puts the burden of proof on you - versioned prompts, complete decision logs, and a held-out test set re-run on every change. That is achievable but it is real engineering that has to be budgeted. The lower-friction pattern is to use the model where it does not decide: summarising for a reviewer, drafting for a signature, flagging unusual cases. The human and the rules keep the decision.
- Is an agent loop ever the right answer?
- Yes - when the sequence of actions genuinely cannot be known in advance, because the next step depends on what the last one returned in ways you cannot enumerate. Open-ended research, debugging, working through a codebase, handling a support conversation that could go anywhere. The test is simple: if you can draw the flowchart, build the flowchart. If every attempt at a flowchart ends in 'and then it depends', a loop is the right structure and the extra cost and latency are buying you something.
- How many model calls should a typical business workflow have?
- There is no rule, but the pattern worth aiming for is one interpretive call at each point where genuine ambiguity enters the system, with deterministic code either side. If your design has a model call at a step where the input is already structured, that call is doing work that has already been done. If it has ten calls because it is a loop, ask whether the path is truly unknowable or whether the loop is standing in for a flowchart nobody drew.
- Does using fewer model calls make the automation less capable?
- It makes it less flexible and more predictable, which is usually the trade you want in a business process. A deterministic workflow with one interpretive step handles exactly the cases you designed for and routes everything else to a person - a well-defined boundary you can staff around. An agent loop attempts everything, including cases nobody anticipated, and its behaviour on those is unknown until it happens. Flexibility is genuinely valuable where the work is open-ended; where the work is a repeatable process, predictability is worth more.
If this resonated
Module 02 is the long version of this post.
Eval set, refusal pattern, kill switch. Build it in a weekend.
