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.
| Title | Difficulty |
|---|---|
| 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 Machine Learning Platform An internal platform where hundreds of teams label data, run experiments on shared GPUs, register models and deploy them to production endpoints, with lineage, safe rollouts and monitoring. | Hard |
| 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 Real-Time Voice Assistant A voice agent that talks back in under a second: streaming STT, LLM and TTS, turn detection and barge-in, WebRTC and phone calls, tools mid-conversation, and running 40,000 calls at once. | Hard |
| 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-Image Generation System A Midjourney-style image generator: latent diffusion with classifier-free guidance, prompt rewriting, layered safety filters, GPU queueing by tier, and evaluation with FID, CLIP score and human preference. | Hard |
| 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 Text-to-Video Generation System A Sora-style video generator: spatiotemporal diffusion over a compressed video latent, the arithmetic of cost per second, long-running multi-GPU jobs, temporal consistency, and safety and provenance. | Hard |
| 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 AI Code Completion Copilot-style inline completion: fill-in-the-middle models, retrieving context from the repo, a 250 ms budget per keystroke, and acceptance and retention metrics that tell you if it helps. | Hard |
| Design an Agent for Incident Root Cause Analysis An agent that investigates alerts across logs, metrics, traces and deploys, ranks root causes with evidence, and proposes fixes that run only behind deterministic controls and human approval. | Hard |
| Design an Agentic System A platform for running production LLM agents: the agent loop, a tool layer with real permissions, durable state and memory, guardrails and PII handling, multi-agent designs, evals and cost. | Hard |
| Design an AI Search Engine like Perplexity Answer questions with a cited, up-to-date summary of the web in a few seconds, by searching, reading and synthesizing pages live, and go deeper with multi-step research when asked. | Hard |
| 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 LLM Evaluation and Observability System Trace every LLM call, tool call and agent step, score quality offline and on live traffic with checks, LLM judges and humans, and benchmark multi-agent workflows and coding agents. | Hard |
| Design an LLM Fine-Tuning System A platform to fine-tune LLMs with SFT, LoRA and DPO: datasets, GPU jobs, checkpoints, evals and deployment, applied to code completion, domain Q&A and legal contract analysis. | Hard |
| 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 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 |
| 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 |