Skip to content
GenAI Learn/Testing & Resilience in Production
Browsing as a guest. Sign in to save your progress and earn XP as you complete chapters.

A/B Testing Model & Prompt Changes

7 min read

You'll learn to

  • -Design an A/B test for a prompt or model change
  • -Recognize metrics that matter for LLM A/B tests
  • -Compute real statistical significance from sample size and conversion rates

Marketing claims a new prompt, v2, "converts 20% better" than the current one, v1. Switching outright is a real gamble: if v2 is actually worse, that is real lost revenue for as long as it takes to notice and roll back. Proper A/B testing is how a team gets to trust a change like this before betting the whole product on it.

Split Traffic, Measure, Decide

Route a portion of real users to each variant, prompt v1 vs. v2, or model A vs. B, using sticky assignment so the same user always lands in the same variant across their session. Measure a real success metric, conversion rate, satisfaction score, click-through, for each side. Declare a winner only once the difference is statistically significant, not the moment one number looks slightly higher than the other.

The scenario below is the exact one from the case brief: v2 genuinely does convert about 20% better. Only the sample size changes. Watch how much that alone matters.

The Same Lift, Different Confidence

v2 always converts about 20% better than v1 in this scenario. Only sample size (per variant) changes below. Watch whether that is enough traffic to actually trust the result.

1,000

v1 (control)

4.90%

v2 (variant)

5.90%

observed lift: +20.4%z = 0.99p = 0.3225
Not yet significant, keep collecting data

The lift looks identical to the significant case above, but at this sample size it is statistically indistinguishable from random noise. Shipping now would be a guess, not a decision.

This is the entire point of statistical significance, made concrete: the identical 20% lift is a coin flip at a small sample and an obvious, safe-to-ship win at a large one. Shipping a change based on the small-sample result is not really a decision. It is a guess that happened to look directionally correct.

Plan Sample Size Before Starting, Not After

How much traffic is actually needed depends on the traffic volume itself: a product with 2 million users can often detect a 2% difference within 24 to 48 hours, while a product with 10,000 users might need weeks to reach the same confidence for the same size effect. Knowing this before starting an experiment avoids the common trap of checking results early, seeing an exciting-looking but statistically meaningless number, and shipping on it prematurely.

Auto-Rollback for Early, Severe Regressions

The reverse risk deserves its own safeguard too. If a variant is performing significantly worse, not just slightly worse, early in the test, waiting out the full planned experiment duration to confirm it statistically is not caution, it is needless lost revenue. An automatic rollback trigger for a severe, early regression, the case brief's own guidance uses roughly 5% worse as the bar, protects against exactly that.

Interview Signal is part of Pro

See a real weak answer next to a real strong one for this exact topic.

Quiz is part of Pro

Test what you just read with a short quiz, and bank the XP.

ScaleDojo Logo
Initializing ScaleDojo