Answer along a five-part spine, in this order: frame the ML problem and the decision it serves, define the label and how the data gets collected, build features and say where each one comes from at request time, pair an offline metric with an online metric, then serve, monitor and handle drift. Model architecture is one justified sentence inside part three, not the answer. Almost every no-hire in this round is the same mistake made twice, and both times it is reaching for architecture too early. Below: the spine walked end to end on a recommendation prompt, and exactly what the interviewer writes down when you skip ahead.
The five parts, and what each one has to produce
The spine is not a script to recite. Each part has an artefact the interviewer can tick, and a follow-up question that arrives within thirty seconds if the artefact is missing.
| Part | What you must produce | The question that comes if you skip it |
|---|---|---|
| 1. Frame | The decision the model serves, who consumes the output, the action that follows, and the non-ML baseline you have to beat. | "Ranked by what?" or "What would you do without a model at all?" |
| 2. Labels and data | What counts as a positive, what counts as a negative, how long the label takes to arrive, and how the logging works. | "Where does that training row come from, and did you show that item to the user?" |
| 3. Features | Groups by entity, plus the serving path and freshness of each group. Then one sentence on the model. | "The request arrives. Where does that feature come from, and how old is the value?" |
| 4. Metrics | One offline metric, one online metric, one guardrail, and a named reason the two might disagree. | "AUC went up and the business metric did not move. What happened?" |
| 5. Serving and monitoring | A latency budget with a number on it, a rollout plan, what you alert on, and the retraining cadence. | "It is three in the morning and this model is behaving oddly. What paged you?" |
Walked end to end: recommendations on a food delivery home screen
Prompt: "Design the recommendation system for the home screen of a food delivery app." Here is the whole spine, at roughly the depth an hour allows.
Frame the problem and the decision it serves
The decision is narrow: which restaurants appear in roughly the top fifteen tiles, in what order, for one user in one delivery zone at one moment. The action that follows a good decision is a completed order, not a tap, so the objective is P(order | shown) rather than click-through rate. Say the tension out loud now, because it pays off twice later. "Clicks are the label I can collect in volume, orders are the label I actually want, and that gap is going to show up in my metrics section." Then name the baseline: most-ordered restaurants in the zone, filtered to open and in range. That baseline is genuinely hard to beat, and saying so is a seniority signal.
Labels and how the data gets collected
Log every impression with its slot position, then taps, basket adds, orders placed and, hours later, cancellations and refunds. A positive is an order placed within the session. A negative is an item shown and not tapped, which is where the trouble starts: position drives clicks, so an untapped tile in slot fourteen is weak evidence of dislike. Log position, train with it as a feature, then hold it at a constant value when serving. Note that label delay is asymmetric, minutes for an order and hours for a cancellation, so you train on order-placed at a thirty minute horizon and run a correction job for orders that later fall through. Finish with the uncomfortable part: you only observe outcomes for items your current model chose to show, so your training set is a photograph of your old ranker. Reserve one or two percent of impressions for randomised exploration so the next model has something less biased to learn from.
Features, with a serving path attached to each group
User: cuisine affinity over thirty and ninety days, price band, order frequency, time-of-day pattern. Restaurant: historical conversion given an impression, rating, prep time distribution. Context: hour, day, weather, current delivery ETA, distance, and whether the kitchen is open and accepting orders right now. Interaction: has this user ordered here before, days since, cuisine match. For each group, state the path. User aggregates are precomputed nightly into a feature store and read as one key lookup, restaurant statistics refresh hourly, ETA and open status come live from services that have to answer in single-digit milliseconds. Then add the constraint interviewers are waiting for: training rows must carry feature values as of the impression, not as of today, or a restaurant that got popular in March leaks backwards into a January row. Only now the model, in one sentence with a reason attached. The delivery radius already bounds the candidate set to a few hundred restaurants, so retrieval is cheap and the interesting work sits in the ranker: a gradient-boosted tree over these largely tabular features, with a neural ranker as the upgrade once learned embeddings and traffic volume justify it.
Offline metric versus online metric
Offline: NDCG at 15 and recall at 15 on a time-based split, never a random split, plus a calibration check, because the score feeds business rules that assume a probability means something. Online: orders per session as the primary metric, with guardrails on cancellation rate, ETA breach rate and exposure for newly onboarded restaurants. Give the experiment design in one line, shadow first, then interleaving or a small A/B sized on the metric you actually intend to move. Then name a specific way the two can disagree, which is the part most candidates never reach.
Serving, monitoring and drift
The home screen wants to render in about 300ms at p95, so the ranker gets roughly 100ms for a few hundred candidates, which forces features to be lookups rather than joins and pushes anything expensive into precomputation. Monitor three layers, not one: input features, the prediction distribution, and label arrival lag. A null rate spike on the live ETA service is the most common real incident of the three, and it degrades quality quietly instead of erroring. Drift here has two sources, ordinary seasonality and a feedback loop in which the model shapes the data it will later be trained on. Retrain weekly with daily incremental updates, keep the previous model version and the popularity baseline behind a single config flag, and define the rollback trigger before launch rather than during the incident.
The two places candidates jump straight to architecture
Both jumps happen inside the first fifteen minutes, and both are recoverable if you catch yourself.
Jump one, in the opening minute. The prompt is read out and the candidate says "I would do two-tower retrieval, then a gradient-boosted ranker on top." The interviewer replies "ranked by what?" and the only honest answer available is relevance, which means nothing. That scores against the problem-framing row, because you have not shown you can turn a business goal into an ML objective, and everything downstream is now unanchored: you cannot defend a label, a metric or a trade-off without an objective to defend it against. There is a second cost that rarely gets said aloud. A memorised architecture is exactly what someone who has only read blog posts produces, so a strong candidate who opens this way has thrown away their own differentiator in the first sixty seconds.
Jump two, the moment features come up. Asked "what features would you use", the candidate answers with representation learning: "I would embed the session history with a transformer and learn user and item embeddings jointly." That may well be a good model, but it is not an answer to the question, and it is marked on the production judgement row. The follow-ups land immediately. Where does that embedding come from when the request arrives, how stale is it, and was that value knowable at the time of the impression? A design whose features have no serving path is the clearest available signal of someone who has read papers and not shipped a model. One blunt rule catches both jumps: if you have said the word "model" before you have said the word "label", back up.
Offline number up, online number flat: causes worth having ready
Interviewers ask this as a follow-up in almost every ML design round. Two or three specific causes are worth more here than any architecture detail you could offer instead.
| Cause | What you observe | What you say you would do |
|---|---|---|
| Position bias untreated | Offline ranking metrics improve, orders per session do not move. | Log slot position, train with it, hold it constant at serving so the model cannot lean on it. |
| Random split instead of a time split | Large offline gains that evaporate in the experiment. | Split by time, and check whether any feature was backfilled with values from after the label. |
| Optimising the proxy label | Click-through rate rises, orders stay flat, appealing photography outranks good food. | Weight the label towards completed orders, or train a multi-objective ranker with the trade-off stated. |
| The bottleneck is retrieval, not ranking | The ranker improves and nothing changes, because the right restaurant was never a candidate. | Measure recall of the candidate set separately from ranking quality, and fix the stage that is actually limiting. |
| A guardrail is absorbing the gain | Orders up slightly, cancellations and ETA breaches up more. | Treat late delivery as a constraint on the ranker, not as an afterthought in the readout. |
Where a copilot is the wrong tool for this round
An ML design hour suits live assistance badly, and it is worth being straight about why. The hour is mostly you talking and drawing. The interviewer may speak for four or five minutes in total, which gives a listening tool very little to work with. Interview Copilot transcribes the interviewer on-device and drafts a speakable answer in about a second, which fits behavioural rounds and rapid technical questions far better than a design conversation. The specific limits:
- Windows 10 and 11 only. No macOS, no Linux, no mobile, no browser extension.
- Capture exclusion covers screen sharing and screen recording, and nothing beyond that. The overlay is excluded from screen capture at the operating system level, so it does not appear in Zoom, Teams, Meet, OBS or screenshots, while staying visible on your own monitor. It does nothing about a webcam, a lockdown browser, eye tracking, a second-device camera, or a person in the room with you.
- The grade is in the follow-ups. A label definition you did not reason your way to falls apart at the second question, and in this round the second question always comes. Reading a suggestion mid-diagram also breaks the narration the interviewer is scoring.
- The rules belong to the company. Some interviews permit documentation and AI assistance, some do not. Read the instructions, and ask when they are ambiguous.
The useful work for this round happens before it, not during it.
Rehearse the spine on prompts you will actually get
Take four prompts, home screen recommendations, search ranking, fraud detection on transactions, and a content moderation queue, then run each through the same five parts aloud with a timer. The spine holds for all four. Only the labels change, and the label section is where each prompt becomes interesting: fraud brings extreme class imbalance and adversarial drift, moderation brings annotator disagreement and an explicit precision-recall trade-off you have to price. The question banks supply prompts to run this against, and the company Q&A generator builds a bank for a specific company and role, which matters because a marketplace team and an ads team will push on completely different parts of the spine. OfferPilot AI is free for 5 minutes a day with no card, and paid plans start at $39 a month, metered on listening time only.
Related guides
- ML Engineer vs Data Scientist Interview: Every Round Compared
- API Design Interview vs System Design Interview: The Tells
- Data Scientist Product Sense Interview Questions: 4-Move Answer
- AI Copilot for Product Manager Case Interviews: 5 Case Types
- React Live Coding Interview Help: One Multi-Scroll Capture