Machine Learning Engineer Interview Prep: Questions and a Mock Test
The reliable way to fail a machine learning engineering interview is to prepare as though it were a machine learning exam. The theory rounds exist, but the rounds that decide the outcome are about the system around the model: where the features come from, whether the offline number will survive contact with production, and what happens six months later when the world has moved and the model has not. This page works through what is tested, and ends with a graded mock across the six areas the questions cluster into.
How the process is structured
| Round | Length | What it tests |
|---|---|---|
| 1.Coding[2] | Not published | General software engineering, usually in Python, plus data manipulation. Expect ordinary data structures and complexity reasoning rather than model implementation, and often a task involving reshaping or joining data correctly under time pressure. |
| 2.Machine learning fundamentals[1] | Not published | Bias and variance, regularisation, loss functions, the mechanics of gradient-based training, and the ability to choose and defend an evaluation metric for a stated problem. Depth is expected on whatever appears on your own CV. |
| 3.ML system design[1] | Not published | End to end design of a system around a model: data collection and labelling, features and their freshness, training cadence, serving path and latency budget, evaluation both offline and online, and monitoring. Google's published guidance frames the strong opening as "keep the first model simple and get the infrastructure right". |
| 4.Production and operations[3] | Not published | What happens after launch. Training-serving skew, drift detection, retraining triggers, rollback of a model, and the automation levels described in Google Cloud's MLOps guidance, where level 1 introduces "automated data and model validation steps" along with pipeline triggers and metadata management. |
Bracketed markers point to the dated sources at the end of this article. Loops change; check the retrieval dates before relying on a round count.
Most of the job is not the model
The framing that best predicts a strong candidate is treating the model as one component inside a system that has to keep working. That framing has an authoritative source. The 2015 NIPS paper Hidden Technical Debt in Machine Learning Systems, by Sculley and colleagues at Google, argues that "it is dangerous to think of these quick wins as coming for free" and that "it is common to incur massive ongoing maintenance costs in real-world ML systems".
The paper names the specific risk factors, and the list is close to a syllabus for the systems half of an ML interview: "boundary erosion, entanglement, hidden feedback loops, undeclared consumers, data dependencies, configuration issues, changes in the external world, and a variety of system-level anti-patterns".
Two of those come up constantly. Entanglement is the observation that changing one input changes the meaning of all the others, so no feature is genuinely independent and no change is genuinely local. Undeclared consumers are the teams silently reading your model's output, who will be broken by a change you thought was yours to make. Being able to name these and give an example from your own work is a strong signal, because it shows you have maintained a model rather than only shipped one.
Start simple, and be able to defend it
Google's Rules of Machine Learning is short, free, and quoted often enough by interviewers that it is worth reading before a loop. Its opening position is deliberately deflationary. Rule 1 is "Don't be afraid to launch a product without machine learning", with the reasoning that "machine learning is cool, but it requires data". Rule 4 is "Keep the first model simple and get the infrastructure right", because "the first model provides the biggest boost to your product, so it doesn't need to be fancy".
This is a common trap in system design rounds. Asked to build a recommendation or ranking feature, many candidates reach immediately for a deep model. The answer that scores better usually starts with a heuristic or a simple baseline, spends its energy on the data path, logging, and evaluation, and treats model sophistication as the thing you buy once the infrastructure can tell you whether it helped.
The corollary matters too. If you propose a simple baseline, expect to be pushed on when you would move past it, and the answer should be tied to measurement rather than to fashion.
Training-serving skew, the classic elimination question
Skew is the gap between the features a model saw in training and the features it sees in production, and it is the single most common cause of a model that looked excellent offline and disappointed in production. Interviewers use it because it separates people who have deployed a model from people who have only trained one.
Rules of ML gives an unusually concrete prescription. Rule 29 states that "the best way to make sure that you train like you serve is to save the set of features used at serving time, and then pipe those features to a log to use them at training time". In other words, do not recompute training features from a warehouse using code that merely resembles the serving path; log what serving actually used. Rule 37 asks you to measure the skew explicitly, distinguishing performance on training versus holdout data, holdout versus next-day data, and next-day versus live traffic.
A strong answer names the three usual sources: different code computing the same feature in two places, different data sources with different freshness, and feedback loops where the model's own output alters the distribution it is later trained on. Mentioning a feature store as one structural answer is fine, provided you can say what problem it solves rather than treating it as a product name.
Evaluation, where most candidates lose marks
Evaluation questions are where interviewers find out whether you can be trusted with a number. Several failures recur.
The first is accuracy on an imbalanced problem. At one percent positives, a model that predicts negative always scores 99 percent, so accuracy is not merely a weak metric here, it is actively misleading. Precision, recall, F1, and the tradeoff between them are the expected vocabulary, along with the ability to say which error is more expensive in the specific business context you were given.
The second is leakage. If a feature encodes information unavailable at prediction time, the offline score is fiction. Time-based splits rather than random splits, and grouping by entity so the same user cannot appear in both train and test, are the standard defences.
The third is confusing threshold-free and threshold-dependent measures. ROC AUC summarises ranking quality across all thresholds and is famously optimistic under heavy class imbalance, because the false positive rate is diluted by an enormous negative class. Precision-recall AUC is the better summary there. And whatever the offline metric, the senior move is to connect it to an online one and to say how you would run the experiment that establishes the link.
After the launch: drift, retraining and monitoring
Google Cloud's MLOps architecture guidance is a useful frame for the operational round, because it names the maturity levels explicitly. Level 0 is a manual, script-driven, interactive process where data analysis, preparation, training and validation are all done by hand. Level 1 automates the pipeline to achieve continuous training, which requires automated data and model validation, pipeline triggers and metadata management. Level 2 adds CI/CD for the pipeline itself.
The distinction the guidance draws is worth carrying into an answer. Continuous integration here is "not only about testing and validating code and components, but also testing and validating data, data schemas, and models". Continuous delivery delivers a system, an ML training pipeline, that itself deploys another service. Continuous training is the property unique to ML systems.
On drift, be precise about which kind. Data drift is a change in the input distribution. Concept drift is a change in the relationship between inputs and the target, which is worse because inputs can look entirely normal while the model quietly becomes wrong. The monitoring answer follows from that: track input distributions and prediction distributions continuously, because labels usually arrive late or not at all, and treat a change in prediction distribution as a signal to investigate rather than as proof of anything.
What they actually ask
1.Your model scores 0.94 AUC offline. It ships, and the business metric does not move. Where do you look?
What a strong answer coversThe strongest answers do not start with the model. They enumerate the ways an offline number can be true and irrelevant: the offline metric is not connected to the business metric, the evaluation set leaked information unavailable at prediction time, the split was random when it should have been temporal, training-serving skew means production features differ from training features, or the model is accurate but its output is not acted on because of a threshold, a UI, or a downstream rule. Good candidates propose an ordered diagnostic: verify the serving features against logged training features first, because that is both the most common cause and the cheapest to check.
2.How would you detect that a model in production has gone stale, given that labels arrive three months late?
What a strong answer coversThe constraint is the point: you cannot compute accuracy in a useful timeframe, so you need proxies. Strong answers monitor the input distribution and the prediction distribution, using a distance measure over features against a reference window, and alert on shifts rather than on absolute values. They distinguish data drift from concept drift and note that only the former is visible without labels. They also mention cheaper partial signals: a small human-labelled sample, delayed labels backfilled for retrospective scoring, and any fast-arriving proxy outcome. The best answers add that a distribution alert is a prompt to investigate, not evidence of degradation, since a legitimate product change can shift inputs without harming the model.
3.Design the system behind a feature that recommends items on a marketplace home page.
What a strong answer coversExpected structure: clarify the objective and how success is measured before any modelling; propose a simple baseline such as popularity or recency filtered by availability; then a two-stage design with cheap candidate generation followed by a heavier ranking model. Strong answers give a latency budget and derive the architecture from it, describe where features come from and how fresh each is, and explain how training data is logged including the position bias that logged clicks introduce. They cover cold start for both new users and new items, and close with the experiment design that would show the feature works. Reaching for a large model first, without the data path, is the common weak pattern.
4.A colleague proposes retraining the model nightly on the last 30 days of data. What is your response?
What a strong answer coversThe good answer neither accepts nor rejects it, but asks what problem retraining solves and how it will be validated. Points to raise: is there evidence of drift that justifies the cadence, does 30 days contain enough positives, does a rolling window discard seasonality the model needs, and what stops a bad retrain from reaching production. Automated retraining without automated data and model validation is a way of shipping a regression on a schedule, which is why the MLOps guidance pairs continuous training with automated validation steps. Strong answers require a champion-challenger comparison against the incumbent on a fixed holdout before promotion, plus a rollback path.
5.You are asked to predict customer churn. The label is defined as no purchase in 90 days. What concerns you?
What a strong answer coversThis question rewards attacking the problem statement rather than the model. Concerns worth raising: the label definition is a business choice that may not match churn as anyone experiences it; the 90-day window means the freshest 90 days of data cannot be labelled, so the effective training set is older than it looks; seasonality can make a 90-day gap normal for some customer segments; and a prediction is only useful if there is an intervention it can trigger in time. Strong candidates also raise the feedback loop, since acting on predictions changes the outcome being predicted and contaminates future training data unless a holdout is deliberately left untreated.
6.Explain the tradeoff you would make between a gradient boosted tree ensemble and a neural network for a tabular problem.
What a strong answer coversThe technically grounded answer is that gradient boosted trees remain a very strong default on tabular data, handle mixed types and missing values with little preprocessing, train fast on modest hardware, and are easier to explain to a stakeholder. Neural networks become attractive when there is a lot of data, when there are high-cardinality categorical features that benefit from learned embeddings, when unstructured signals such as text or images need to be fused in, or when transfer from a pretrained model is available. The senior signal is grounding the choice in the operational constraints, retraining cost, latency budget, interpretability requirements and the team's ability to maintain it, rather than in which family is more fashionable.
Three sample questions, answered
These three show the level the mock is pitched at, with the answer and the reasoning in the open. The graded paper keeps its answer key server-side.
- Recall
- Accuracy
- Precision
- Precision-recall AUC
Why: With 1% positives, always predicting the negative class scores 99% accuracy while catching no fraud at all. Accuracy is dominated by the majority class and hides exactly the behaviour that matters. Precision, recall and precision-recall AUC all remain sensitive to performance on the rare positive class.
- Retrain the model at least once per day
- Use the same random seed for training and serving
- Compute training features from the warehouse using a mirrored implementation
- Log the features used at serving time and use those logs as training data
Why: Rule 29 states that "the best way to make sure that you train like you serve is to save the set of features used at serving time, and then pipe those features to a log to use them at training time". Mirroring the implementation is precisely the approach that produces skew, because two implementations drift apart.
- Future information leaks into training, so the test score is optimistic
- The classes become imbalanced
- The test set becomes too small to be reliable
- Feature scaling can no longer be applied consistently
Why: A random split lets the model train on rows that occur after rows in the test set, which is information it will never have at prediction time. The measured score is then unachievable in production. Temporal data needs a time-based split, training on the past and testing on the future.
An 18-question knowledge check
This is a knowledge check, not a simulation. The real loop happens on a whiteboard, in an editor, and in conversation. What this paper does measure is the underlying knowledge those rounds draw on: each question is tagged with a topic, grading happens per topic, and a weak topic points you at the course that fixes it.
- 1.Which of these is the clearest example of data leakage?Data, features and leakage
- 2.You compute a feature by aggregating over the full dataset before splitting into train and test. What have you done?Data, features and leakage
- 3.Hidden Technical Debt in Machine Learning Systems names 'undeclared consumers' as a risk. What is the danger?Data, features and leakage
- 4.A model shows low training error and high validation error. What is the standard diagnosis?Training, optimisation and regularisation
- 5.What does L1 regularisation do that L2 does not?Training, optimisation and regularisation
- 6.During training the loss becomes NaN after a few hundred steps. Which is the most likely first thing to check?Training, optimisation and regularisation
- 7.Under heavy class imbalance, why can ROC AUC look misleadingly good?Evaluation and metrics
- 8.A classifier outputs a score of 0.8 for a group of cases. Calibration means what?Evaluation and metrics
- 9.Which pair of metrics is in direct tension as you lower a classifier's decision threshold?Evaluation and metrics
- 10.Which situation is concept drift rather than data drift?Serving, skew and drift
- 11.In Google Cloud's MLOps maturity framing, what defines level 1 rather than level 0?Serving, skew and drift
- 12.Shadow deployment of a new model means what?Serving, skew and drift
- 13.Why does data parallel training alone stop working as models grow?Distributed training at scale
- 14.What does gradient accumulation achieve?Distributed training at scale
- 15.In mixed-precision training, why is a loss scaling factor typically applied?Distributed training at scale
- 16.A hiring model shows equal accuracy across two demographic groups but very different false negative rates. What does this mean?Fairness and explainability
- 17.What is the main limitation of SHAP values as an explanation?Fairness and explainability
- 18.Removing a protected attribute from the feature set achieves what, in practice?Fairness and explainability
Sources
Hiring loops change. Every claim above carries a retrieval date so you can judge how current it is.
- [1]Google, Rules of Machine Learning: Best Practices for ML Engineering · retrieved 2026-08-13
- [2]Sculley et al., Hidden Technical Debt in Machine Learning Systems, NIPS 2015 · retrieved 2026-08-13
- [3]Google Cloud, MLOps: Continuous delivery and automation pipelines in machine learning · retrieved 2026-08-13
Refresh your memory
Free learning paths covering the ground this loop tests, whatever your score. Each one ends with a shareable certificate.
- AIDeep Learning Foundations
Build and train neural networks from scratch. By the end you will implement forward and backward passes in NumPy, tune optimizers and regularizers to close the train-val gap, design convolutional architectures for image tasks, and read transformer papers fluently — understanding self-attention, multi-head attention, and positional encodings from first principles.
4 lessons - AIMLOps: Keeping a Model Working After You Ship It
Training a model is the part that works. The system around it is what decays, and it decays quietly: no exception, no alert, just answers that are slowly less right. This path covers what actually breaks. Why changing one feature moves every weight, the three levels of automation and which one you need, the skew between training and serving that no isolated test can see, and the monitoring that decides when a model has stopped earning its place.
4 lessons - MathProbability and Statistics for Machine Learning
Build the mathematical foundation every ML practitioner needs: go from sample spaces and distributions to Bayesian inference and hypothesis testing. By the end you will be able to choose the right distribution for any modelling problem, derive maximum likelihood estimators, reason about uncertainty the Bayesian way, and correctly interpret p-values and confidence intervals.
4 lessons - AIDistributed Training at Scale: FSDP, Tensor and Pipeline Parallelism
Mixed-precision Adam costs 16 bytes per parameter, so a 70B model needs 1120 GB of state before a single activation is stored. Getting that onto real hardware, and keeping the run alive while a component fails every three hours, is the skill behind every frontier model. This path builds it: where the memory actually goes, how ZeRO and FSDP shard what data parallelism duplicates, how tensor and pipeline parallelism split the computation itself, and what makes a fifty-day run finish.
4 lessons - AIExplainable AI: Making Model Decisions Accountable
A model that predicts well can still be impossible to justify, and "the algorithm decided" is not an answer to a rejected applicant, a clinician, or an auditor. This cursus builds the field from the mechanism up: the taxonomy and the global tools (permutation importance, partial dependence, ICE), then local attribution with LIME and SHAP including the Shapley axioms that make SHAP unique, then Integrated Gradients, Grad-CAM, and counterfactual explanations. It ends with the harder question: explanations can fail silently or be deliberately faked, so how do you check yours?
3 lessons

