Richard Teachout // Teachout.com
← All writing

Testing AI Outputs the Way You Test Code

Richard Teachout
Richard Teachout CTO at Ashley Furniture Industries - Executive Tech Leader, Entrepreneur, AI leader, Architect, Problem Solver, Ex-Developer. October 26, 2026
AI
Testing AI Outputs the Way You Test Code

Software teams spent forty years learning how to ship changes safely. AI teams are re-learning it the hard way, one production surprise at a time.

The mental model is the problem. Traditional software testing often assumes a predictable result: run the tests, check the output, trust the results. AI outputs can vary, even with the same input. So teams do one of two things: they treat AI like conventional code and get burned, or they decide AI can't be tested and ship on faith.

Both are wrong. AI can be tested. It needs testing techniques that account for outputs that vary. Many of those techniques already exist in software delivery. The work is adapting them to AI.

Shadow mode: test before exposing users

Shadow mode lets you run a candidate alongside the current model, on the same live inputs, without letting the candidate's output reach the user.

The current model keeps serving. The candidate produces answers that go to an evaluation log, where they can be scored against your evaluation criteria. That gives you the comparison a demo can't: how the candidate performs on your real traffic, your real inputs, and your real edge cases.

For systems that take actions, shadow mode also means preventing the candidate from making changes. It can propose sending an email or updating a record. It cannot actually do either.

Run it long enough to cover a representative range of work. A week might be enough for one workflow. Another might need a month-end cycle before the comparison means anything.

Shadow mode gives you evidence before you expose users to the change.

Canary: release to a slice

The next step is a canary: ship the candidate to a small, controlled slice of traffic — five percent, ten percent — and watch.

Now the output reaches users, so the comparison moves beyond answer quality to operational results. Escalation rate. Override rate. Error flags. Cost per task. Are people getting better outcomes? Are they doing more cleanup? Is the improvement worth the cost?

The comparison needs comparable work. If the candidate gets the easy requests and the current model gets the difficult ones, the numbers won't tell you whether the change helped.

Decide what success looks like before the canary starts, including what triggers a rollback. If the candidate performs worse, pull it back while exposure is still limited.

The discipline is familiar: roll out small, measure the difference, decide with data.

Champion/challenger: keep the comparison alive

Champion/challenger makes comparison an ongoing practice. The current model is the champion. A candidate is the challenger, evaluated through shadow traffic or a controlled live allocation.

This is how you catch changes that happen between releases. Your inputs shift. Customer behavior changes. Business rules evolve. A model that worked well in January may perform poorly on the work arriving in June.

A standing comparison helps reveal when another candidate handles that work better. Promotion becomes a decision supported by evidence.

It also gives you a way to evaluate vendor updates. The vendor ships a new version and says it's better. That claim goes through your evaluation process. If the new version beats the champion on your work and meets your operating requirements, promote it. If it doesn't, the release announcement isn't a reason to switch.

The regression suite for outputs

Underneath all of this sits the regression suite: a maintained set of cases that every candidate must pass.

Start with your golden set — the representative examples you use to evaluate quality. Add the cases that exposed real failures, the edge cases that matter to customers, and the situations where a wrong answer carries a meaningful cost.

Because outputs can vary, passing doesn't always mean matching an exact sentence. It can mean getting the facts right, following the business rule, producing the required structure, or escalating when the system should not act.

For higher-risk cases, test repeatedly. One good answer doesn't establish reliability.

The suite gives you a consistent baseline across candidates. A candidate that improves the average while breaking a critical workflow has not earned a promotion.

Shadow mode shows how the candidate handles current traffic. The regression suite checks whether it still handles the cases you already know matter. You need both.

The ladder, in practice

The release sequence starts with the regression suite. If the candidate fails a required threshold, it stops there.

Next comes shadow mode on representative live traffic. Score the outputs, investigate the failures, and check whether the apparent improvement holds up outside the curated test set.

Then comes a controlled canary. Compare operational results against the current model, with clear thresholds for expanding the rollout or rolling it back.

If the candidate clears those gates, it can become the champion. Monitoring continues, and the next challenger goes through the same process.

That discipline should cover changes to prompts, retrieval, tools, and business rules too. Any of them can change the system's behavior, even when the model stays the same.

A regression suite underneath. Shadow before exposure. Canary before broad rollout. An ongoing comparison after release.

These techniques helped make software deployments routine. They can bring the same discipline to AI.

The outputs may vary. The release process can still be consistent. That's how AI changes stop being production surprises and start being measured decisions.

Think this argument fits your event? Tell me about the room — the calendar is selective.

Start a conversation