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

advanced

A 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.

Meta / TikTok25 min

billions of posts/day · multimodal · policy-driven thresholds · appeals

Design a Demand Forecasting System

intermediate

A 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.

Amazon / Instacart23 min

millions of series · multi-horizon · hierarchical · probabilistic

Design a Dynamic / Surge Pricing System

advanced

A 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.

Uber / Lyft25 min

per-region/minute pricing · balance supply & demand · fairness constraints

Design a Friend / Connection Recommendation System

advanced

A '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.

LinkedIn / Meta23 min

billion-node graph · link prediction · <200ms · sparse & evolving

Design a Home-Feed Ranking System

intermediate

A 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.

Pinterest / Netflix25 min

300M+ users · billions of items · <200ms feed budget · 10k+ QPS

Design a Real-Time Fraud Detection System

advanced

A 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.

Stripe / Nubank25 min

billions of tx/day · <100ms decision · fraud <0.5% of volume · adversarial

Design a Search & Ranking System

intermediate

An 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.

Airbnb / Amazon25 min

100M+ listings · 10k+ QPS · <300ms · typo-tolerant, multilingual

Design a Visual Search System

intermediate

A '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.

Pinterest Lens / Amazon23 min

billions of images · <300ms · embedding ANN · fine-grained similarity

Design an Ad Click-Through-Rate Prediction System

advanced

The 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.

Meta / Google Ads25 min

billions of predictions/day · <10ms per request · calibrated probabilities

Design an ETA / Delivery-Time Prediction System

intermediate

A 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.

DoorDash / Uber23 min

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

advanced

An 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.

Anthropic computer use / OpenAI Operator25 min

arbitrary websites · GUI grounding · irreversible actions · untrusted pages

Design a Commerce / Booking Agent

intermediate

An 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.

Amazon / Expedia23 min

real purchases & payments · multi-vendor tools · HITL confirmation

Design a Customer-Support Agent

intermediate

A 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.

Intercom / Zendesk25 min

millions of tickets/mo · <5s first response · tool access to real accounts

Design a Deep Research Agent

advanced

An 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.

OpenAI / Google Deep Research25 min

long-horizon (many minutes) · dozens of sources · cited synthesis

Design a Multi-Agent Orchestration Pipeline

advanced

A 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.

AutoGen / CrewAI-style25 min

planner + specialist workers · parallel execution · aggregation & verification

Design a Personal Assistant Agent (Email & Calendar)

intermediate

A 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.

Google / Microsoft Copilot23 min

long-horizon · durable memory · email/calendar tools · proactive

Design a Real-Time Voice Agent

advanced

A 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.

OpenAI Realtime / Retell23 min

<800ms turn latency · streaming ASR/TTS · barge-in · telephony scale

Design a Text-to-SQL Data-Analyst Agent

intermediate

An 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.

Snowflake / dbt Labs23 min

large schemas · execution-validated · self-correcting · read-only

Design an Autonomous Coding Agent

advanced

An 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.

Claude Code / Devin25 min

large repos · sandboxed execution · test-driven loop · minutes per task

Design an Enterprise Knowledge Assistant (Agentic RAG)

intermediate

A 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.

Glean / Notion AI25 min

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)

intermediate

An 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.

GitHub Copilot23 min

millions of devs · <300ms suggestions · fill-in-the-middle · repo-aware

Design a Conversational AI Assistant at Scale

intermediate

A 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.

OpenAI / Anthropic25 min

100M+ users · multi-turn · streaming · safety-critical

Design a GenAI Safety & Output Moderation System

advanced

The 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.

cross-industry (OpenAI / Anthropic / Meta)23 min

every generation · low added latency · adversarial · policy-driven

Design a Music & Audio Generation System

advanced

A 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.

Suno / ElevenLabs23 min

minutes-long coherent audio · streaming · copyright-sensitive

Design a Text-to-Image Generation Service

intermediate

A 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.

Midjourney / Stability AI25 min

millions of images/day · GPU-bound · seconds per image · safety-filtered

Design a Text-to-Video Generation System

advanced

A 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.

OpenAI Sora / Runway23 min

minutes of GPU per clip · temporal consistency · massive storage

Design an AI Writing Assistant

intermediate

A 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.

Jasper / Notion AI23 min

long-form · brand-voice control · grounded · human-preference tuned

Design an Image Editing & Personalization System

advanced

A 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.

Adobe Firefly / DreamBooth23 min

mask-conditioned edits · per-user personalization · identity-preserving

Design an LLM Inference Serving Platform

advanced

The 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.

OpenAI / Together AI25 min

thousands of req/s · streaming tokens · GPU-bound · strict SLOs