Skip to content
RED SAGSkills
hardMachine Learning Engineer interview question

How would you run an A/B test to decide whether a new ML model should replace the current one? What pitfalls do you watch for?

What the interviewer wants to hear

  • Define a primary metric and guardrail metrics in advance
  • Power analysis for sample size and duration
  • Randomise by user; avoid peeking
  • Novelty effects, network effects, feedback loops
  • Shadow or canary first for safety

Model answer

Before the test I run the new model in shadow mode to check latency, errors and prediction distributions without affecting users, then a small canary. For the A/B test, I define one primary metric, like conversion rate, and guardrail metrics such as latency, revenue per user and complaint rate. I do a power analysis to pick the sample size and run for at least one or two full weekly cycles. I randomise by user, not by request, so each person has a consistent experience. Pitfalls include peeking and stopping early when results look good, which inflates false positives; novelty effects that fade; interference when users affect each other, like marketplaces; and feedback loops where the model changes the data it later trains on. I also check sample ratio mismatch and segment results, and only ship when the gain is significant and guardrails hold.

Can you answer it under time pressure?

Take a timed hard round and get scored on every answer.

Start mock interview

More hard Machine Learning Engineer questions