yoklainterview sim

ML Engineer Senior Interview Questions

395 verified ML Engineer Senior interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Ml Data PreparationDifficulty 3
A model predicting whether a loan will default includes a feature called 'days_since_last_payment_before_default', which is only populated (non-null) for loans that actually defaulted and is computed from records logged after the default event. What is the main issue with using this feature?
  • aIt has too many missing values to be useful
  • bIt is a categorical feature disguised as numeric
  • cIt needs to be scaled with the other features
  • dIt is target leakage — only known after the outcome
Explanation:A feature that is only populated because the target outcome already happened (and derived from post-outcome records) is a textbook case of target leakage: the model would learn to rely on information that does not exist at the moment a real prediction is needed, producing unrealistically strong offline metrics that collapse in production.
Ml Data PreparationDifficulty 3
A dataset of 10,000 fraud-detection records has only 150 fraud cases (1.5%). If a plain random 80/20 split is used without any precaution, what is the most likely problem?
  • aThe test set's fraud share may drift from 1.5%
  • bTrain gets exactly 120 fraud cases, test exactly 30
  • cThe model cannot train at all with imbalanced classes
  • dThe 80/20 ratio automatically becomes 50/50
Explanation:With a rare class, a plain random split can by chance produce a test set whose class proportion diverges noticeably from the overall dataset, or contains very few positive examples, making any metric computed on it noisy and unreliable. Stratified splitting keeps the proportion consistent across train and test, though the exact counts still depend on rounding and are not automatically fixed at some particular number.
Ml Data PreparationDifficulty 3
A feature's values have a mean of 50 and a standard deviation of 5 across most of the dataset. One value is 300. Roughly how many standard deviations away from the mean is this value, and what does that suggest?
  • aAbout 2, a completely typical value
  • bAbout 5, slightly below the mean
  • cAbout 50, an extreme outlier worth checking
  • dStandard deviation cannot judge single values
Explanation:(300 - 50) / 5 = 50, so the value sits about 50 standard deviations from the mean — an extremely large deviation compared to typical thresholds (often just 2-3 standard deviations are already considered notable). This is a strong signal to investigate whether the value is a genuine rare case or a data error before deciding how to treat it.
Ml Data PreparationDifficulty 3
A dataset has two numeric features, A and B, with a correlation coefficient of 0.98 between them. A junior engineer wants to decide whether to keep both. What is the most reasonable conclusion?
  • a0.98 means the features are unrelated
  • b0.98 is impossible for real-world features
  • cThe features are nearly redundant with one another
  • d0.98 means one column must be all missing
Explanation:A correlation coefficient of 0.98 indicates the two features move together almost perfectly, meaning one is largely predictable from the other. In that situation, keeping both usually adds little extra predictive value while increasing redundancy and complexity, so dropping or combining one of them is a common, reasonable choice.
Ml Data PreparationDifficulty 3
Before training, a junior engineer plans the following steps on a raw dataset: (1) impute missing values, (2) scale numeric features, (3) split into train/test, (4) train the model. A senior colleague flags step ordering as risky. What should change?
  • aNothing, the given order is already safe
  • bStep 4 should run before step 3
  • cSteps 1 and 2 should be removed entirely
  • dSplit first, then fit steps 1-2 on train only
Explanation:Fitting imputation or scaling statistics on the full dataset before splitting lets information from the test portion influence those computed values — a subtle form of data leakage. The safe order is: split first, then fit any data-derived transformation exclusively on the training split, and apply the already-fitted transformation to the test split unchanged.
Ml Deployment ServingDifficulty 3
A payment system must approve or decline each transaction before it completes, within a couple hundred milliseconds. Why is online inference required here rather than batch?
  • aBecause online inference guarantees a higher accuracy score than batch inference on every dataset
  • bBecause batch inference cannot be run more than once per day for any use case
  • cBecause the decision is needed synchronously, per transaction, before the transaction can proceed
  • dBecause batch inference does not support numeric input features at all
Explanation:The decision gates a specific transaction that is happening right now, so it must be produced synchronously for that single request. Precomputing an answer ahead of time is not possible because the transaction did not exist yet.

Test yourself against the 600-question ML Engineer bank.

Start interview