100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Agent Evaluation & Observability
30 minadvanced

A/B Testing and Shadow Deployments for Agents

Every evaluation technique in this course so far runs before or beside production traffic: an eval set, an LLM judge, a regression suite in CI. All of it answers “does the candidate look better on the data we already have.” None of it answers the question a launch decision actually needs answered — does the candidate perform better on the traffic you don't have yet, the traffic that shows up the moment real users, real tool outages, and real adversarial input start hitting it. An eval set that scored a candidate at 94% can still ship a regression, because the eval set is a sample, and production is the population it was sampled from imperfectly.

This lesson is about the methods that get a trustworthy answer from production itself without betting the product on a change that hasn't earned trust yet: shadow deployment, which watches a candidate on real traffic with zero user exposure; canary releases, which expose real users but in small, reversible slices with automatic rollback; and controlled experiments — A/B tests and interleaving — which get a statistically defensible answer to “is the candidate actually better,” not just “did nothing catastrophic happen.” Each method trades safety for signal in a different place, and picking the wrong one for the question you're asking is itself a common failure mode covered later in this lesson.

Agents make the experimentation half of this harder than it is for a typical web A/B test. A session is many turns, not one request, so the unit you randomize on and the moment your metric is even knowable both change. Users adapt to the agent they're given, which contaminates the very comparison you're running. And because lessons 12 and 13 already built the statistical machinery — confidence intervals for a proportion, McNemar's test for paired data, bootstrap resampling, the pass@k vs pass^k distinction — this lesson does not re-derive any of that. It applies it to a new, harder problem: choosing what to measure, when you're allowed to look, and how many sessions you need before looking at all.

Analogy🏏Cricket
🏏 Think of it like cricket: an IPL franchise has a net bowler who can supposedly bowl a yorker at 145 km/h, but nets against throwdowns and a padded-up teammate prove almost nothing about how he'd handle the last over of a run chase at the MCG with 12 needed and Glenn Maxwell on strike. The franchise can't hand him that over untested — one bad over in a knockout final and the season is over — but it also can't judge him on nets forever, because nets don't have crowd noise, required-rate pressure, or a batter who has studied his release point on broadcast footage. So teams graduate a bowler deliberately: nets, then a domestic List-A match where the situation is real but the stakes are contained, then a low-pressure IPL over against a weaker batting order, before anyone trusts him with a final over that decides the tournament. Each stage exposes him to more of what actually matters while bounding how much a bad outcome can cost. Shadow deployment, canary rollout, and a full controlled experiment are the same ladder for an agent: each rung buys more truth about how it behaves against something real, at a cost the team chooses in advance rather than discovers by accident.
Lesson 28 of 35
0% complete