ML System Design Interview: A 7-Step Framework With Examples

How to answer ML system design interview questions: a 7-step framework, a 45-minute time plan, what each level must show and the most common mistakes.

Beginner 5 min read · Updated

A machine learning system design interview asks you to design a product feature that depends on a model, such as a video feed, an ad ranker or a fraud detector, and to defend every choice from the business goal down to how the model is monitored. It is not a modelling quiz. Interviewers want to see that you can turn a vague goal into a learnable problem, find the data and labels, pick a sensible model, serve it within a latency budget, prove it works and keep it working. This guide gives you a seven-step framework, a time plan for a 45-minute round, and what separates a pass from a strong pass.

The most common failure is jumping to a model architecture in minute two. Spend the first ten minutes on the problem, the metric and the data; most of the score is earned there.

How ML design rounds differ from backend rounds

Backend system designML system design
Core questionCan the system store, move and serve data correctly at scale?Does the system make *good decisions*, and can you prove and keep it?
RequirementsFeatures, QPS, latency, consistencyBusiness objective, ML objective, labels, latency and freshness
Main componentsAPIs, databases, caches, queuesData pipelines, features, training, model serving, evaluation, monitoring
Typical deep divesSharding, caching, consistencyLabel quality, training-serving skew, ranking stages, metrics, drift
Failure you must plan forA server or region goes downThe model is silently wrong, stale or biased

You still need ordinary building blocks: the serving path is a low-latency service, features come from data pipelines, and candidates often come from a vector index. The ML round adds the question of decision quality on top.

The seven-step framework

new labels1. Clarifygoal · scale · limits2. Frame as MLobjective · label3. Datasources · labels4. Features + modelbaseline first5. Evaluationoffline + online6. Servinglatency · scale7. Monitoringdrift · retrain
The seven steps in order. Steps 1 to 3 decide what you build; steps 4 to 7 decide whether it works in production. The dashed edge is the feedback loop that closes the system.

1. Clarify requirements

Ask about the business objective (more bookings? less fraud loss?), the users and scale (daily active users, items in the catalogue, requests per second), latency (a feed must render in about 200 ms; a nightly email can take hours), constraints (on-device, privacy, regulated domain), and what data already exists. Write the answers down; you will refer back to them.

2. Frame the problem as an ML task

Translate the goal into something a model can learn: the input, the output, the label and the task type (binary classification, regression, ranking, retrieval). "Increase watch time" might become "predict the probability a user watches more than half of a video, and rank by expected watch time". Say whether ML is even needed; a rule may do. See ML problem framing.

3. Data and labels

Where do training examples come from, how are they labelled (natural labels like clicks, or human annotation), how much is there, how biased is it, and how will you split it without leaking the future into the past? See training data and data labeling.

4. Features and model

Name feature groups (user, item, context, user-item interaction), how each is computed and whether it's available at prediction time. Then propose a baseline (popularity, logistic regression) before a stronger model (gradient-boosted trees, a deep network, a two-tower retriever). Justify the choice by data size, latency and interpretability. See feature engineering and choosing a model.

5. Evaluation

Pick an offline metric that matches the task (PR-AUC for rare positives, NDCG for ranking, MAE for regression) and an online metric tied to the business goal, plus guardrails that must not get worse. Explain how an A/B test decides the launch. See ML evaluation.

6. Serving

Batch or online prediction? Where do features come from at request time (feature store)? For ranking, sketch the multi-stage funnel. Give a latency budget per stage and a fallback when the model is slow or down. See model serving.

7. Monitoring and iteration

Watch operational metrics (latency, errors), data health (missing features, distribution shift) and model quality (delayed labels, calibration). Decide the retraining cadence and how a new model is promoted. Mention feedback loops if the model shapes its own training data. See model monitoring.

A 45-minute time plan

Clarify5 minFrame5 minData6 minFeatures + model10 minEval6 minServing8 minMonitor5 min
Where the minutes go in a 45-minute round. Framing, data and evaluation together take about half the time, which matches where the marks are.

