ML System Design · Module 43 of 47 · 12 concepts · about 14 min

The ML System Design Interview

How ML system design interviews are run and scored, a minute-by-minute plan, how to open, frame, draw and go deep, how to talk about trade-offs and handle pushback, what separates junior from senior answers, and the mistakes that sink otherwise good candidates.

At work: One of the deciding rounds for ML engineer, applied scientist and senior data scientist roles. Preparation pays off more here than in almost any other round, because the format is so consistent.

How the interview is run and scored

What it is

A typical round: 45 to 60 minutes, one open prompt ('design a system to recommend products', 'detect fraudulent payments'), a whiteboard or shared document, and an interviewer who asks follow-ups. Interviewers usually score:

  • problem understanding: clarifying questions, requirements, a precise ML framing;
  • data: sources, labels, biases, features and how they are served;
  • modelling: a baseline, a justified model choice, awareness of alternatives;
  • evaluation: offline measures that fit the task, online experiments, guardrails;
  • production: serving, scale, latency, monitoring, retraining, failure handling;
  • communication: structure, clarity, trade-offs, responding to hints.

Why it matters

Knowing the rubric tells you where to spend time.

  • Modelling is one row of six; candidates who spend thirty minutes on it fail the others.
  • Communication runs through all of them: a good design poorly explained scores like a weak one.

In the real world: Published interview guides from large tech companies list almost exactly these areas, and interviewers write feedback against each.

Visual example

Rubric

Modules to revise in the last column.

What interviewers listen for in each area
areastrong signalrevise
Problem understandingPrecise target and metric before any modelModules 1, 3, 4
DataLabels, delay, bias and logging named unpromptedModules 5–8
FeaturesFreshness and serving path for eachModules 9–11
ModellingBaseline, justified choice, stages for rankingModules 12–15
EvaluationRight metric for the task; A/B with guardrailsModules 16–17
ProductionLatency budget, fallback, monitoring, retrainingModules 18–23
Applying itRecognises the problem's shape and its hard partModules 26–41

Treating it as a test of the latest architecture. Interviewers rarely reward naming a fashionable model; they reward a defensible system.

A plan for forty-five minutes

What it is

Follow the eight steps of module 1 with a rough clock in mind:

  • spend the first five minutes on questions and requirements;
  • draw the end-to-end system by minute twenty;
  • use the middle for one or two deep dives where the problem is hardest;
  • keep the last minutes for monitoring, a summary and questions.

Adjust to the interviewer: if they steer you into a deep dive, follow, then return to the plan.

Why it matters

A plan protects you from the most common failure: running out of time before serving, evaluation or monitoring.

  • Interviewers notice when a candidate manages the time themselves.

In the real world: Candidates who glance at the clock and say 'I have about ten minutes left, so let me cover serving and monitoring' consistently score higher on structure.

Visual example

Computed

A 45-minute plan. The end-to-end picture is complete by minute 25.

Rough guide; follow the interviewer's lead
stepminutesends atcover
Clarify requirements55Goal, users, scale, latency, constraints; write them down
Frame as ML49Target, task type, offline and online metrics
Data and labels514Sources, logging, label definition and delay
Features519Groups, freshness, how each is served
Model625Baseline, then the model for the constraints; stages if ranking
Evaluation631Offline measures and slices; the A/B test
Serving637Batch or online, the request path, latency, fallback
Monitoring and iteration441What is watched; retraining; failure modes
Summary and questions445Recap trade-offs; what you would do next

Spending twenty minutes on features and never reaching evaluation. An unfinished design scores lower than a complete, simpler one.

Opening well

What it is

