Shadow and Canary: Shipping an AI Change Without Betting the Business
Two unglamorous techniques between a change and everyone. Shadow runs the new version against real traffic without showing anyone the results, so you find out how it behaves on production inputs before a single user sees it. Canary releases it to a small fraction with an automatic undo. The alternative, which is what most teams do, is to flip it on for everyone and hope.
Shadow and Canary: Shipping an AI Change Without Betting the Business
The short answer. Two techniques sit between a change and all of your users. Shadow runs the new version against real production traffic while showing nobody the results, so you learn how it behaves on real inputs before anyone is exposed. Canary releases it to a small fraction of users with an automatic rollback if the numbers move the wrong way. Neither is clever, both are cheap, and the alternative that most teams actually practise is to flip it on for everyone and hope.
Offline evaluation tells you how a change performs on the inputs you thought to collect. Production tells you how it performs on the inputs that exist.
Those are different sets, and the gap between them is where changes that looked good in evaluation go wrong. Shadow and canary are how you close the gap without paying for it in incidents.
Shadow: real inputs, no exposure
- Shadow: real traffic, output shown to nobodyread the disagreements, not the aggregate. A hundred of them tells you the character of the change
- Check the difference sliced, plus cost and latency on real inputsand whether any new failure mode appeared
- Canary: a small fraction, split by user or tenantsized so the result is readable, not one percent of low volume
- Automatic rollback on fast guardrailserror rate, latency, abstention, recall on the golden set. A manual rollback stays broken over a weekend
- Full release
Shadow means the new version processes real production traffic in parallel with the current one, and its output goes nowhere near a user. You compare the two.
What this buys you is the only thing offline evaluation cannot: the actual input distribution, including everything nobody thought to put in a test set. The malformed record. The document type that arrived last month. The question phrasing that turns out to be forty percent of real usage. The seasonal spike.
What to look at while shadowing, roughly in order of usefulness:
Disagreements, not aggregate scores. The cases where old and new produce materially different answers are where the entire signal lives. Sample those and read them. A hundred disagreements read by a person tells you more than any aggregate delta, because it tells you the character of the change rather than its magnitude.
Distribution of the difference, sliced. A change that improves the mean while degrading one document type or one customer segment is a change that will produce a specific, angry escalation shortly after launch. The average will not show you that.
Cost and latency on real traffic. Both routinely differ from evaluation by more than people expect, because evaluation inputs are shorter and cleaner than production ones.
New failure modes rather than a better score. The question worth answering is not only whether it is better, but whether it is broken in some way the old one was not.
A caution worth stating: shadowing a system with side effects requires care. If the shadow path can send an email, write a record, or charge anything, you have built a duplicate-execution machine rather than a test. Shadow paths must be genuinely read-only, which for an agent means stubbing the effectful tools, not trusting that nobody will call them.
Canary: small exposure, automatic undo
Shadow tells you about behaviour. It cannot tell you about the thing that only appears when the output reaches a person, which is whether it actually helps.
Canary releases the change to a small fraction of real users, watches, and rolls back automatically if the numbers move the wrong way.
The word doing the work is automatic. A canary with a manual rollback is a canary that stays broken over a weekend, because the mechanism depends on somebody noticing during working hours. Define the guardrail metrics and the thresholds before you start, wire the rollback to them, and let it act without a human in the path.
Three practical constraints decide whether a canary is real or theatre.
Choose the fraction so the result is readable. One percent of low volume is not a measurement, it is a rounding error. Work out how much traffic you need to detect the size of regression you care about, and if you cannot get it in a reasonable window, shadow for longer instead of running an underpowered canary and calling it evidence.
Split by a stable unit, not per request. Route by user, tenant, or session, so a person gets a consistent experience. Per-request splitting gives people a system that behaves differently on consecutive questions, which produces confusing feedback and unusable data.
Pick guardrails that fail fast. Quality metrics for retrieval systems are frequently slow, because the truth arrives late. So canary on the fastest honest signals available: error rate, latency, abstention rate, retrieval recall on the golden set, escalation or thumbs-down rate. Slow metrics still matter, they just cannot be the trigger.
The honest limit
There is a case shadow and canary both miss, and it is worth naming rather than discovering.
When the truth arrives late, neither technique can grade the change in real time. You do not know whether approving a loan was the right call until years later. You do not learn a transaction was fraud until the chargeback appears months on. In those systems, both techniques verify that the system behaves sensibly and neither verifies that it was right, and no amount of rollout discipline changes that.
The response is not to skip them. It is to pair them with proxies you understand the limits of, and to be explicit that the actual verdict arrives later, which means the rollout plan needs a review at that point rather than a launch celebration.
Why this is the cheapest reliability work available
Compared to everything else in retrieval reliability, this is trivial. It is routing and comparison. There is no research problem inside it, no labelling project, and no model work.
And it protects against the failure that is otherwise unbounded: a change that is worse in a way nobody anticipated, released to everyone at once, discovered by customers. That failure has no natural size limit, because how bad it gets is a function of how long it takes someone to notice.
Shadow and canary convert that into a bounded, observable, automatically reversed event. The cost is a few days of plumbing that then serves every future change.
What to check on Monday
Ask how the last model, prompt, or index change reached production. If the answer is that it was evaluated offline and then deployed, you have found the gap.
Ask what the automatic rollback triggers on and when it last fired. A rollback that has never fired is either a very stable system or an untested mechanism, and you cannot tell which from the outside.
And ask whether the shadow path can take a side effect. If nobody is certain, assume it can.
FAQ
What is shadow testing for an AI system? Running a new version against real production traffic in parallel with the current one, with its output shown to nobody. It gives you the real input distribution, including everything that never made it into a test set, before any user is exposed.
What should I look at during a shadow run? The disagreements between old and new rather than the aggregate score, because that is where the signal is. Sample and read a hundred of them. Then look at the difference sliced by document type and customer segment, at cost and latency on real traffic, and at whether any new failure mode appeared.
How do I run a canary release for an AI change? Release to a small fraction of users split by a stable unit such as user or tenant, with guardrail metrics and thresholds defined in advance and an automatic rollback wired to them. Size the fraction so the result is statistically readable, and pick fast-moving guardrails since quality metrics often arrive too late to trigger on.
Can I shadow a system that takes actions? Only if the shadow path is genuinely read-only. If it can send an email, write a record, or charge anything, you have built a duplicate-execution machine rather than a test. For an agent that means stubbing the effectful tools rather than trusting that nothing will call them.
What do shadow and canary not catch? Anything where the truth arrives late. If you cannot know whether an answer was right for months, both techniques verify that the system behaves sensibly and neither verifies that it was correct. Pair them with proxies whose limits you understand, and schedule a review for when the real verdict lands.
The four-step repair as a worksheet you fill in, ordered cheapest first, with a golden-set template that stays maintainable, the slice matrix, the drift calendar, and the seven questions to ask anyone you hire. Built to be printed and taken into a review.
Tell us the system, the stakes, and the date that matters. You get a straight technical reply from the person who would lead the work, within 24 hours.
Bring us the program