Stop Blaming the Fuel: Harnessing the Power of AI

The complaints about AI-assisted software development have settled into a familiar list. The model produces bloated code. It ignores the conventions of the codebase. It fixes one thing and quietly undoes another that it finished an hour ago. It is, people conclude, unpredictable.

I think that diagnosis points at the wrong component. AI isn’t that unpredictable. The engineering process around it usually is.

The Same Fuel, Two Outcomes

Pour petrol over an engine and ignite it. You get fire, chaos, and wasted energy.

Put the same petrol inside a combustion chamber, control the ignition, constrain the explosion, and you get something extraordinary: a powerful, smooth-running engine.

The fuel has not changed between those two scenes. What changed is everything around it. In the first case the energy goes wherever it likes. In the second, the cylinder walls decide where the force can go, the timing decides when it is released, and the crankshaft turns a violent event into rotation you can use.

A great deal of AI usage today looks like the first scene. A vague prompt is thrown at a probabilistic system, a deterministic result is expected, and the model is blamed when the result is not what was wanted. The irony is that the people asking most loudly for predictable AI are often the ones who have skipped the engineering that makes any outcome predictable.

How can a model deliver on expectations that were never written down? And how can it correct course when nothing in the system tells it that it has gone wrong?

Unpredictable Components, Predictable Outcomes

The point most easily missed is this: unpredictable components do not have to produce unpredictable outcomes.

Engineering has relied on that idea for a long time. Reliable data transfer is built on top of networks that drop and reorder packets. Durable storage is built from disks that are expected to fail. Nobody made the packet or the disk dependable. The dependability was designed into the system that surrounds them.

An engine is the same kind of achievement. No single combustion event is a tidy, controllable thing. It is an explosion. The engine works because the explosion happens inside a structure that is indifferent to its untidiness.

Foundation models belong in this category of component. They drift. They fail in ways that are not proportional to the size of the task. Occasionally they produce a hallucination that arrives like a lightning strike, with no warning and no obvious cause. These are properties of the fuel, and I do not expect them to disappear.

So the goal cannot be to make the model deterministic. The goal is to place it inside a system whose results are verifiable and repeatable even when an individual step misfires.

Why Patching the Prompt Is a Losing Game

The common response to a misbehaving model is to add another sentence to the prompt. The model touched a file it should not have, so a line is added telling it not to. It skipped the tests, so another line is added. Over time the prompt becomes a pile of if/else heuristics written in prose, each one a scar from a previous incident.

This is brittle for a simple reason. An instruction in a prompt is a request, and a probabilistic system honours requests probabilistically. Each new rule also competes for attention with every rule before it. You are trying to change the chemistry of the petrol when what you lack is a cylinder wall.

A constraint that lives outside the model behaves differently. A permission the agent does not hold cannot be exercised, however the prompt is read. A test that fails, fails. These things do not depend on the model’s cooperation, which is exactly why they are worth building.

What the Harness Is Made Of

By harness I mean the engineered system around the model that turns its output into something you can rely on. In my view it has four parts, and they are the four pieces of hard work that tend to get skipped.

Stated expectations and boundaries. Before anything else, the expectations have to exist somewhere other than in someone’s head. What is in scope, what must never change, which conventions apply, and which invariants in the system’s state have to hold before and after the work. A model working without these is not disobeying the standard. It was never given one.

Deterministic verification. Tests, schemas, type checks, and gates that return the same answer every time they are asked. This is where the probabilistic part of the system meets the deterministic part. The model can propose anything it likes. Only what passes the gate moves forward.

Controlled permissions and execution. Hard limits on what the model can read, write, run, and deploy. This is the cylinder wall. Its job is not to prevent the misfire but to contain the blast radius when one happens, so a bad step costs a rejected change and not a damaged system.

Feedback loops, graceful failure, and escalation. A route by which the result of verification returns to the model as a correction, a sensible behaviour for when correction does not converge, and a defined point at which a human is brought in.

pass

fail: error returned as correction

repeated failure

Stated expectations

boundaries and invariants

Model proposes a change

(probabilistic)

Controlled execution

limited permissions

Deterministic verification

tests, schemas, gates

Accepted outcome

Human escalation

The model is the only probabilistic box in that diagram. Everything else is ordinary, deterministic engineering, and the outcome inherits its reliability from those parts.

The Negative Feedback Loop

Of the four, the feedback loop is the one I see missing most often, and it explains the most common complaints.

A negative feedback loop measures the difference between what was wanted and what was produced, and feeds that difference back so the next attempt reduces it. Engines depend on this. A modern petrol engine measures the oxygen in its own exhaust and continuously adjusts the fuel mixture in response. It does not assume the last combustion went well. It checks, and corrects.

Now consider a model that “undoes what it has already done”. In most cases nothing in the system recorded that the earlier work was a requirement worth protecting. Had it been captured as a test, the regression would have failed the gate and come straight back to the model as an error to fix. Without that signal the model has no means of knowing it broke anything, and neither does anyone else until much later.

Code bloat follows the same pattern. If nothing measures and rejects it, there is no pressure against it. The loop is open, and an open loop drifts.

Where the Analogy Stops

The engine analogy has a limit that is worth stating. Petrol is consistent, and a misfire in an engine is a physical event that is easy to detect. A model’s misfire is often semantic. The code compiles, reads well, and is wrong. Containment alone does not catch that.

This makes verification more important for AI than the analogy suggests, not less. It also means the harness is only as good as its gates. A model can satisfy a weak test without satisfying the intent behind it, so the tests and schemas themselves need the same care as any other part of the system. A harness reduces the need for trust. It does not remove the need for judgement.

The Cost of Skipping It

The usual reason for skipping this work is speed. The model can produce a feature in minutes, so stopping to define boundaries and build verification feels like friction.

I think that is a false economy. Skipping the upfront engineering does not save time. It manufactures technical debt at ten times the speed. A model generates code far faster than a team can review it, so when the output is unverified, the debt accumulates at the model’s pace and is discovered at the human’s.

This is why I prefer to think of AI as a power tool and not an autopilot. A power tool multiplies the effort of someone who knows what they are building and has set up the workpiece properly. It also multiplies the damage when they have not.

The Discipline Was Always the Point

None of the four parts of the harness is new. Clear requirements, automated tests, least-privilege access, and feedback loops were good practice long before language models arrived. Teams could neglect some of them because human developers work slowly enough, and carry enough context in their heads, to compensate.

AI removes that cushion. It does not replace engineering discipline. It exposes the absence of it.

So before concluding that the model is unreliable, I would ask a different question about any team shipping with AI: are the biggest headaches really coming from the model, or from the guardrails that were never built around it?

Stop blaming the fuel for the fire. Start building the engine.