Myth busted: standard A/B tests work on nondeterministic AI
A practical guide for PMs on why standard A/B tests can mislead when model outputs vary, and how to design tests that respect nondeterminism.

Who this is for: product managers shipping AI outputs that vary per call (LLM replies, generated images, synthesis). What you will have at the end: a step‑by‑step checklist and a worked example you can adapt for in‑product reply suggestions.
In brief
Busted. When model outputs vary by call and the model drifts, standard assumptions about independent samples and a single unit of randomisation break. Design tests around the actual unit of exposure and the variance you expect.
Step 1 — Identify the unit of causal exposure
Decide whether the causal unit is message, session or user.
Don’t assume the user is the unit. If an agent sees many suggested replies, each suggestion is a separate exposure. Randomise at the same level the product delivers the output. That keeps your causal claim aligned with the mechanics of the feature.
Step 2 — Reduce noise with within‑unit designs
Pair, cross‑over or within‑session comparisons.
When possible, compare two variants inside the same unit: two suggested replies for the same agent or two images for the same prompt. Within‑unit comparisons cancel shared variance (agent style, prompt difficulty) and lower sample needs.
Step 3 — Aggregate per unit and use cluster‑robust stats
Avoid treating each call as independent.
Aggregate outcomes per unit of exposure (mean outcome per agent or per session). Then compute treatment effects on those aggregates and report cluster‑robust standard errors. This prevents inflated significance from many correlated calls.
Step 4 — Include deterministic proxy checks
Add stable probes to detect drift.
Send a small set of deterministic prompts or use fixed seeds each day. Track their outputs. If the proxy changes while the experiment runs, model drift or deployment changes may invalidate your comparisons.
Step 5 — Power for variance, not just mean
Expect larger variance. Plan sample size accordingly.
When outputs are nondeterministic the variance of outcomes rises. Power calculations must use observed or estimated variance, ideally from a pilot. If you cannot reduce variance by pairing, budget for a larger N or use smarter blocking.
Step 6 — Monitor post‑launch for updates and interactions
Track model changes and second‑order effects.
Model updates can change effect sizes. Monitor your treated and control cohorts after the test. Look for interaction effects with other features and for shifts in operational costs like token usage or latency.
Step 7 — Report distributions and operational costs
Show quantiles, heavy tails and cost trade‑offs.
A mean lift hides variation. Publish quantiles of the treatment effect and a breakdown of cost drivers (most calls may drive most tokens). Combine efficacy metrics with latency and cost to make a product trade‑off decision.
Common mistakes — a short checklist
- Randomising only at user level when exposures are many per user.
- Treating per‑call samples as independent observations.
- Ignoring heavy tails in usage or token cost.
- Failing to detect model updates mid‑test.
- Reporting only a single metric instead of task success and downstream cost.
Comparison table — quick design choices
| Question | Randomise here | Why |
|---|---|---|
| Output delivered per message? | Message (per call) | Keeps treatment aligned with each exposure; high sample count but correlated by user |
| Output applied for whole session? | Session | Captures session‑level effects and avoids spillover between variants |
| Rare users with many calls? | Block or pair within user | Reduces variance from heavy users and enables within‑user comparisons |
Worked example — reply suggestions for support agents
Scenario: you add an AI reply suggestion that appears alongside an agent’s draft. The system generates a suggestion each time the agent opens a message. You want to know if suggestions increase first‑reply resolution.
Design: randomise at the message level. Each message is either served a suggestion (treatment) or not (control). When possible, pair suggestions and baseline for the same agent on similar messages.
Data: collect 100,000 messages. For each agent, compute their mean first‑reply resolution in treatment and control messages. This yields one paired delta per agent.
Analysis: compute the mean of per‑agent deltas and use cluster‑robust standard errors across agents. Report the distribution of deltas (median, 10th and 90th percentiles) and token cost distributions.
Result (example): mean lift 0.8% with 95% CI [0.1%, 1.5%]. Interpret this against costs: if the incremental latency and tokens raise cost per handled ticket by X, use the lift and downstream savings to decide.
Notes on pitfalls: if you had instead treated each message as independent without per‑agent aggregation, you could understate uncertainty because messages from the same agent are correlated. Also watch for a model update mid‑test — use deterministic probes to flag it.
Design your test to match how the product exposes the AI. If exposure is per message, randomise per message and aggregate per agent before you infer anything.
Final practical checklist
- Confirm the unit of causal exposure and randomise at that level.
- Use within‑unit pairing when you can.
- Aggregate outcomes per unit and apply cluster‑robust SE.
- Add deterministic proxy checks to detect model drift.
- Power your test using observed variance or run a pilot.
- Monitor post‑launch for updates and cost shifts.
- Publish distributions and operational costs, not just the mean.