The first five minutes set the tone:

  • restate the problem in one sentence;
  • ask the few questions that change the design: goal and metric, scale, latency, labels, constraints (module 3);
  • state assumptions for anything unknown ('I'll assume 10 million daily users and a 100 ms budget');
  • write them down where both of you can see them, and refer back to them.

Why it matters

It shows you design from requirements, not from a memorised answer.

  • Written assumptions become the justification for every later decision.
  • It also gives the interviewer a chance to steer you towards what they want to discuss.

In the real world: Interviewers often deliberately leave the prompt vague to see whether the candidate asks; designing without asking is marked down even if the design is good.

Q: Weak opening

“OK, so for recommendations I'd use a two-tower model with a transformer ranker...” The model in the first sentence, before the goal or the limits.

Q: Strong opening

“So the goal is more purchases from the home-screen row. Before designing, a few questions: what metric does the business watch, how many users and requests at peak, how fast must the row load, and do we log what users were shown? ... I'll assume 8 million views a day, 100 ms, and that we log impressions. Let me write those down.”

Asking questions and not using the answers. If the interviewer says 'latency is 50 ms', every later choice should visibly respect it.

Framing out loud

What it is

Before any architecture, say:

  • the prediction target, precisely (event and window);
  • the task type and why (classification, regression, ranking);
  • the offline metric and the online metric, and one guardrail;
  • the baseline you would beat.

Why it matters

This is the step most candidates skip and most interviewers weigh heavily.

  • It turns a vague product question into an engineering problem.
  • Everything later (labels, features, evaluation) follows from it.

In the real world: A one-line framing such as 'predict the probability the user adds this item to the basket in this session; NDCG at 10 offline, basket additions per view online, latency and order value as guardrails' often earns the strongest early signal of the interview.

Choosing accuracy as the metric for an imbalanced or ranking problem. It signals inexperience immediately (modules 7 and 16).

Draw the whole system, then go deep

What it is

Draw the end-to-end picture early, at a high level:

  • data sources and logging → labels → feature pipelines and store → training pipeline and registry → serving path → monitoring, with the loop back;
  • then say where you want to go deep, or ask the interviewer: 'I could go deeper on candidate retrieval or on labels; which is more useful?'

Why it matters

The full picture shows you see the whole system before optimising any part.

  • It gives the interviewer a map to point at.
  • Deep dives then have context, and nothing major is left out if time runs short.

In the real world: Many interviewers say the moment they relax is when the candidate draws the loop from serving back to training: it shows production experience.

Visual example

Board

Boxes first; detail later.

The diagram to have on the board by minute 25

  1. LoggingImpressions, actions, served features
  2. LabelsDefinition, delay, sampling
  3. FeaturesBatch, streaming, on-demand
  4. TrainingPipeline, registry, gate
  5. ServingRequest path, fallback
  6. MonitoringFour layers; back to training

Going deep on the first box (data) for twenty minutes before anything else exists on the board.

Where to go deep

What it is

Spend deep-dive time where this problem is hard:

  • recommendations and search: candidate generation, ranking features, position bias, cold start;
  • fraud and moderation: labels and delay, imbalance, thresholds and review capacity, adversaries;
  • ETA and forecasting: the target and its asymmetry, live features, evaluation over time;
  • ads: calibration, the auction, sparse features;
  • imagery and video: detection recall on small objects, making video searchable, the domain gap;
  • feeds and social graphs: the value score beyond engagement, two-hop scale, privacy of suggestions;
  • events and listings: items that are always new; similarity learned from sessions;
  • any problem: point-in-time correctness and training-serving skew.

Why it matters

Deep dives are where seniority shows.

  • Choosing the right one shows judgement.
  • Going deep on the generic parts (load balancers, databases) wastes the time that ML-specific depth would earn.

In the real world: Interview feedback for senior candidates commonly cites one excellent deep dive (for example, label delay in fraud) as the deciding factor.

Going deep on general software infrastructure in an ML design round. Unless asked, the interviewer wants ML decisions, not database replication.

Talking about trade-offs

What it is

For each significant choice, say briefly:

  • what you chose;
  • the alternative;
  • why, tied to a requirement;
  • what it costs, and when you would change your mind.

Why it matters

Trade-offs are the core of design, and the clearest signal of experience.

  • 'Batch would be cheaper, but the row must react to the current basket, so I'll precompute candidates in batch and rank online' is a complete trade-off in one sentence.

In the real world: Interviewers frequently ask 'what are the downsides of that?' as a standard probe; candidates who volunteer the downside first rarely get asked.

Q: Without a trade-off

“I'll use a deep neural network for ranking.”

Q: With a trade-off

“For ranking I'd start with LightGBM: it's strong on these tabular features and scores 500 items well inside 40 ms. A deep multi-task model could add a little by learning from clicks and purchases together, so I'd try it once the pipeline works, if it fits the budget.”

Presenting every choice as obviously best. Interviewers then push until they find the trade-off you did not mention.

Hints, pushback and not knowing

What it is

How to handle the moments that go off-script:

  • a hint ('what about new users?') is the interviewer telling you what they want to discuss: take it, address it, return to your plan;
  • pushback ('why not just use X?'): consider it seriously; agree if it is better; if not, explain the trade-off calmly;
  • not knowing: say so, then reason from principles ('I haven't used that, but if it works like Y, I'd expect...');
  • changing your mind when given new information is a strength, not a weakness.

Why it matters

Interviews test how you work with people, not just what you know.

  • Defensiveness under pushback is marked down more than an imperfect design.
  • Reasoning aloud from first principles is often scored higher than a recalled fact.

In the real world: Interviewers often deliberately challenge a correct choice to see whether the candidate can defend it with reasons, rather than abandoning it.

Ignoring a hint to stay on your script. Interviewers give hints because the conversation is heading somewhere they will not be able to score.

Finishing strongly

What it is

In the last minutes:

  • cover monitoring: what you would watch, at four layers, and the alerts;
  • cover iteration: retraining, the next experiments, how you would improve version 2;
  • summarise the design in a few sentences, naming the two or three key trade-offs;
  • mention risks: fairness, privacy or abuse if relevant.

Why it matters

Monitoring and iteration show you think beyond launch, which is what distinguishes production experience.

  • A crisp summary leaves the interviewer with a clear memory of a coherent design.

In the real world: A short closing summary is one of the easiest ways to lift a 'communication' score, and few candidates do it.

Ending mid-sentence on a deep dive. Watch the clock and leave three to five minutes for the close.

What separates levels

What it is

The same question is answered differently at different levels:

  • junior: a correct, complete pipeline; a sensible baseline and model; standard metrics; needs prompting on production concerns;
  • mid-level: drives the structure; names labels, skew and monitoring unprompted; justifies choices with requirements;
  • senior: identifies the hardest part of the problem early; deep, accurate dives; quantifies trade-offs; designs for failure, iteration and team ownership;
  • staff and above: frames the business problem itself; considers several systems and teams; anticipates long-term costs, risks and organisational impact.

Why it matters

Knowing the bar helps you aim.

  • Senior candidates are expected to lead without prompting and to go beyond a standard answer in at least one area.

In the real world: Interview feedback often reads 'solid, but needed prompting on monitoring and labels', which is the difference between a mid-level and a senior outcome.

Giving a textbook answer at a senior interview. Correct but generic designs are typically scored at a lower level.

Mistakes that sink good candidates

What it is

The most common, in rough order of frequency:

  • naming a model before the goal, target and metric;
  • no baseline;
  • accuracy as the metric for imbalanced or ranking problems;
  • features that would not exist at prediction time (leakage);
  • no word on where labels come from or when they arrive;
  • a single model for everything at scale, with no retrieval stage;
  • no fallback, no monitoring, no retraining;
  • running out of time before evaluation and serving.

Why it matters

Each is easy to avoid once named.

  • Most of them come from jumping to the model; the framework in module 1 prevents nearly all of them.

In the real world: Interviewers asked about their most common negative feedback name 'jumped to the model' and 'no evaluation plan' far more than any knowledge gap.

Memorising one design and forcing every question into it. Interviewers vary the prompt precisely to detect this.

A one-page template

What it is

Memorise the shape, not an answer. Write these headings on the board at the start and fill them in as you go.

Why it matters

A visible structure keeps you and the interviewer oriented.

  • It also makes it obvious if a section is still empty with ten minutes left.

In the real world: Candidates who practise with a fixed template report that, after a few mock interviews, the structure becomes automatic and all their attention goes to the problem itself.

1. REQUIREMENTS   goal & metric | users & scale (peak QPS) | latency | freshness | constraints
2. FRAMING        target (event + window) | task | offline metric | online metric | guardrails | baseline
3. DATA & LABELS  sources | what to log (impressions, served features) | label definition & delay | biases
4. FEATURES       user | item | user×item | context ; each: batch / streaming / on-demand
5. MODEL          baseline -> chosen model (why) ; stages: retrieval -> rank -> re-rank
6. EVALUATION     offline (time split, slices, intervals) | online (A/B unit, sample size, guardrails)
7. SERVING        batch / online / hybrid | request path & latency budget | fallback | scale & cost
8. MONITORING     system | data | model | business ; retraining policy ; failure modes ; fairness & abuse

Filling the template mechanically in the same depth everywhere. Use it as a checklist, and spend the depth where the problem is hard.