System Design
Interview-style walkthroughs of real ML, agentic, and generative-AI systems. Each one clarifies requirements, estimates scale, designs the system, and reasons through the tradeoffs — structured as a walk through the project loop.
ML System Design
Ranking, retrieval, detection, and forecasting systems — walked through the ML project loop.
Design a Content Moderation System
advancedA trust-and-safety system that detects harmful text, image, and video content at platform scale — multimodal classification, human-in-the-loop labeling, policy-tuned thresholds, and appeals, walked through the ML project loop.
billions of posts/day · multimodal · policy-driven thresholds · appeals
Design a Demand Forecasting System
intermediateA large-scale forecasting system predicting demand across thousands of items, stores, and horizons — hierarchical reconciliation, probabilistic outputs, and special-event handling in production, walked through the ML project loop.
millions of series · multi-horizon · hierarchical · probabilistic
Design a Dynamic / Surge Pricing System
advancedA marketplace pricing engine that sets real-time prices to balance supply and demand — demand forecasting, elasticity estimation, and an optimization objective under fairness and stability constraints, walked through the ML project loop.
per-region/minute pricing · balance supply & demand · fairness constraints
Design a Friend / Connection Recommendation System
advancedA 'People You May Know' system — link prediction over a billion-node social graph using graph features and GNNs, candidate generation, and ranking, walked through the ML project loop.
billion-node graph · link prediction · <200ms · sparse & evolving
Design a Home-Feed Ranking System
intermediateA Pinterest/Netflix-style personalized home feed — a retrieval → ranking funnel that serves billions of items under a sub-200ms budget, walked through the ML project loop from data to deployment feedback.
300M+ users · billions of items · <200ms feed budget · 10k+ QPS
Design a Real-Time Fraud Detection System
advancedA payments fraud system that scores transactions in milliseconds under extreme class imbalance and an adaptive adversary — real-time features, graph signals, and cost-sensitive thresholds, walked through the ML project loop.
billions of tx/day · <100ms decision · fraud <0.5% of volume · adversarial
Design a Search & Ranking System
intermediateAn e-commerce / marketplace search engine — query understanding, candidate retrieval, and learning-to-rank serving relevant results from a huge catalog under a tight latency budget, walked through the ML project loop.
100M+ listings · 10k+ QPS · <300ms · typo-tolerant, multilingual
Design a Visual Search System
intermediateA 'search by image' system — embed a query photo and retrieve visually similar products from a huge catalog via approximate nearest neighbors, with representation learning and re-ranking, walked through the ML project loop.
billions of images · <300ms · embedding ANN · fine-grained similarity
Design an Ad Click-Through-Rate Prediction System
advancedThe ML behind an ad marketplace — predicting calibrated click and conversion probabilities, feeding an auction that ranks ads by expected value under a few-millisecond budget, walked through the ML project loop.
billions of predictions/day · <10ms per request · calibrated probabilities
Design an ETA / Delivery-Time Prediction System
intermediateA marketplace ETA system predicting arrival and delivery times in real time — regression with calibrated uncertainty, spatial-temporal features, and a feedback loop from actuals, walked through the ML project loop.
millions of ETAs/min · <100ms · calibrated uncertainty · spatial-temporal
Agentic System Design
LLM agents, tools, and orchestration — walked through the agentic project loop.
Design a Browser / Computer-Use Automation Agent
advancedAn agent that operates a real GUI — perceiving the screen, planning actions, and clicking/typing to complete web tasks — with grounding, verification, and strong action-safety guardrails, walked through the agentic project loop.
arbitrary websites · GUI grounding · irreversible actions · untrusted pages
Design a Commerce / Booking Agent
intermediateAn agent that shops and transacts on the user's behalf — searches inventory, compares options, and completes purchases or bookings through tools with payment and human-in-the-loop confirmation — walked through the agentic project loop.
real purchases & payments · multi-vendor tools · HITL confirmation
Design a Customer-Support Agent
intermediateA production LLM agent that resolves customer tickets end to end — RAG over help docs, tool calls for real account actions, escalation guardrails, and full tracing — walked through the agentic project loop.
millions of tickets/mo · <5s first response · tool access to real accounts
Design a Deep Research Agent
advancedAn agent that answers open-ended research questions by planning, browsing many sources, and synthesizing a cited report — long-horizon orchestration, source grounding, and report-quality evaluation — walked through the agentic project loop.
long-horizon (many minutes) · dozens of sources · cited synthesis
Design a Multi-Agent Orchestration Pipeline
advancedA system that decomposes complex work across specialized agents — an orchestrator planning and delegating to worker agents that run in parallel and whose outputs are aggregated and verified — walked through the agentic project loop.
planner + specialist workers · parallel execution · aggregation & verification
Design a Personal Assistant Agent (Email & Calendar)
intermediateA long-running personal assistant that triages email, schedules meetings, and acts across a user's apps — with durable memory, proactivity, and permission-scoped tools — walked through the agentic project loop.
long-horizon · durable memory · email/calendar tools · proactive
Design a Real-Time Voice Agent
advancedA low-latency spoken conversational agent — streaming speech-to-text, LLM reasoning with tools, and text-to-speech in a tight turn-taking loop with barge-in — walked through the agentic project loop with latency as the defining constraint.
<800ms turn latency · streaming ASR/TTS · barge-in · telephony scale
Design a Text-to-SQL Data-Analyst Agent
intermediateAn agent that turns natural-language questions into correct SQL over a real warehouse — schema-aware retrieval, query generation, execution validation, and a self-correction loop — walked through the agentic project loop.
large schemas · execution-validated · self-correcting · read-only
Design an Autonomous Coding Agent
advancedAn agent that resolves software tasks end to end — retrieves repo context, edits code, runs tests in a sandbox, and iterates until green — walked through the agentic project loop with orchestration and evaluation front and center.
large repos · sandboxed execution · test-driven loop · minutes per task
Design an Enterprise Knowledge Assistant (Agentic RAG)
intermediateA company-wide Q&A assistant that answers from internal knowledge across many systems — agentic retrieval routing, grounding with citations, permission-aware access, and faithfulness evaluation — walked through the agentic project loop.
millions of docs across systems · permission-aware · cited answers
Generative AI System Design
Image, text, code, video & audio generation — model training, inference serving, and safety.
Design a Code Completion System (Copilot)
intermediateAn inline code-completion product like GitHub Copilot — fill-in-the-middle generation with repo context, ultra-low-latency serving, and acceptance-driven evaluation — walked through the generative-AI system-design lens.
millions of devs · <300ms suggestions · fill-in-the-middle · repo-aware
Design a Conversational AI Assistant at Scale
intermediateA ChatGPT-style conversational product — multi-turn context management, retrieval and memory, streaming generation, safety guardrails, and feedback-driven improvement — walked through the agentic project loop.
100M+ users · multi-turn · streaming · safety-critical
Design a GenAI Safety & Output Moderation System
advancedThe safety layer around generative models — input/output classifiers, jailbreak and prompt-injection defense, watermarking/provenance, and red-teaming — walked through the agentic project loop's guardrails and evaluation stages.
every generation · low added latency · adversarial · policy-driven
Design a Music & Audio Generation System
advancedA text-to-music / audio generation product like Suno — tokenized-audio or latent-diffusion generation, long-range musical structure, streaming synthesis, and copyright safety — walked through the generative-AI system-design lens.
minutes-long coherent audio · streaming · copyright-sensitive
Design a Text-to-Image Generation Service
intermediateA production text-to-image product like Midjourney or Stable Diffusion — latent diffusion with classifier-free guidance, GPU-bound serving, and content safety — walked through the generative-AI system-design lens.
millions of images/day · GPU-bound · seconds per image · safety-filtered
Design a Text-to-Video Generation System
advancedA text-to-video pipeline like Sora or Runway — spatiotemporal diffusion for temporal consistency, enormous compute and storage, staged generation, and safety — walked through the generative-AI system-design lens.
minutes of GPU per clip · temporal consistency · massive storage
Design an AI Writing Assistant
intermediateA controllable long-form writing product like Jasper or Notion AI — style/tone control, factual grounding, structured long-form generation, and preference-tuned quality — walked through the generative-AI system-design lens.
long-form · brand-voice control · grounded · human-preference tuned
Design an Image Editing & Personalization System
advancedA generative image editor — inpainting/outpainting and subject personalization (DreamBooth/LoRA) on top of a diffusion base — with mask-conditioned generation, lightweight per-user fine-tuning, and safety, walked through the generative-AI lens.
mask-conditioned edits · per-user personalization · identity-preserving
Design an LLM Inference Serving Platform
advancedThe infrastructure behind an LLM API — high-throughput, low-latency token generation via continuous batching, KV-cache/PagedAttention memory management, quantization, and speculative decoding on scarce GPUs.
thousands of req/s · streaming tokens · GPU-bound · strict SLOs