Problem
An A/B test sends a fixed share of traffic to every variant until it ends, so weak variants cost metric value the whole time. Multi-armed bandits move traffic to better variants while still learning, but they drop the fixed Type I and Type II error levels and optimize only one metric. The Ozon team asks whether bandits can replace A/B tests. Their answer: no. Contextual bandits suit personalization, classical bandits suit a single choice where an A/B test is hard, and everything else stays with A/B testing.
Example from the article: a simulated promo campaign where users with known ARPU and age react differently to promo variants.
Solution in brief
Classical bandits pick one best variant. Contextual bandits pick a variant per user from context features. The article builds one from Thompson sampling over a Bayesian linear regression, then a neural linear version that feeds a network's last hidden layer into that regression to capture nonlinear effects. Before production, simulate on real data, and keep an A/B test to measure the bandit.
Questions this case answers
- How to allocate traffic adaptively between variants so that less traffic goes to weak ones, when a fixed-split experiment is too costly or too slow
- How to choose a different action for each unit based on its features when reward depends on those features nonlinearly
- How to stop wasting traffic on weak variants during an experiment?
- How to choose a variant per user based on context instead of one winner for everyone?
Tools and methods
- Thompson sampling — draws a reward from each variant's posterior and picks the largest.
- Linear and neural linear TS — Bayesian regression per variant, optionally on neural network features.
- epsilon-greedy and UCB — classical baselines.
- PyMC with Bambi — builds the regression and sets priors.
Google or a one-time email code. No password.
