KatInterview

Design an Online Experiment for a Ranking Model Upgrade

Machine LearningModel answer
HardModel answerMachine Learningmachine learningexperimentationranking

Last updated

Plan and analyze an A/B test for a new learning-to-rank model replacing a heuristic ranker in a content feed, handling interference, novelty effects, and metric trade-offs.

Scenario

You work on the recommendations team at a large content platform. The feed currently ranks items with a hand-tuned heuristic scorer. Your team has trained a new learning-to-rank (LTR) model and wants to ship it to 100% of traffic. Before doing so, you must run a rigorous online experiment.

The platform serves 50 million daily active users (DAU). Each user sees a ranked feed of ~20 items per session. The primary business goal is long-term user retention, but the team tracks several short-term proxy metrics: click-through rate (CTR), session length, next-day return rate, and a "satisfaction" signal derived from explicit thumbs-up/down feedback (sparse, ~2% of sessions).

You are expected to:

  1. Frame the experiment — state hypotheses, choose the randomization unit, and justify it.
  2. Select and prioritize metrics — distinguish guardrail, primary, and secondary metrics and explain why.
  3. Size the experiment — walk through the power calculation with reasonable assumptions.
  4. Identify and mitigate threats — novelty effect, position bias, cannibalization, network effects, long-term vs. short-term divergence.
  5. Analyze and make a decision — describe the statistical approach, how you handle multiple comparisons, and your ship/no-ship criteria.
  6. Discuss trade-offs — what a naive approach gets wrong, and what you would do differently if retention and engagement diverge.

Hints

Hint 1

Start by asking: what can the ranking model affect that the heuristic cannot, and does your metric capture that? This determines which metric is truly primary vs. a proxy.

Hint 2

For the randomization unit, think about what happens if you randomize at the request level instead of the user level — would a single user see both rankers in the same session?

Hint 3

The novelty effect and the long-term retention goal pull in opposite directions on experiment duration — make sure you can articulate the tension and how you resolve it.