Agentic A/B experimentation
Why an ordinary A/B test misleads on AI agents, and how to test an agent fairly: the whole setup, the right split, honest scoring, and a ship decision made by code.
Two AI analysts read the same checkout test and disagreed. One said ship it. The other said keep testing.
The test had 50,000 visitors. The new checkout lifted conversion from about 4.1% to 4.5%, and revenue per visitor rose from $2.37 to $2.65.
So why the split verdict? Before the test, the team had agreed that a change is only worth shipping if it lifts conversion by at least 0.3 points. The new checkout almost certainly helped: there was a 98% chance it beat the old one. But the chance that it cleared the 0.3-point bar was only about two in three. One analyst asked "is it better?" and said ship. The other asked "is it better enough?" and said keep testing.
Now put an AI agent in the tested seat. It can edit prompts, call outside services, cache answers and ask a human for help. Count every chat turn as a separate customer, let the control group read the new version's memory, or quietly drop the tasks the agent gave up on, and ordinary noise starts to look like a win. Testing an agent well means treating three things as one job: how you design the test, how you score the results, and who is allowed to approve a release.
The argument in brief
- Test the whole setup, not just the model. Prompt, tools, memory, limits and human reviewers all change the result.
- Agents leak between test groups, so split by account, team or time block, not by single request.
- Bigger groups give fewer independent samples than they seem to, because people in one team behave alike.
- Checking early and testing many things create false wins.
- "Works at least once in five tries" is not "works every time", and AI judges miss broken answers.
- A cheaper model can cost more overall once rework is counted.
- Code makes the decision. The AI may explore and explain, but never computes the result or changes the rule.
Half one
Understand
The ideas and the evidence behind them.
Foundations
Test the whole setup
When a team says "Model A versus Model B", it hides most of what is being tested. An agent acts through its prompt, its tools, the documents it can search, what it remembers, the limits of the machine it runs on and the people who approve its work. Change any one of these and the results change.
Anthropic showed this in February 2026. They kept the model, the tool harness and the coding tasks fixed, and changed only how strict the machine's CPU and memory limits were. The pass rate moved by about 6 points. So write down the whole setup before the test starts, limits and retry rules included, and treat it as one thing being tested.
Pick the split
A fair test needs groups that do not affect each other. What happens to one customer must not depend on which group another customer was put in. A chatbot answering one question mostly passes. An agent often does not. It writes to shared databases, works shared queues and keeps memory between sessions. If the new version learns a trick and saves it where the old version reads it, the old version is no longer a clean baseline.
So split at the level where the groups stop touching. If requests are independent, split by request. If users keep memory, split by account. If a team shares a queue or stock, split by team or market. If a whole market reacts, as in delivery dispatch, switch everything on and off in blocks of time with gaps in between.
Decision framework
Decide what to split by before you test anything
How much groups affect each other, and whether users keep memory, decide what to split by. Six steps lead from offline checks to a live randomised test.
Scroll horizontally to explore the full diagram.
Keep three scorebooks tied to the same setup: what the agent can do (offline task results), what it changes for the business (live results, net of human effort), and what went wrong (rule breaks and near misses). A win in one then cannot hide a failure in another.
Bigger groups, fewer samples
Suppose you split a support agent by team, with 50 tickets per team. Tickets from one team look alike: same product, same manager, same customers. So 10,000 tickets from 200 teams carry much less information than 10,000 independent tickets. If tickets within a team are only slightly alike, they behave like about 3,000 independent ones. Ignore that and your uncertainty ranges come out far too narrow, so lucky results look solid.
Running the same tasks on both versions helps. Say 200 tasks: B wins 35 that A fails, A wins 15 that B fails, and 150 tie. The gap rests on the 50 tasks where they disagree. The ties tell you nothing.
Peeking and many tests
Live dashboards invite a habit: check the result every hour and stop the moment it turns green. This is called peeking, and it creates false wins. In a simulation where both versions were identical, looking once at the planned end declared a winner about 5% of the time. Stopping at the first green light across 40 looks did so about 30% of the time.
Evidence
Checking early makes false wins common, and a win can still be too small
Left: when two identical versions are checked repeatedly, false wins climb from 5% to about 30%. Right: a result can beat zero and still miss the smallest lift worth shipping.
Scroll horizontally to explore the full diagram.
Testing many things has the same effect. Test 20 changes and, if none of them truly helps, there is still a 64% chance that at least one looks like a win. Decide the one main measure before the test starts.
One more note. Sending more traffic to whichever version is leading wastes less, but it skews simple averages. If you do it, record the odds each version had of being picked.
Industry evidence
Six company cases
Each case shows a trap that caught a real team.
| Company | The lesson |
|---|---|
| Booking.com (2017) | Keep a shared record of every failed test, not just the wins, so no one repeats a dead end. |
| Netflix (2017) | Replaying old data offline is good for picking candidates, but only a live test confirms the value. |
| Airbnb (2024) | Splitting by user overstated the effect, because users affect each other. Splitting by group removed at least 20% of that bias. |
| DoorDash (2018) | Pricing changes courier supply for everyone, so they switched whole regions on and off in random time blocks. |
| eBay (2015) | Holding out whole regions showed brand search ads mostly reached people who would have bought anyway. |
| LinkedIn (2020) | When group sizes drift from the plan, block the result until someone checks why. |
Productivity studies
Trials of AI coding tools show why a lab result rarely carries over. On a set task, GitHub Copilot users finished 56% faster in a 2023 trial. On real, mature codebases, METR found experienced developers 19% slower with AI allowed in early 2025, and its own February 2026 follow-up warned its estimate was unreliable. Google and Microsoft field studies landed in between, with gains of about 20% to 26%. The pattern is big gains on bounded tasks and much smaller or negative gains on real work, once review and rework are counted. Run a small local test that counts that rework.
Reliability and judges
Benchmarks often report whether an agent succeeded at least once in several tries. A customer lives with something else: does it work every time? Say an agent succeeds 90% of the time. Give it five tries and "at least once" looks perfect. Ask for success on all five and it is 59%. The second number is closer to what users feel. Long tasks compound it: if each of 20 steps works 98% of the time, the whole task works only about two times in three.
Economics
Working once is not working every time, and cheap can cost more
An agent that works 90% of the time almost always succeeds at least once in five tries, but succeeds all five times only 59% of the time. Right: rework and review make the cheaper model the costliest.
Scroll horizontally to explore the full diagram.
An AI judge scoring answers adds its own errors. Here is what that looks like. In an audit of 200 answers, 100 good and 100 broken, the judge accepted 85 of the good ones and also wrongly passed 20 of the broken ones. It agreed with the experts 82.5% of the time, which sounds respectable. But one in five broken answers sailed through. Check every judge against blinded human experts, separately for each group, and inspect the real end state (the database row, the file) before trusting a prose score.
Rare safety events need their own care. With no failures in 30 checks, you cannot rule out a failure rate near 10%. As a rule of thumb, after n clean checks you can only be 95% sure the true rate is below about 3 in n. Treat permissions and sandboxing as hard controls, not statistical bets.
What it shows
Offline tests cheaply drop poor prompts and check database state. They cannot show how users adapt, leakage across shared queues, or later rework.
In an illustrative example, cutting model cost per task from $0.20 to $0.08 raised the total from $1.20 to $1.68 through review and rework. A checker that caught errors early cut it to $0.82.
Ten thousand tickets from a few similar teams can be worth only a few thousand independent ones. Count independent groups, not rows.
Let the AI study failures and draft plans. The calculations, the rule and the approval stay in code and with people. Rewording the same result must never change a number.
Half two
Build
Tools, a reference service, ten recipes and failure drills.
Picking tools
A full setup does four jobs: deciding who sees what, recording what happened, doing the statistics, and judging agent quality. A small team should start light. Write the plan down, assign groups by account in your own code, read outcomes with one database query, and use one open-source runner for offline checks. Add a platform later, once you run many tests at once. RecoX's evaluation system already records exactly which setup ran and grades an agent's steps with code.
Classic, Bayesian and sequential testing. Check its exposure data matches your warehouse.
Open-source analysis with team-level splits. Check your edition's features.
Code checks, AI judges and prompt-injection sweeps. OpenAI's hosted Evals retire on 30 November 2026 and point here.
Standard tests and causal checks in Python.
Service design
The goal is that the numbers in the database, the statistics report and the AI-written summary always agree. The flow is: agree the plan, assign groups, record who met the agent and what happened, score the outcomes, let code compute the result, let a fixed rule decide, and only then let the AI write the summary. The AI reads the locked result but cannot change it.
Architecture
Six services and one setup ID keep the AI analyst read-only
Assignment, records, mature results, statistics and the ship gate all share one setup ID. The AI analyst can read the locked result but cannot change it.
Scroll horizontally to explore the full diagram.
Every outcome is read starting from everyone who was assigned, never from the successes. That way failures and no-shows stay in the count.
WITH eligible AS (
SELECT unit_id, arm, assigned_at, outcome_deadline
FROM frozen_assignment_ledger
WHERE experiment_id = :experiment
), mature AS (
SELECT * FROM eligible
WHERE outcome_deadline <= :analysis_cutoff
), outcomes AS (
SELECT unit_id, verified_value, event_time
FROM deduplicated_verified_outcomes
WHERE metric_version = :metric_version
)
SELECT
m.unit_id,
m.arm,
SUM(COALESCE(o.verified_value, 0)) AS observed_value
FROM mature m
LEFT JOIN outcomes o
ON o.unit_id = m.unit_id
AND o.event_time >= m.assigned_at
AND o.event_time < m.outcome_deadline
GROUP BY m.unit_id, m.arm;Keep eight kinds of record: who was assigned, who actually met the agent, each task, each action the agent took, each outcome, each score, each cost, and each ship decision with its approver.
Ten recipes
These are example designs, not measured results. Adjust the waiting periods to your own risk.
Compare plain intake with a version that checks each invoice before drafting. Test duplicates and currency mismatches on saved data first, and stop on any write across companies.
Judge whether problems stay solved, not how smooth the chat felt. Require no rise in repeat contacts or human effort.
Count unfinished tasks, review time and reverted changes. Treat any security lapse as an immediate stop.
Freeze one copy of the documents and include stale, conflicting and permission-denied questions. Better search alone never justifies launch.
Test updates and "forget this" requests on saved data first. Online, include every user offered the feature, including those who left.
Treat the choice of cheap model, retries and fallback as one policy and report cost per verified task. Refusing hard questions is not efficiency.
Plant known errors and measure whether reviewers catch them. A speed gain that misses errors fails.
Test accents, noise and spoken corrections against what actually happened at the end of the call. Stop on wrong amounts or more hang-ups.
Compare doing steps one at a time versus together under simulated network failures. Require better speed in the slowest cases and no duplicate writes.
Give it locked results with planted problems such as broken group sizes. Score whether it says "invalid" or "keep testing" when it should.
Running it
Four common failures
Cases are dropped from the count based on what the agent did, so the hardest cases quietly disappear.
The two groups are scored by different graders, so the gap measures the graders, not the agents.
Both groups read and write the same memory, so the new version helps the old one and the gap shrinks.
A short clean run is read as proof of safety, when it only shows failures are not very common.
Five trap tests
Before an AI is allowed to narrate live test results, give it read-only access to cases like these and check it answers correctly.
| What goes wrong | What the analyst must say |
|---|---|
| Group sizes are off the plan, for example a 53/47 split nobody can explain | Do not trust this result until the split is explained |
| Only engaged users were counted, after assignment | The comparison is no longer fair |
| One of 20 metrics looks like a win | Keep testing, this is likely luck |
| The new version was scored by a new judge and the old one was not | Invalid, the two groups were measured differently |
| Zero incidents in 30 safety checks | Not proven safe, the risk could still be near 10% |
Picking a method
Choose the comparison method and the main measure before the test starts, not after you have seen the data. When the groups are teams or accounts, the analysis must treat them as groups, not as thousands of separate people. For anything unusual, such as skewed results or tasks that never finish, ask a statistician.
- One sentence states the decision, with a named owner who can roll it back.
- The whole setup is written down: prompt, tools, documents, memory and machine limits.
- The split keeps the groups apart, and memory is separate for each group.
- The count starts from everyone assigned, and "missing" is kept apart from "truly zero".
- The smallest worthwhile lift, the safety limits and the stopping rule are fixed before anyone looks.
- Every judge is checked against human experts, and every reported number comes from the locked result.
What it adds up to
Teams rarely lose money because they cannot do the arithmetic. They lose it because a script checked the final text instead of the database, because a shared memory taught the control group, or because someone looked at an unfinished rollout five times until it turned green.
Test the complete setup. Split where groups stop affecting each other. Count everyone who was assigned. Check your judges. Let code make the ship decision, and keep the AI to exploring and explaining.
- Control and new version: the old version and the one being compared against it.
- Spillover: one person's group affecting another person's result, for example through a shared queue or memory.
- Peeking: checking results repeatedly and stopping when they look good.
- Judge calibration: checking an AI judge against human experts so you know how often it is wrong.
- Anthropic, Quantifying infrastructure noise in agentic coding evals (February 2026); tau-bench (Yao and colleagues, 2024); MT-Bench (Zheng and colleagues, 2023).
- Booking.com (Kaufmann and colleagues, 2017); Netflix Research (2017); Airbnb (Brennan and colleagues, 2024); DoorDash (2018); eBay (Blake and colleagues, 2015); LinkedIn (2020).
- GitHub Copilot trial (Peng and colleagues, 2023); METR developer study (2025) and its February 2026 update; Cui and colleagues (2025); Google enterprise trial (2024).
How is this page?
Last updated on