Design the evaluation for a fraud model at 0.1% prevalence, end to end: metrics, thresholding, validation protocol, and monitoring.
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
This is a synthesis question - the interviewer wants the imbalance, calibration, leakage, and drift threads woven into one coherent design.
Full worked answer with diagram
This is a synthesis question - the interviewer wants the imbalance, calibration, leakage, and drift threads woven into one coherent design.
Metrics. Rule out accuracy (99.9% baseline) and be suspicious of ROC-AUC (FPR diluted by ~999:1 negatives). Primary offline metrics: PR-AUC for model comparison, plus operating-point metrics tied to capacity - if the fraud-ops team reviews 500 alerts/day, report precision@500/day and the recall achieved there; alternatively recall at a fixed FPR. Express the final objective in money: expected cost = FN_count·(avg fraud loss) + FP_count·(review cost + customer-friction cost).
Thresholding. Train a scorer, then calibrate on held-out data (isotonic or temperature/Platt - and recalibrate after any class reweighting or resampling, which biases probabilities). Choose the threshold minimising expected cost on validation; consider two thresholds (auto-block above high, human review in the middle band).
Validation protocol. Strictly temporal splits - train on months 1-9, validate on 10, test on 11-12 - because fraud drifts and adversaries adapt; random splits inflate results. Entity-level grouping so no card/account/device spans splits (group leakage otherwise lets the model recognise entities). Handle label latency: chargebacks take 30-90 days to arrive, so recent data has censored labels - evaluate on a window mature enough for labels to settle, and be explicit about it. Audit features for target leakage (anything downstream of a fraud decision, like "account_frozen"). Run adversarial validation to confirm train/test aren't trivially distinguishable for spurious reasons.
Monitoring. Immediate: input-feature drift (PSI/KS vs reference), score-distribution drift, alert volume. Fast proxies: review-queue precision (human analysts label alerts daily - a live precision estimate). Delayed: recall against matured chargeback labels, reported with the built-in lag. Feedback-loop trap: you only get labels for what you investigate, so blocked/ignored transactions are unlabeled - mitigate with a small exploration budget (let a random ~0.1% sample through un-actioned, or use analyst deep-dives) to estimate uncensored recall. Retrain cadence triggered by drift alarms, not just calendar.
Worth sketching. The exploration arrow bypassing the review queue is the detail that separates a real design from a textbook one: without it you never see uncensored recall.
flowchart LR
A["Temporal split:<br/>months 1-9, 10, 11-12"] --> B["Group by card,<br/>account and device"]
B --> C["Train scorer"]
C --> D["Calibrate on held-out data,<br/>after any reweighting"]
D --> E["Threshold on expected cost:<br/>block, review, or allow"]
E --> F["Review queue,<br/>500 alerts per day"]
F --> G["Analyst labels give<br/>precision daily"]
G --> H["Chargebacks at 30-90 days<br/>give recall, with the lag"]
E -->|"0.1% exploration sample<br/>passes un-actioned"| H
What a good answer covers
- Rule out accuracy (99.9% baseline) and be suspicious of ROC-AUC (FPR diluted by ~999:1 negatives)
- Primary offline metrics: PR-AUC for model comparison, plus operating-point metrics tied to capacity - if…
- Express the final objective in money
- Train a scorer, then calibrate on held-out data (isotonic or temperature/Platt - and recalibrate after…
- Choose the threshold minimising expected cost on validation; consider two thresholds (auto-block above…
Key terms: Metrics · PR-AUC · precision@500/day · Thresholding · calibrate · Validation protocol · temporal splits · Entity-level grouping · label latency · adversarial validation
In the glossary: Calibration · Accuracy · ROC-AUC · PR-AUC · Temperature · PSI
Interviewer follow-ups to expect
How exactly does the selective-labels problem bias naive retraining?
The ops team's capacity halves - what changes in your metric and threshold?
How do you A/B test a new fraud model when the intervention itself changes the labels you observe?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep