How should you structure an answer to a machine learning system design question, and how should you pace it in a 45-minute interview?

ML system design, Framework
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you can turn an open-ended ML (machine learning) product problem into an ordered engineering plan instead of jumping straight into model details.

Key idea

Work top-down in six plain stages: clarify the goal and scale, define the prediction task and success checks, plan data and inputs, start with a simple model before improving it, plan how predictions are served, and check live performance after launch. State assumptions out loud and spend most of the 45 minutes where the interviewer asks follow-ups.

Steps

  1. Clarify the goal, users and scale (about 5 minutes): ask what the user should see, whether predictions can be prepared ahead of time or must happen live, and roughly how many users and requests the system serves.
  2. Frame the prediction task and success checks (about 5 minutes): decide what the model predicts (for example, a yes/no label, a score or a ranked list), how you measure accuracy offline on saved data, and what real user outcome shows the product improved online.
  3. Plan data, labels and input signals (about 10 minutes): say how you get labelled examples (such as user clicks or human reviews), avoid leaking future information into training, and pick input features available when predicting.
  4. Propose a simple baseline first, then improve (about 10 minutes): start with a fast, simple rule or basic linear model to verify the pipeline end to end before describing a stronger model you would try next.
  5. Plan serving, live testing and monitoring (about 15 minutes): explain how predictions reach users quickly enough, how you test the new model safely on a small slice of users against the old one, and how you watch for data changes after launch.

Common mistakes

How long your answer should be

About 2 minutes to give the outline for a 45-minute interview.

Read this

Previous in ML system design: What are the main parts of a machine learning system in production, and how do they connect in a loop?
Next in ML system design: Why should you start an ML (machine learning) system design with a simple baseline, such as rules, popularity or logistic regression, before building a deep neural network?