Preview — Pro guide
You are seeing a portion of this guide. Sign in and upgrade to unlock the full article, quizzes, and interview answers.
Sections
Related Guides
ML System Design: Real-Time Bidding Optimization
ML System Design
ML System Design: Notification Ranking System
ML System Design
Probability Calibration: When Your Model's Probabilities Actually Mean Something
Machine Learning
ML System Design: Social Feed Ranking System
ML System Design
Imbalanced Classification: Metrics, Class Weights, SMOTE, and Threshold Tuning
Machine Learning
MLSD Case Study: Ad Click Prediction at Marketplace Scale
Design a production CTR prediction system for ads at Meta/Google scale. Covers COEC calibration, delayed conversions, feature engineering for sparse+dense signals, multi-stage serving under strict latency budgets, and the failure loops that most interview answers miss.
Why Ads CTR Prediction Is Harder Than Standard Classification
Ad CTR prediction looks like binary classification, but production systems are solving a decision economics problem: choose ads that maximize expected value under latency and policy constraints.
The interviewer expects you to connect product objective to ML objective precisely:
- Business objective: maximize long-term ad revenue while protecting user experience.
- ML objective: estimate click probability, then calibrate it for auction efficiency.
- System objective: deliver scores in ~<50ms for tens of thousands of candidates.
The non-obvious challenge is selection bias + delayed outcomes. You only observe clicks for ads you served, and conversion labels arrive much later than click labels. A naive classifier overfits recent click patterns and degrades advertiser ROI.