Understand the decisions behind the diagram

System design, ML & FDE
interview questions.

530 free worked guides for system design, machine learning, and forward deployed engineering interviews. Practice a prompt, compare the solution, and explain your trade-offs.

Inside the handbook01 / ML design

From a million possibilities
to a useful recommendation.

Retrieve
Rank
Re-rank

Why three stages? Spend computation where it changes the result.

A design, and the reasoning behind it.

Build your understanding.

Start with a system. Go deeper into the ideas.

Explore worked interview questions.

More problems. More decisions to practice.

01

Contain prompt injection in a tool-using research agent

A research agent reads public pages and can save notes to an internal workspace. A retrieved page tells it to upload private files. Design the boundary that prevents this instruction from becoming an authorized action.

3 min read
02

Stop an agent that repeats actions without making progress

An agent alternates between searching and reopening the same documents. Design termination controls that bound cost while still allowing useful retries.

3 min read
03

Design tenant-isolated LLM prefix caching

A hosted model repeatedly processes shared instructions and private customer documents. Design a prefix cache that saves prefill work without reusing incompatible or unauthorized state.

3 min read
04

Admit LLM requests using a KV-cache memory budget

A model fits on a GPU but long concurrent requests cause out-of-memory failures during decoding. Design admission control around growing attention key/value state.

3 min read
05

Compute useful facet counts without leaking hidden results

A product search offers brand, size and color filters. Design facet counts that show useful alternatives while respecting visibility rules and remaining consistent with the result list.

3 min read
06

Detect when a speaker has finished their turn

A voice assistant interrupts users during pauses yet feels slow after short commands. Design endpointing that decides when to respond, rather than merely whether speech is present.

3 min read
07

Stop streaming speech cleanly when the user interrupts

A voice assistant generates text and speech ahead of playback. Design barge-in so an interruption stops old audio and prevents late chunks from leaking into the next response.

3 min read
08

Split a hot key range without creating two write owners

A range-partitioned store has one overloaded partition while other servers are idle. Design an online split that preserves acknowledged writes and routes stale clients safely.

3 min read
09

Diagnose a customer proxy that buffers streaming responses

A customer’s AI response arrives all at once after twenty seconds, although direct access streams smoothly. Investigate the proxy path and propose a measurable fix.

3 min read
10

Enforce tenant row security in an embedded analytics dashboard

A customer embeds a dashboard in its portal. Changing a browser filter reveals another tenant’s totals. Design a server-enforced fix and a rollout that proves isolation.

3 min read

A good place to begin.

530 guides. Four tracks. Start with these six.

01

Design a video recommendation system

Objectives, data, retrieval, ranking, and production trade-offs.

12 min read
02

Fraud Detection System Design: Models, Decisions and Review

Design payment fraud detection with time-correct features, delayed labels, calibrated decisions and bounded review queues. Includes capacity and failure examples.

10 min read
03

Design a document question-answering system

Retrieve authorized evidence, generate supported answers, and evaluate what citations actually prove.

7 min read
04

Design a distributed rate limiter

Token buckets, atomic decisions, hot keys, and regional budgets.

10 min read
05

Design a chat system

Separate durable messages from connections, and reason about ordering, retries, and offline delivery.

7 min read
06

How do you know a recommendation is good?

Worked examples for retrieval, ranking, and product evaluation.

8 min read
New to the topic?

Build a clear mental model.

Start with the fundamentals guide, then follow the walkthrough from objectives to production.

Already building systems?

Pressure-test your decisions.

Focus on the trade-offs, advanced discussion, and follow-up questions in each walkthrough.