ML System Design

Design full ML systems from business goal to monitoring, the way senior engineers and system design interviews expect.

Advanced · about 10 hours · difficulty 4/5

Learn first: Monitoring, Drift and Model Maintenance, ML Pipelines, Orchestration and CI/CD

ML system design asks: given a product goal, how would you build, ship and maintain an ML solution? It tests judgement across the whole lifecycle, which is exactly what distinguishes an ML engineer from someone who only trains models.

A framework to walk through

  1. Clarify the goal: business objective, users, constraints (latency, scale, privacy). Is ML even needed, or would a rule do?
  2. Frame the ML task: inputs, outputs, type of problem, and an offline metric that tracks the business metric.
  3. Data: sources, labelling strategy, volume, freshness, bias risks.
  4. Features and model: start with a simple baseline, then justify complexity.
  5. Training pipeline: splits, retraining cadence, evaluation gates.
  6. Serving: batch or online, latency budget, candidate generation plus ranking for large catalogues, caching.
  7. Evaluation online: A/B tests and guardrail metrics.
  8. Monitoring and iteration: drift, feedback loops, failure modes, fallbacks.

Classic practice prompts

Design a news feed ranker, a fraud detector, a search ranking system, a people-you-may-know feature, an ETA predictor, a content moderation pipeline, or a RAG-based support assistant.

Tips

Think out loud, state assumptions with numbers (requests per second, catalogue size), discuss trade-offs rather than naming tools, and always cover how you would know the system is working after launch.

Good enough to move on when you can talk through a complete design for any classic prompt in 40 minutes, including metrics, data, serving and monitoring.

Key concepts

  • Clarifying goals and constraints
  • Offline vs online metrics
  • Data and labelling strategy
  • Candidate generation and ranking
  • Latency and scale estimates
  • A/B testing and guardrails
  • Failure modes and fallbacks

Mini project

Write two-page design docs for three classic prompts (for example fraud detection, feed ranking and ETA prediction) using the framework above, then do a timed mock design session with a peer and collect feedback.

Check yourself

For a fraud detection system, which offline metric would you optimize, which business metric would you watch in an A/B test, and why might they disagree?

Free resources