Build the business around a deterministic system, and let a model in only at the steps a rule can't reach. Code does the same thing every time, costs almost nothing to run, and you can read it. A model does none of that reliably, so it earns a seat only where it measurably outperforms the code, on an ROI basis, for that specific job.
Many "AI problems" are just problems
Before we reach for a model, we ask what the job would look like with no AI at all. Often the honest answer is a lookup table, a SQL query, a regex, or a state machine. If you can write the rule down, write the rule down.
A hard-coded for loop or if-else statement doesn't hallucinate. (We mean the deterministic basics you learn in your first coding class: the same input gives the same output every time. Not the loops AI agents run, which call a model each time around.) It doesn't cost a fraction of a cent per call. It doesn't change its mind on Tuesday. Determinism isn't a limitation you settle for. It's a feature you should want.
Why not depend on the models
When a model is in the path, it is never free, even on a free tier. What the models can't replace named the three costs: tokens, latency, and trust. Each one is a reason to move a step back to code.
- Tokens. A model bills by the token, a small piece of a word. Every step you move to code is tokens you stop paying for, and that is the simplest kind of token optimization.
- Latency. Latency is the wait for an answer. A model call takes far longer than a function call.
- Trust. A model can give a different answer to the same input, so something has to check its work.
Many teams underprice the third one. A demo that is right nine times out of ten feels finished. In production, that is one wrong answer in ten, and you can't tell in advance which one.
What else the code keeps for you
- Your data. A step written in code runs where you put it, and the data doesn't have to go anywhere else. A call to a hosted model sends some of it to another company's servers, under their terms. A model that reads an email or an uploaded file can also be steered by the words inside it. A regex can't.
- Your uptime. A business built on one provider's model stops when that provider does: a data center outage, a rate limit, a price change, a model retired on their schedule. A deterministic core keeps running, as much of it as possible on machines you control. The model steps wait in a queue, or go to a person, until the model is back.
- Your independence. AI companies now sit in the middle of politics. A model's access, price or rules can change because of a deal, a dispute or a new law between its company and a government, and none of it is your call. Code you own runs the same whatever happens between AI CEOs and politicians.
- Your tests. A code step gets a test with one right answer: the same input, the same output, today and next year. A model step needs an eval, a set of examples scored as a rate, run again every time the prompt or the model changes. Every step you move to code is one less thing to eval, and the code steps can grade the model steps.
- Your record. When code makes a decision, you can point to the line that made it, and the same input gets the same decision next year. A model's explanation of its own answer is another output, not a record of how it got there. That difference matters wherever a decision has to be explained to a customer or an auditor.
- Your fixes. When a code step fails, you can run the same input again, watch it fail and fix it for good. A model's mistake often won't repeat on demand, so it's hard to know the fix worked.
- Your costs as you grow. A code step costs almost nothing per run, whether it runs a hundred times or a million. A model step is billed on every call, so its cost grows with your volume.
- Your choice of model. If a model sits only at the steps that need one, behind a check, a better or cheaper model is a swap at those steps and nothing else changes. When a business's logic lives inside one model's prompts, a model change can mean testing all of it again.
It gets more deterministic over time
Order the checks like a waterfall: an exact rule first, then a fuzzy match, then the rules you've learned, and the model last, for whatever falls through. When a person approves what the model decided, that decision becomes a new rule. The next time the same case comes in, code handles it. The longer the system runs, the fewer cases reach the model. More on that loop in The deterministic flywheel, coming soon.
Where AI fits in a ten-step process
Take a ten-step intake process, one example of many:
- Read intake
- Check fields
- Look up account
- Read messy PDF
- Validate
- Queue
- Notify owner
- Log
- Draft reply
- Send, approved
Eight steps are code. Two are genuinely fuzzy: reading the messy PDF and drafting the reply. Those two earn a model, and each sits behind a check. The validation step checks what the model read, and a person approves what it wrote. The craft is drawing that line honestly.

The harness
"Harness" is the word of the moment in AI. Labs, tool makers and engineers use it for the code around a model: the part that gives the model the right context, lets it use only the tools it's allowed, checks what comes back, and decides what happens next. People now compare harnesses, not just models, because the same model can do very different work inside a different harness.
The idea isn't new, and neither is the word. Builders have long put structure around work that can go wrong: scaffolding around a building while it goes up, guardrails along a road, rails under a train, a harness on a horse. Software is full of them. A form checks an email address before it saves it. A checkout asks you to confirm before it charges your card. A nightly job writes a log and alerts someone when it fails. Engineers have called the code that runs and checks a program a "test harness" for decades. AI just gave everyone a reason to name it again.
So the harness is the deterministic system, and the model is a sharp tool inside it. You don't build an AI system with some guardrails. You build a deterministic system that calls a model only where it earns its keep, and checks what comes back.
You can only trust a model's output once something has checked it, and most of that checking is deterministic logic. Once you accept that, the architecture inverts, and the model is never the structure itself.
The test
Where does AI earn its place? At the edges a rule can't reach: unstructured language, fuzzy matching where the variations never sit still, and pulling structure out of a thousand differently formatted documents. The test is plain: does AI measurably outperform the deterministic alternative, on an ROI basis, for this job? Not "could it." Does it, here, by enough to justify the cost.
If yes, it's in. If it's a wash, the boring option wins: it costs less and breaks less. Drawing that line, step by step and with a cost on each step, is part of what the Value Creation Audit does.