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.
18 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 a Duplicate Event Detector Find events that describe the same real-world happening, created by different hosts with different words, using blocking, a pairwise match model, clustering and safe merge actions. | Medium |
| Design a Homepage Recommendation System The models behind a personalized home page of rows, for e-commerce, food delivery stores, Netflix-style titles and Spotify shelves: row generation, item ranking and page assembly. | Medium |
| Design a Prohibited Item Detection System Keep weapons and other banned goods off a marketplace with multimodal classifiers over listing text and photos, seller signals, and a human review loop that produces the labels. | Medium |
| Design an AI Shopping Assistant A chat assistant that turns "tacos for six, under $50" into a real cart: grounded catalog search, validated cart changes, multi-turn refinement, latency and cost, and the travel-booking variant. | Medium |
| Design an LLM Gateway One proxy between a company's apps and every LLM provider, with model routing, response and prompt caching, fallbacks, cost and latency observability, and per-team budgets and token quotas. | Medium |
| Design Natural-Language Search for a Food Delivery App Search that understands "protein food under 30 min" and "spicy biryani near me": query parsing into filters, hybrid lexical and vector retrieval, context-aware ranking and dish tagging. | Medium |
| Design NotebookLM Let users drop PDFs, web pages and YouTube videos into a notebook and ask questions answered only from those sources, with every claim linked to the exact passage it came from. | Medium |
| Design People You May Know Suggest people to connect with on a Facebook or LinkedIn-style network: graph and shared-context candidates, a ranker for invites that get accepted, cold start and privacy. | Medium |
| Design a Personal AI Assistant Agent An assistant that reads and acts on email, calendar and tasks: least-privilege OAuth scopes, approvals before side effects, background follow-ups, user-controlled memory, and handling health data. | Medium |
| Design a Receipt and Invoice Parsing System Turn receipt photos and invoice PDFs into structured fields: OCR, layout-aware extraction, VLM fallbacks grounded in the text, calibrated confidence and a human review loop that teaches the model. | Medium |
| 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 Text-to-Speech Service An ElevenLabs-style speech API: text normalization, codec language models and vocoders, streaming synthesis under 300 ms, prosody control, voice cloning with consent, MOS evaluation and audio watermarking. | 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 an Image Captioning System Automatic alt text for every uploaded image: vision-language models with OCR and post context, grounding checks against hallucination, evaluation with CIDEr and blind and low-vision raters, and serving at scale. | Medium |
| Design an Offline Batch Inference Service Run a model, plus the user's own pre- and post-processing script, over millions of records on shared GPUs, with sharding, fair allocation, progress tracking and retries that resume work. | Medium |
| Design Facebook Event Attendance Prediction Predict who will actually show up to an event, private or public, from RSVPs, social ties and history, when real attendance is rarely observed, and turn it into recommendations and headcounts. | Medium |
| Design Visual Search Search with a photo, like Pinterest Lens or Google Lens: object detection and crops, image embeddings trained with contrastive learning, ANN retrieval over billions of images, re-ranking and exact product matching. | Medium |