ML system design
ML and AI system design for interviews: recommendation and ranking, LLM serving, RAG and agents. Free to read.
ML and AI system design for interviews: recommendation and ranking, LLM serving, RAG and agents. Free to read.
9 write-ups
| Title | Difficulty |
|---|---|
| Design a Bot and Spam Detection System Catch bot accounts and spam posts on a social platform in real time with a cascade of rules, behavior models and text classifiers, while adversaries adapt and real users stay unharmed. | Medium |
| Design an Ads Ranking System Predict calibrated click and conversion probabilities for every eligible ad, turn them into auction scores and prices, and handle delayed conversions, new ads and miscalibration. | Hard |
| Design an ML Fraud Detection System Train and serve models that catch payment fraud and account takeovers in under 100 ms, despite labels that arrive months late, extreme class imbalance and fraudsters who adapt. | Hard |
| Design ETA Prediction Predict arrival times for rides and food deliveries: a residual model on top of the routing engine, stage-by-stage delivery ETAs, live traffic and kitchen load, quantiles and serving at 600k QPS. | Hard |
| Design TikTok's Video Recommendation System The models behind a TikTok or Reels For You feed: multi-source retrieval, a multi-task ranker over watch signals, re-ranking, cold start for new videos, and training that keeps up within minutes. | Hard |
| Design a Feature Store Define ML features once, compute them in batch and streaming, serve them online in milliseconds and build point-in-time correct training sets from the same definitions. | Hard |
| Design a Speech Recognition System Meeting transcription with live captions and an accurate transcript after the call: streaming vs batch ASR, speaker diarization, word timestamps, custom vocabulary and measuring WER properly. | Medium |
| Design A/B Testing for LLM Features Send 10% of traffic to a new prompt or model through config, measure five metrics per variant including safety, and roll the change back automatically when safety regresses. | Medium |
| Design Dynamic Pricing for Ride-Sharing Surge pricing as an ML system: demand and supply forecasts per cell, price elasticity learned from confounded data, an optimizer or RL policy that sets multipliers, and switchback tests. | Hard |