Data Scientist and Machine Learning Interview Questions with Answers
Core machine learning theory plus the practical questions about data, metrics and production that separate strong candidates.
Data scientist / ML questions (7)
01
What is overfitting and how do you prevent it?
mediumtechnicalWhat the interviewer is checking: Core ML understanding.
A strong answer covers
- The model learns noise in training data and does poorly on new data.
- Spot it: training score high, validation score much lower.
- Prevent: more data, simpler model, regularisation, cross-validation, early stopping, dropout.
02
How do you handle an imbalanced dataset, such as fraud detection?
mediumtechnicalBanks & fintechWhat the interviewer is checking: Real-world modelling judgement.
A strong answer covers
- Accuracy is misleading; use precision, recall, F1 or PR-AUC.
- Resampling (undersample, oversample, SMOTE) or class weights.
- Tune the decision threshold to business cost.
- Validate on a realistic, time-based split.
03
Explain the bias–variance trade-off.
mediumtechnicalBig tech / MNCWhat the interviewer is checking: Theory you can apply.
A strong answer covers
- Bias: error from wrong assumptions (underfitting).
- Variance: error from sensitivity to the training data (overfitting).
- More model complexity lowers bias and raises variance.
- Choose complexity with validation data.
04
Your model works in a notebook. How do you take it to production?
hardsituationalProduct & startupsWhat the interviewer is checking: Engineering maturity beyond modelling.
A strong answer covers
- Package the model and features reproducibly.
- Serve it via an API or batch job.
- Monitor input drift, prediction quality and latency.
- Plan retraining and a rollback path.
05
How would you reduce wrong answers (hallucinations) from an LLM feature?
mediumtechnicalProduct & startupsBig tech / MNCWhat the interviewer is checking: Practical generative-AI knowledge.
A strong answer covers
- Ground answers in your data with retrieval (RAG) and ask the model to cite it.
- Clear instructions and examples in the prompt.
- Let the model say it does not know.
- Evaluate with a test set of real questions and check answers regularly.
06
Precision vs recall: when do you favour each?
mediumtechnicalWhat the interviewer is checking: Choosing metrics by business cost.
A strong answer covers
- Precision: of the items flagged, how many were right.
- Recall: of the real positives, how many were found.
- Favour recall when missing a case is costly (fraud, disease); precision when false alarms are costly (spam filters blocking real mail).
- Tune the threshold and report both.
07
How do you choose features for a model?
mediumtechnicalProduct & startupsWhat the interviewer is checking: Modelling judgement beyond algorithms.
A strong answer covers
- Start from domain knowledge: what plausibly drives the outcome.
- Check data leakage: no feature that would not exist at prediction time.
- Use simple baselines, correlation checks and feature importance.
- Prefer fewer, stable features; validate on held-out data.
Also asked in every data scientist interview
- Tell me about yourself.
- Why do you want to work here?
- What is your greatest strength?
- What is your biggest weakness?
- Tell me about a time you disagreed with a teammate or manager.
- Tell me about a time you failed.
- Describe a time you worked under a tight deadline.
- Where do you see yourself in five years?
- What are your salary expectations?
- What is your notice period? Can you join early?
- Do you have any questions for us?
- Why are you leaving your current job?

