Home › Guides › ML Interview Questions
Tech Explained · 2026Machine Learning Interview Questions 2026: 15 Real Questions, Model Answers and the Reasoning They Score
Machine learning interview questions in 2026 cluster into four rounds: Python and data manipulation, ML fundamentals, a modelling case study, and ML system design. Across the 15 questions below, interviewers score your reasoning about leakage, metric choice and drift far more heavily than your recall of algorithm definitions.
- Four rounds, not one. Candidates over prepare Python and under prepare system design, the round that ends loops.
- Leakage is the highest-yield topic. One validation to production question sorts shippers from trainers.
- Metric choice is a trap. Accuracy on an imbalanced problem ends the round; say average precision, then defend a threshold.
- Say the number. Converting recall into alerts per day beats drawing architecture boxes.
- Stale answers show. scikit-learn 1.9.1 is stable since 10 September 2026, and XGBoost 3.3.0 enabled categorical support by default.
You know what L1 and L2 regularisation do, and you have trained a hundred models in notebooks. Then the interviewer says the model scored 0.94 AUC in validation and 0.61 in production, and asks what happened. That gap is the whole interview, and every question below is another route to it.
How Machine Learning Interview Rounds Actually Work in 2026
Keep one person in mind: a 2021-batch Python developer at a mid-size Indian insurer, two years of pandas scripts for the pricing team, now interviewing for ML engineer roles. Call her the insurer candidate. She can build a model; she has never owned one. That is what these loops test.
| Round | What is actually tested | How candidates fail it |
|---|---|---|
| Python and data | Reshaping a messy dataframe at speed | A loop where a groupby and merge would do |
| ML fundamentals | Justifying a choice, not defining a term | Reciting the textbook line, stopping before the trade-off |
| Modelling case study | Validation design, metric choice, leakage | Splitting randomly on grouped or time-ordered data |
| ML system design | Connecting a model to a workflow and a budget | Boxes with no numbers, threshold or monitoring |
Here is how we would split 40 hours of prep, deliberately uneven because the rounds are not equally decisive.
Where to spend 40 hours of prep
Weighted towards the rounds that end loops, not the ones easiest to revise.
Editorial recommendation, not survey data. Checked 29 November 2026.
Machine Learning Interview Questions on Fundamentals (Q1 to Q5)
Each has a short answer that passes and a longer one that gets you the next round. The difference is the trade-off.
Q1. Explain the bias variance tradeoff with a decision you have made
Bias is error from a model too simple for the pattern; variance is error from a model that fitted noise. The answer that scores adds a decision: "depth-3 gave 0.71 validation R2 and 0.70 on a held out quarter, depth-10 gave 0.84 and 0.58, so I shipped depth-4 and accepted worse training fit for error I could predict." Interviewers listen for "accepted".
Q2. The dataset is 0.3% positive. Which metric do you optimise?
Not accuracy, and not ROC AUC either, which is what trips up strong candidates: ROC AUC is computed against the huge negative class, so it flatters while precision collapses. Use average precision, then commit to a threshold. scikit-learn 1.9 added metrics.metric_at_thresholds for sweeping a metric across every threshold, per its official release highlights.
| Problem shape | Wrong default | Say this instead | Why |
|---|---|---|---|
| Fraud, 0.3% positive | Accuracy or ROC AUC | Average precision, capacity threshold | Negatives dominate ROC AUC; the queue is finite |
| Claim severity in rupees | RMSE only | MAE headline, RMSE as a tail check | RMSE is driven by a few catastrophic claims |
| Churn with a retention budget | F1 | Precision in the top 5% of the list | You only call the top slice |
Q3. Why does cross-validation sometimes lie to you?
Because the folds do not resemble the deployment split. If one customer appears in 40 rows, random k-fold puts them on both sides and the model gets credit for memorising them. Split on the entity with StratifiedGroupKFold or on time with TimeSeriesSplit.
Q4. Do you still need feature scaling?
For distance and gradient based models yes: k-NN, SVMs, regularised linear models, neural networks. For tree ensembles no, because a split point is scale invariant. The real question is the follow up: where is the scaler fitted? Inside the pipeline.
Q5. When would you not use a neural network?
On tabular data of the kind most Indian enterprise teams hold: a few hundred thousand rows, fifty columns, many categoricals. Gradient boosted trees still win. XGBoost 3.3.0, released June 2026, enabled categorical support by default and raised minimum Python to 3.12, removing the one-hot work that made the comparison unfair. Hedging here reads as inexperience.
Building these answers from reading rather than shipped work? The evaluation modules in 360DT's live AI Engineer course run the same drills on real data. Also read: Machine Learning Roadmap 2026.
Data Leakage in Machine Learning: The Question That Fails Most Candidates (Q6 to Q8)
Leakage means information that will not exist at prediction time reached the model during training. The symptom is always the same: unreasonably good validation, poor production.
Where leakage enters a pipeline
Three entry points, one rule that closes all three: every fit happens inside the fold.
Mechanism diagram drawn for this guide, 29 November 2026.
Q6. Give a real example of a model that learned the wrong thing
Use the chest radiograph study: published, specific, and nobody expects it. Zech and colleagues, in PLOS Medicine in 2018, trained convolutional networks on 158,323 radiographs from three hospital systems. Pneumonia prevalence was 34.2% at Mount Sinai against 1.2% at the NIH Clinical Center and 1.0% at Indiana University. Because of that gap, sorting by hospital alone reached an AUC of 0.861 on the joint Mount Sinai and NIH data, with no clinical signal. The networks named the source hospital for 99.95% of NIH and 99.98% of Mount Sinai images: they had learned the scanner, not the disease.
Zech et al., PLOS Medicine 15(11): e1002683, 2018. Checked 29 November 2026.
Say the transferable sentence out loud: a model learns any shortcut that correlates with the label, including the one you did not know was there.
Q7. Show me leakage-safe code
Interviewers increasingly ask you to type this, not describe it. Nothing is fitted outside the fold, so every transform lives in a Pipeline and the splitter knows your grouping key.
import pandas as pd
from sklearn.compose import ColumnTransformer
from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.impute import SimpleImputer
from sklearn.model_selection import StratifiedGroupKFold, cross_val_score
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder, StandardScaler
df = pd.read_csv("claims.csv", parse_dates=["reported_at"])
# Leak 2: drop anything that exists only after the outcome is known.
FORBIDDEN = ["payout_amount", "settled_flag", "payout_date", "closed_at"]
X = df.drop(columns=FORBIDDEN + ["is_fraud", "customer_id"])
y = df["is_fraud"]
groups = df["customer_id"] # Leak 3: one customer, many claims
num = X.select_dtypes("number").columns.tolist()
cat = X.select_dtypes("object").columns.tolist()
pre = ColumnTransformer([
("num", Pipeline([("imp", SimpleImputer(strategy="median")),
("sc", StandardScaler())]), num),
("cat", OneHotEncoder(handle_unknown="ignore", min_frequency=20), cat),
])
pipe = Pipeline([("pre", pre),
("clf", HistGradientBoostingClassifier(random_state=0))])
cv = StratifiedGroupKFold(n_splits=5, shuffle=True, random_state=0)
scores = cross_val_score(pipe, X, y, groups=groups,
cv=cv, scoring="average_precision")
print(f"AP: {scores.mean():.3f} +/- {scores.std():.3f}")
Three things get checked: transforms refit per fold, the split key is customer_id, the scoring is average_precision. Run it on your own project, so the number you quote is yours.
Q8. Validation AUC is 0.94 and production is 0.61. Walk me through your diagnosis
Give an ordered checklist, not a guess. Compare feature distributions between the training and production windows, column by column. Check whether any feature was null or defaulted at serving time, the most common cause, which shows as one column going flat. Confirm the split key, since a group leak is invisible in notebooks. Check label timing: a label defined 30 days after the event gave training rows hindsight production never gets. Drift comes last.
-
The feature exists but arrives late. The warehouse computes
total_claims_last_90dnightly; the serving API needs it in 40 milliseconds and gets a null. Nobody notices for a month. -
The encoder meets a new category and silently zeroes the row. Set
handle_unknowndeliberately and log the rate. - Someone tuned on the test set. It stopped being one the third time you looked.
Machine Learning Interview Questions for Freshers Versus Experienced Candidates
The list overlaps almost completely; the scoring does not. Machine learning interview questions for freshers test whether the project was real: where the data came from, how many rows survived cleaning, what the baseline was. "The export had 94,000 rows, 11,000 had a null target so I dropped them, and majority-class accuracy was 0.89, which is why I report average precision" beats any accuracy figure on its own. Past three years the questions turn to ownership instead: what you did when the model degraded, who set the threshold, what you switched off. Never been paged about a model? Say so plainly, because inflated stories cost more than the gap. For agent and retrieval roles the set shifts, and our AI engineer interview questions guide covers that version; those teams screen against much the same syllabus as the CCDV-F developer certification.
The ML System Design Interview: A Worked Answer (Q9 to Q11)
This round ends more loops than any other, and is the one you can prepare mechanically. The prompt is usually one line: design fraud detection for our payments product.
Q9. Start with the operating constraint, not the model
Ask two questions before drawing anything: how many transactions a month, and how many alerts can a human review a day? The insurer's payments arm runs 2,000,000 transactions a month at a 0.3% fraud rate, so 6,000 frauds, and six reviewers clear 300 cases a day, roughly 9,000 a month. Every threshold is now arithmetic:
alerts_per_month = (recall * positives) / precision
# positives = 6,000 fraudulent transactions per month
# review capacity = 9,000 cases per month
| Threshold | Recall | Precision | Alerts per month | Fraud caught | Verdict |
|---|---|---|---|---|---|
| 0.10 | 0.80 | 0.08 | 60,000 | 4,800 | 6.7x over capacity, unshippable |
| 0.35 | 0.65 | 0.25 | 15,600 | 3,900 | 1.7x over, two more reviewers |
| 0.60 | 0.48 | 0.50 | 5,760 | 2,880 | Fits, with headroom for spikes |
| 0.80 | 0.30 | 0.72 | 2,500 | 1,800 | Fits, leaves 4,200 uncaught |
Pick 0.60 and defend it: the highest recall that fits the queue without a hiring request, leaving about a third of capacity for festival-season volume. That sentence is what most candidates replace with a diagram. To produce the curve rather than guess:
import numpy as np
from sklearn.metrics import precision_recall_curve
prec, rec, thr = precision_recall_curve(y_val, pipe.predict_proba(X_val)[:, 1])
positives, capacity = 6_000, 9_000
alerts = np.divide(rec[:-1] * positives, prec[:-1],
out=np.full_like(rec[:-1], np.inf), where=prec[:-1] > 0)
feasible = alerts <= capacity
best = np.argmax(np.where(feasible, rec[:-1], -1))
print(f"threshold={thr[best]:.2f} recall={rec[best]:.2f} "
f"precision={prec[best]:.2f} alerts={alerts[best]:,.0f}")
Q10. What do you monitor, and when do you retrain?
Four things, most useful first: the null and default rate per feature, because a broken feed is likelier than drift; the score distribution, which moves days before accuracy does; precision on the reviewed slice, free from reviewer decisions; and the delayed true label, since chargebacks settle 60 to 90 days later. Name that lag. Saying "monitor model performance" without it shows you have not run one.
Q11. Who approves a retrain?
On a trigger and a calendar: a drop in reviewed-slice precision or a score shift past a documented bound, plus a quarterly refresh. Approval needs a named human and a rollback path, with the previous model servable behind a flag. That last part is a CI/CD skill wearing an ML hat, which is why it gets built in a live AI engineering program and in the deployment modules of 360DT's AWS and DevOps course. Also read: MLflow tutorial 2026.
Answer these questions from your own shipped work, not from a blog post
The AI Engineer course builds agents that plan, use tools and act, certified on both Microsoft Copilot Studio and Claude Code. You leave with deployed projects you can walk an interviewer through, evaluation and monitoring included.
Explore the course
Four Answers That End the Interview (Q12 to Q15)
Four questions, each with the popular answer that reads as a red flag and the one that does not.
Q12. How do you handle imbalanced data?
The red flag is "I use SMOTE". Interpolating between neighbours invents rows that cannot exist on categorical or sparse features, and distorts your probabilities. Say class weights and a tuned threshold first; resample only when positives are very few.
Weights before resamplingQ13. How do you select features?
The red flag is "correlation with the target, keep the top 20": a leak if done before splitting, blind to interactions either way. Say permutation importance on a held out fold, drop near-duplicates by clustering, justify removals by serving cost.
Importance on held out dataQ14. How do you tune hyperparameters?
The red flag is a 500-combination grid search. Start from a sensible default, tune the three parameters that matter, search on a fixed budget, stop when the gain is under fold-to-fold variance. Then report that variance.
Budget, then stopQ15. How do you explain a model to a business team?
The red flag is "I show SHAP values". Say what the decision costs: at this threshold we review 192 cases a day and catch 2,880 frauds a month we used to pay out. SHAP is for one disputed case, not the headline.
Their units, not yoursOne honest caveat. This format rewards a particular articulacy, which is not the same as being good at machine learning. Strong practitioners interview badly because they answer briefly while the round wants narration. The fix is not more theory: record yourself on eight of these and listen for where you stopped a sentence too early.
How to Prepare for a Machine Learning Interview in Four Weeks
Four weeks at ten hours a week is enough, if you resist re-reading theory you know.
| Week | What you do |
|---|---|
| 1 | Rebuild one project with a leak-safe pipeline, a group or time split, a documented baseline |
| 2 | Write its threshold table in business units, with review capacity as the constraint |
| 3 | Timed pandas drills, 45 minutes each: reshape, window function, join with duplicates |
| 4 | Record all 15 answers, two takes each, cutting anything that is only a definition |
Pin your environment: scikit-learn 1.9.1 has been stable since 10 September 2026 and the 1.9 line supports Python 3.11 to 3.14, so do not quote a deprecated argument from a 2023 tutorial. Analytics-adjacent roles interview on the SQL and Power BI syllabus covered in 360DT's Data Analyst course, while feature pipeline work sits closer to a live Microsoft Fabric data engineering program. For Azure AI shops the Generative AI Developer course maps to the stack, and the certifications overview shows which credential employers name.
In the insurer candidate's position, with four weeks and one decent project, we would spend the first fortnight making that project defensible end to end and leave the other four off the CV. Depth in one story beats breadth across five, because every follow up then lands on ground you know. Before paying for anything, sit in on a free webinar or book a demo class, and pick the track that matches the job descriptions already in your inbox.
Related guides
- Machine Learning Engineer Salary in India 2026 for the band before the offer call.
- AI Engineer vs Machine Learning Engineer in 2026 if you are still choosing a loop.
- LLM Evaluation in 2026 because metric choice gets asked again in LLM form.
- DevOps to MLOps Engineer in India 2026 for the rollback skills these questions assume.
- SQL Query Optimization in 2026 since feature engineering is usually SQL.
Frequently asked questions
What are the most common machine learning interview questions in 2026?
The bias variance tradeoff tied to a real decision, metric choice on an imbalanced dataset, why cross-validation misleads you, a leakage diagnosis from a validation to production gap, and one system design prompt such as fraud detection. Monitoring comes up even for junior roles.
How do I answer machine learning interview questions with no work experience?
Answer from one project you rebuilt properly rather than five you skimmed. Know the row count before and after cleaning, your baseline, why you chose the metric, and what you would monitor. A quoted baseline beats four notebooks.
Is Python or SQL more important for a machine learning interview?
SQL is the one candidates underestimate. Feature engineering mostly happens in the warehouse, so expect window functions, deduplication and point-in-time joins. Python is tested for reshaping and modelling, not algorithms from scratch.
What is data leakage in machine learning and how do I explain it in an interview?
Leakage is information in your training data that will not exist at prediction time. Name the three entry points: a transform fitted before the split, a column that exists only after the outcome, and the same entity on both sides. Then the rule: every fit happens inside the fold.
Do I need deep learning for a machine learning engineer interview?
You need to explain when not to use it. On tabular enterprise data, gradient boosted trees usually win on accuracy and iteration speed. If the posting names PyTorch, vision or language models, go deeper on architectures and training loops.
How long does it take to prepare for a machine learning interview?
Four weeks at roughly ten hours a week, if you already code in Python. Spend half on rebuilding one project with a leak-safe pipeline and its threshold table, the rest on timed pandas drills and rehearsing aloud.
About this guide. 360 Digital Transformation is an Anthropic Partner and a Microsoft Authorized Training Partner. Other certification bodies, vendors and employers named here are not affiliated with us. Tools and versions change quickly; commands and figures cited were checked on 29 November 2026.




