Skip to content
Tech Interview Prep

AI / ML Engineer Interview Prep

NewOverview

Builds and owns classical ML models and LLM-backed features from data and training through serving and monitoring at a product company.

Curated: · Written: · Reviewed:

Interview Q&A
100
Practice MCQs
82

The role in one line

Builds and owns classical ML models and LLM-backed features, from training data through serving, monitoring and rollback.

The interview loop

RoundWhat it scores
Recruiter screenScope you owned end to end, and in which production systems
ML fundamentalsDerives statistics and training results with real numbers, not from memory of a slogan
Modelling caseTool choice (classifier, fine-tune, prompted LLM, decision model) and why each rejected option loses on data, latency or cost
ExperimentationPower, A/B design, multiple comparisons, early stopping
System designOrder of answer: data, model choice, evaluation, serving, rollback
OwnershipOne degradation you diagnosed, how you told the causes apart, what you rolled back

Five must-know areas

  1. Tool selection: when a trained classifier beats a prompted LLM on labelled data, latency and per-request cost.
  2. Offline-to-online transfer: why logged-click gains fail to show in A/B tests (position bias, feedback loops, metric mismatch).
  3. Thresholds and calibration: choosing an alert threshold at the real base rate, and whether scores can be read as probabilities.
  4. Leakage and split design: out-of-fold target encoding, time-based splits, rolling features that peek forward.
  5. Production diagnosis: input skew versus model decay, and canary plus rollback for both models and prompts.

Numbers and formulas to have ready

Sample size per arm for a two-proportion test (two-sided alpha 0.05, power 0.8, worked example with hypothetical lift):

n≈2pˉ(1−pˉ)(z1−α/2+z1−β)2δ2n \approx \frac{2\bar{p}(1-\bar{p})(z_{1-\alpha/2}+z_{1-\beta})^2}{\delta^2}

CTR 4.0% to 4.4% gives delta 0.004 and pbar 0.042, so n is about 39.5k per arm.

Bonferroni threshold for m metrics: αper test=αm\alpha_{\text{per test}} = \frac{\alpha}{m} With 20 metrics, each test needs p below 0.0025.

Logistic coefficient as an odds ratio: OR=eβ\text{OR} = e^{\beta} For beta 0.69, OR is about 1.99.

Absolute risk for a given borrower: p′=σ(logit⁡(p)+β)p' = \sigma(\operatorname{logit}(p) + \beta) A 2% baseline moves to about 3.9%. A 30% baseline moves to about 46%.

Precision at base rate pi: PPV=TPR πTPR π+FPR(1−π)\text{PPV} = \frac{\text{TPR}\,\pi}{\text{TPR}\,\pi + \text{FPR}(1-\pi)} At pi = 0.3%, a high ROC AUC still leaves most alerts false.

Gradient step: θ←θ−η ∇θL\theta \leftarrow \theta - \eta\,\nabla_\theta L

L2 penalty as weight decay: L′=L+λ2∥w∥22L' = L + \frac{\lambda}{2}\lVert w\rVert_2^2

Calibration error: ECE=∑bnbN ∣accb−confb∣\text{ECE} = \sum_{b} \frac{n_b}{N}\,|\text{acc}_b - \text{conf}_b|

Know the figures in your own questions cold: 0.82 to 0.89 AUC from 2k to 20k rows, 900 stores, 168-hour lag window, 24-hour horizon, 4% versus 11% MAPE.

Reference architecture

bad model or prompt Labelled data and feature pipeline Training with out-of-fold validation Offline eval gate on time-based holdout Canary serving with traffic split Monitoring: input drift, outcomes, cost per request Rollback to last good version

Strong vs weak answers

TopicStrong answerWeak answer
Tool choiceEight fixed classes and two years of labels: a trained classifier, since cost and latency per request are fixed and accuracy is measurable on a held-out set. An LLM only if labels are scarce or categories change weekly.We would use an LLM, it understands text.
ThresholdChoose the threshold on precision-recall at 0.3% prevalence, then set the alert volume the review team can absorb.Pick the threshold with the best ROC AUC.
DriftFeature PSI moves with the model unchanged means skew. Labelled outcomes fall while inputs stay stable means decay.We would retrain it.
A/B timingHorizon fixed from power at about 39.5k per arm. No stop on day 3 unless a pre-set sequential boundary is crossed.The p-value dipped, so ship it.
Offline gainLogged clicks were shown under the old ranking, so the gain is biased. Check with interleaving or a small randomised test.The NDCG gain is real, so ship it.

Interview tips

  1. Derive numbers aloud, with the inputs written down before the formula.
  2. Name the failure mode before naming the metric.
  3. State the rollback path before the launch plan.
  4. Bring one degradation you owned, with the metric values before and after.
  5. For any time series, say which split is used for selection and which for the final test before you touch a model.

Last-week checklist:

  • Re-derive the sample size, odds ratio and precision at 0.3% prevalence without notes.
  • Work through the Concepts pages in order, from Probability Fundamentals to AI Security, Governance and Responsible AI.
  • Answer five Top 100 production questions aloud in the order data, model, evaluation, serving, rollback.
  • Finish the Practice MCQs for evaluation, leakage and calibration, and read every explanation.
  • Write one page per owned project: model, data, metric, failure, rollback.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.