Thompson Sampling: Shooting Down A/B Tests and the Hidden Potential of ML

Alexander Volkov17 Nov 2025

Problem

Teams often have many variants of one element, such as the text of a promo widget. A standard A/B test with all variants splits traffic evenly, so weak variants waste audience and the test runs for weeks. At Ozon Bank the team had 9 text variants for a credit card widget on the home page. Running all of them against a control in one test would have taken about 9 weeks.

Example from the article: a widget on the Bank's home page promoted a newly launched credit card, and the goal was to find the best text quickly.

Solution in brief

Thompson sampling treats each text variant as a slot machine and sends more traffic to likely winners while the test runs. This picked the top 3 of 9 variants in one week, followed by a one-week A/B test of those 3 against the old text. Per-variant CatBoost click models then chose a text for each user, which added more lift on top of the winner.

Questions this case answers
  • How to shortlist the best of many content variants quickly when a full multi-arm A/B test would take too long
  • How to recover value from losing variants by choosing a variant per user with a click-probability model
  • How to pick the best of many text or UI variants faster than a classic multi-group A/B test?
  • How to waste less traffic on weak variants while still searching for the best one?

Tools and methods

  • Thompson sampling — adaptive traffic allocation across variants with Beta posteriors
  • A/B test — confirms the shortlisted variants and measures the real uplift
  • Gradient boosting (CatBoost) — one click-probability classifier per text variant
  • ClickHouse, Vertica — click and view collection, and tables used to show variants
Continue reading — it's free

Google or a one-time email code. No password.