KatInterview

Rolling Out a Homepage Ranker Upgrade in a Delivery Marketplace

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsab-testinginterferenceswitchback

Last updated

Plan a safe, statistically sound experiment and rollout for a new homepage store ranker in a two-sided delivery marketplace, covering metrics, interference, infrastructure, power and launch rules.

A delivery app orders the stores on its homepage with a ranking model, currently V1.1. A candidate replacement, V2.0, uses extra features (possibly some real-time ones) and may need treatment users to load a different feature bundle than control users.

Stores are only eligible if they are open now and within delivery range of the user, so the candidate pool changes with time and location. Homepage retrieval has a tight latency budget, and traffic is large but finite.

Because the ranking influences which merchants get orders, how busy couriers are and how long deliveries take, one user's arm can affect another user's outcome. A plain click-based A/B test is not enough.

Design one coherent experimentation and rollout plan that covers:

  1. Metrics: the primary success metric and the guardrails, and why.
  2. Randomization unit: user, session, geo, or switchback; your default and when you would change it.
  3. Serving infrastructure: how control and treatment fetch different model versions and feature sets safely and reproducibly.
  4. Logging: what must be recorded so the analysis is correct and reproducible.
  5. Validity threats: sample ratio mismatch, delayed conversions, feature missingness, novelty effects, selection bias, spillover.
  6. Power and variance: MDE for a binary metric, the effect of clustering, CUPED and stratification, with a worked number.
  7. Ramp, rollback and launch: the staged sequence, explicit rollback triggers, and a multi-factor launch decision.

State any clarifying questions you would ask first (true-north metric, practically significant lift, expected interference, feature SLAs, baseline conversion and traffic, existing experimentation tooling) and the assumptions you make.

Hints

Hint 1

Pick a primary metric that reflects business value per exposure (for example orders or contribution margin per homepage session) and treat latency, ETA, cancellations and merchant concentration as guardrails that can veto a launch.

Hint 2

Ask whether V2.0 merely reorders the same eligible stores or changes which stores receive demand. The answer decides between user-level randomization and zone or switchback designs, and clustering shrinks your effective sample size.

Hint 3

Make the assignment deterministic and log arm, model version and feature-config version on every request; add shadow mode and safe defaults with missingness flags before any live traffic.

Hint 4

Use the rough formula n per arm ≈ 16·p(1−p)/δ² for power, divide by the design effect when clustering, and use pre-period covariates (CUPED) to cut variance.