A/CAlienCodeStart a project

The 80% demo and the 97% requirement

A ten-step agent that is 95% reliable per step finishes correctly about 60% of the time. The math of compounding errors, and the architectural moves that close the gap without waiting for a better model.

  • agents
  • reliability

The demo went well. The agent read the customer email, looked up the order, checked the return policy, drafted a reply and issued the refund. Leadership saw it work five times in a row and asked the obvious question: when can we ship it?

The honest answer is usually “not as designed”, and the reason is arithmetic, not model quality. Multi-step AI systems fail in a way that single-call systems do not: small per-step error rates multiply. A system that looks 95% good at every step can be wrong four times in ten end to end.

This is the most common gap I see between AI pilots and production, and it is the most fixable. Closing it is an architecture decision, not a procurement decision.

Errors compound

If each step of a workflow succeeds independently with probability p, a workflow of n steps succeeds with probability pⁿ. That exponent is what kills agent projects.

0%25%50%75%100%requirement 97%99% / step95% / step90% / step123581015
Fig. 1 — end-to-end success rate by number of steps, at three per-step reliabilitiespⁿ, independent steps

Read the chart from the requirement line down. Even at 99% per step, which is very good for a step that involves judgment, you drop below 97% after three steps. At 95% per step, a ten-step agent is a coin flip with slightly better odds. Real steps are not fully independent, and errors sometimes cancel out, but in practice correlation makes things worse more often than better: a misread customer intent in step one poisons every step after it.11This is why “the model is 95% accurate” is a meaningless statement for an agent. Accurate at which step, on which inputs?

A multi-step agent does not have one error rate. It has one per step, and they multiply.

Why demos lie

Nobody fakes a demo on purpose. Demos mislead structurally, for three reasons.

  • The inputs are the happy path. The demo email is clear, the order exists, the policy applies cleanly. Production brings the email in two languages, the order split across three shipments and the customer who is also a reseller.
  • The sample is tiny. Five successes in a row are consistent with a 60% success rate about 8% of the time. Teams celebrate on samples that cannot distinguish a good system from a mediocre one.
  • A human is silently in the loop. The engineer running the demo rephrases, retries and picks the run that worked. That person is not shipping with the product.

The fix is cheap: before anyone sees a demo, run the system on a few hundred real, unselected cases and report the end-to-end success rate with a confidence interval. If the team cannot assemble those cases, the project has a data problem, not a model problem.

Closing the gap: from 60% to 97% with the same model

Waiting for a better model is a strategy, but a slow one. These architectural moves work today. The worked example starts from the ten-step agent at 95% per step: 60% end to end.

1. Check every step, and retry what fails the check

Add a verifier after each step: a schema check, a business rule, a lookup against the system of record, or a second model call for judgment steps. Suppose the verifier catches 80% of errors and a retry succeeds 95% of the time. Effective step reliability rises from 95% to about 98.8%, and the ten-step agent goes from 60% to about 89%. A silent error became a visible, recoverable one.

2. Remove steps that do not need judgment

Most agent workflows include steps that are pure plumbing: fetch the order, format the reply, call the refund API. Those should be ordinary code, which is effectively 100% reliable. If half the steps are plumbing, the agent now makes five judgment calls instead of ten, and end-to-end success with verification climbs to about 94%.

3. Route the common cases down a deterministic path

In most business processes a large share of cases are routine. If 60% of requests are simple returns that a fixed workflow handles at 99.5%, and the agent only takes the remaining 40%, the blended success rate is about 97%. The model is now reserved for the cases that need it.

DesignAgent stepsStep reliabilityEnd to end
Original agent1095%60%
+ verify and retry each step1098.8%89%
+ plumbing moved to code598.8%94%
+ routine cases on a fixed path (60% of traffic)5 (40% of traffic)98.8%97%
Fig. 2 — the same model, four architecturesworked example

4. Put the human where the uncertainty is

The remaining errors are concentrated in ambiguous cases. Rather than reviewing everything, have the system hand off when its verifiers disagree or its confidence is low. A 5% handoff rate on the hardest cases is affordable; reviewing 100% of output is not, and it defeats the point.

97% of what?

The requirement deserves as much scrutiny as the system. “97% accurate” is not a requirement until you say which errors count. A reply that is correct but clumsy is a different failure from a refund issued to the wrong customer. One costs a little goodwill; the other costs money and possibly a regulator’s attention.

Set targets per error class, in proportion to what each error costs: perhaps 99.9% on irreversible actions such as payments, 97% on customer-visible content, 90% on internal drafts a person edits anyway. A system that meets three honest targets is far easier to ship than one chasing a single number nobody can define.

Questions to ask before you approve the rollout

  1. What is the end-to-end success rate on a few hundred unselected real cases, and what is the confidence interval?
  2. How many steps involve model judgment, and which could be code?
  3. What checks run after each step, and what happens when one fails?
  4. Which share of cases could take a deterministic path, and has anyone measured it?
  5. What are the targets per error class, and which actions are irreversible?

If the team has crisp answers, the gap between demo and production is an engineering plan. If it does not, you have just saved the cost of a failed rollout.

You have an agent or multi-step AI workflow that demos well and struggles on real traffic, or you are about to commit a budget to scale one.

In a Strategy & Architecture Audit we map the steps, measure where reliability is lost and design the verification, routing and handoff that get you to your target.

Start a project
  1. Assumes independent steps. Correlated errors usually make the end-to-end figure worse, which strengthens the case for verification.
  2. Five consecutive successes at a true 60% success rate: 0.6⁵ ≈ 7.8%.

Danilo Panaro Engineer and CEO

Danilo Panaro is an engineer and the CEO of AlienCode. He writes about building AI and software systems that hold up in production, and about the business decisions behind them.

jr3.it

All posts
Kill it in two weeks: the feasibility questions that matterYour AI unit cost is not the token price