Propose a multi-armed bandit system to optimize headlines faster

This tests online learning and the explore-exploit tradeoff. Answers contrast fixed A/B with adaptive allocation, sketch a Bayesian bandit service with a min exploration rate, and note delay.
What's really being asked
This tests whether you understand the difference between fixed-allocation experimentation and online learning, and whether you can architect a production system that balances exploration and exploitation while handling delayed feedback and non-stationary rewards. Interviewers want to see that you know bandits minimize cumulative regret rather than just final inference error.
The full answer
First, the conceptual distinction: A/B testing uses a fixed split for a fixed period to estimate a treatment effect, while a bandit dynamically shifts traffic toward better arms based on accumulating evidence, reducing the opportunity cost of showing suboptimal headlines. Second, algorithm selection: name a principled approach such as Thompson Sampling, which maintains a posterior over each headline's click-through rate and samples from it to randomize exploration naturally, or UCB1, which optimistically biases uncertainty. Third, system architecture: a lightweight edge decision service that selects a variant per request and logs the impression; an async feedback pipeline that attributes clicks and updates posteriors; and a control plane that enforces an exploration floor, for example five to ten percent minimum traffic per arm, plus a kill switch. Fourth, practical safeguards: handle out-of-order delayed feedback gracefully; account for non-stationarity because headline performance decays as stories age, using a sliding window or decay on historical counts; and validate against a small holdout bucket running random allocation to verify cumulative reward improvement.
The mistakes people make
Claiming bandits eliminate statistical rigor or sample size thinking. Proposing purely greedy allocation after a brief burn-in, which causes premature convergence. Ignoring real-time constraints by suggesting nightly batch updates. Failing to mention exploration floors, which lets the system starve new headlines before they prove themselves. Conflating standard bandits with contextual bandits without clarifying whether user features are actually used.
What usually comes next
How do you handle non-stationary rewards when headline click-through rates decay over time? What if click feedback is delayed by hours and traffic has already shifted? How do you validate the bandit against a traditional A/B test? Would you use a contextual bandit for personalized headlines, and how does that change the system? How do you prevent a new headline from being starved during its first impressions?
A concrete example
Imagine five headlines with Beta priors of one and one. For each request, sample a click-through rate from each posterior, serve the headline with the highest sample, and log the impression. On a click, increment alpha; otherwise increment beta after the attribution window. Enforce a hard floor of eight percent traffic per headline regardless of samples. After one day, the worst headline receives perhaps twelve percent of traffic instead of the twenty percent in a balanced A/B test, cutting regret significantly while still collecting enough data to detect a winner.
Interview question
In a production Thompson Sampling bandit serving headlines with delayed click feedback, which design best balances real-time serving with robust learning?
- a.Allocate traffic randomly for a fixed burn-in period before committing fully to the highest posterior mean
- b.Maintain a minimum traffic percentage per headline and process attributed clicks through an async update pipelineCorrect
- c.Reserve a small random holdout bucket and feed its outcomes directly into the main bandit's posterior updates
- d.Run nightly batch updates to recalculate Beta posteriors after all clicks are attributed
Why? this is the answer
Option B correctly combines an exploration floor, which prevents new headlines from being starved before proving themselves, with an async pipeline that handles delayed, out-of-order feedback. Option D represents the common mistake of ignoring real-time constraints with batch updates, while Option A risks premature convergence through greedy allocation.
Just read this? Test yourself on what you have been reading.
Read the original → en.wikipedia.org
- #multi-armed bandit
- #ab testing
- #experimentation
- #system design
- #online learning
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles