KatInterview

Choose the Right Randomization Unit for an A/B Test

Machine LearningModel answer
EasyModel answerMachine Learningmachine learningonline experimentsA/B testing

Last updated

Decide whether to randomize by user, session, or request for a new ML-powered feature, and explain the consequences of each choice.

Background

Your team has trained a new ML model that re-ranks search results based on a user's long-term interest profile. You are ready to run an A/B test to measure whether the new ranker increases clicks and purchases.

A colleague suggests three possible randomization units:

  1. Request-level — each individual search query is randomly assigned to control or treatment, independently.
  2. Session-level — each browsing session is randomly assigned; every query within that session sees the same variant.
  3. User-level — each user is assigned once and permanently; they always see the same variant.

What is expected

Answer the following:

  1. Which randomization unit would you recommend, and why?
  2. What goes wrong if you pick the wrong unit?
  3. What is the SUTVA assumption, and which unit best satisfies it here?
  4. Are there any practical trade-offs or edge cases with your recommended unit?

You do not need to do any math. A clear, structured explanation with reasoning is enough.

Hints

Hint 1

Think about whether the model's output for one query depends on what the user saw in a previous query — does exposure to one variant 'contaminate' future queries?

Hint 2

SUTVA stands for Stable Unit Treatment Value Assumption. Ask yourself: can one unit's treatment affect another unit's outcome?

Hint 3

Consider novelty effects and how long it takes for a personalization model to show its true impact on behavior.