How do you choose a validation split that mirrors production, such as new users versus existing users?

Quick Overview

Asks how to design a train and validation split that matches how a model is used in production, with new users and existing users as the main case. Tests reasoning about group splits, time-based splits, label gaps, leakage and per-segment metrics.

How do you choose a validation split that mirrors production, such as new users versus existing users?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How do you choose a splitting scheme so that validation mirrors how the model will be used in production, such as predicting for new users versus existing users? ```hint Start from the prediction moment Write down who or what is scored in production and when. What will the model not have seen at that moment? ``` ```hint Leakage through the same entity Ask what a model can learn about a user from that user's other rows when the same user sits in both training and validation. ``` ### What a Strong Answer Covers - Defining the prediction unit and moment, and what is unknown at that moment (entity, time, location). - A split by user for the new-user case, and why a random row split overestimates performance there. - A time-based split within users for the existing-user case, with features built only from data before the prediction point. - Forward-chaining splits with a gap when the model predicts the future, and preprocessing fitted inside each fold. - Handling mixed production traffic with per-segment metrics or metrics weighted by the expected mix. ### Follow-up Questions - How would you validate a model that serves both new and existing users and also predicts future behavior? - How do you pick the size of the gap between the training and validation windows? - Your offline metric comes from a split that matches production, yet it disagrees with the online A/B result. What do you check?

Overview: Asks how to design a train and validation split that matches how a model is used in production, with new users and existing users as the main case. Tests reasoning about group splits, time-based splits, label gaps, leakage and per-segment metrics.

General logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

How do you choose a splitting scheme so that validation mirrors how the model will be used in production, such as predicting for new users versus existing users?

What a Strong Answer Covers Guidance

  • Defining the prediction unit and moment, and what is unknown at that moment (entity, time, location).
  • A split by user for the new-user case, and why a random row split overestimates performance there.
  • A time-based split within users for the existing-user case, with features built only from data before the prediction point.
  • Forward-chaining splits with a gap when the model predicts the future, and preprocessing fitted inside each fold.
  • Handling mixed production traffic with per-segment metrics or metrics weighted by the expected mix.

Follow-up Questions Guidance

  • How would you validate a model that serves both new and existing users and also predicts future behavior?
  • How do you pick the size of the gap between the training and validation windows?
  • Your offline metric comes from a split that matches production, yet it disagrees with the online A/B result. What do you check?