In a 60-minute round, spend the extra time on the deep dive the interviewer picks. Interviewers often stop you after the overview and say "let's go deeper on features" or "how would you evaluate this"; that's a good sign, not an interruption.

What each level is expected to show

LevelExpectedSignals that stand out
Junior / new gradA correct end-to-end pipeline, sensible features and metricsA baseline first; separating offline and online metrics
Mid-levelTrade-offs at every step, a realistic serving pathPoint-in-time correct training data; latency budget per stage
SeniorOwns ambiguity: framing, metrics, launch criteria, failure modesFeedback loops, calibration, delayed labels, cost of mistakes
StaffPlatform and organisational viewReusable features and evaluation across teams; when *not* to use ML

Common mistakes

  • Model first. Naming a transformer before agreeing on the label. The label decides everything downstream.
  • One metric. Only accuracy, on a problem with 0.1% positives, where predicting "never fraud" scores 99.9%.
  • Features that don't exist at serving time. Using "total purchases this week" computed with data from after the prediction moment, a classic data leak.
  • No baseline. Without one you can't say whether the complex model is worth its cost.
  • Ignoring the serving path. A 200 ms budget can't run a heavy model over a million items; you need candidate generation first.
  • Forgetting the loop. No word on drift, retraining or how the model's own outputs bias the next training set.

A worked opening: "Design a restaurant recommender"

Clarify   : goal = more orders from the home screen; 20M DAU; 500K restaurants;
            home screen must render in < 300 ms; we log impressions, clicks, orders.
Frame     : rank restaurants per user; label = ordered within the session after
            an impression (clicks are a secondary, noisier signal).
Data      : impression logs joined to orders; negatives = shown but not ordered;
            split by time (train on weeks 1-6, test on week 7).
Model     : candidates = nearby + open now + two-tower retrieval (~1,000);
            ranker = gradient-boosted trees, then a multi-task deep model.
Evaluate  : offline NDCG@10 and recall@100; online orders per session,
            guardrails = delivery time, cancellation rate, restaurant diversity.
Serve     : precomputed user embeddings, online ANN + ranker, cache per area;
            fallback = popular-nearby list if the ranker times out.
Monitor   : feature null rates, score distribution, daily retrain, weekly review
            of new-restaurant exposure (cold start).

Every line is a decision the interviewer can probe. Full walkthroughs of this shape are in the ML system design examples, and a list of what gets asked is in ML system design interview questions.

Where it’s used

Applied ML and ML engineer loops

Most big tech ML loops include one or two ML design rounds next to coding and ML fundamentals; ranking, recommendations, ads and integrity are the usual themes.

Data science and research engineer roles

A lighter version that leans on framing, metrics and experimentation, often with a product-sense flavour.

AI engineer roles

Similar structure, but the system is built around a foundation model; see the AI engineer interview framework.

In an interview

  • Open with clarifying questions and write the business objective and constraints down.
  • State the label and task type in one sentence before naming any model.
  • Propose a baseline, then a stronger model, and say what would justify the switch.
  • Name an offline metric, an online metric and at least two guardrails.
  • Close with monitoring, retraining and the feedback loop.

Frequently asked questions

How do I answer a machine learning system design question?

Follow seven steps: clarify requirements, frame the problem as an ML task with a clear label, design the data and labels, choose features and a model starting from a baseline, define offline and online evaluation, design serving within the latency budget, and plan monitoring and retraining.

What do interviewers look for in an ML system design round?

A precise problem framing, realistic data and label plans, a baseline before complex models, metrics that match the task and business goal, a serving path that meets latency, and awareness of drift, feedback loops and failure modes.

What is the most common mistake in ML system design interviews?

Jumping to a model architecture before agreeing on the business objective, the label and the metric. The framing decides everything else, so spend the first ten minutes on it.

Further reading