Design LLM systems the way Staff engineers are expected to.
Worked designs of real LLM systems, set out the way you would present them in a Staff or Principal interview: requirements, the cost and latency math, the architecture, the deep dives, and what separates a Senior answer from a Staff one. I build these systems in production, so I write about what actually breaks.
System designs
All designs-
01Design enterprise RAG with a sub-second latency budget
A multi-tenant retrieval-augmented assistant for service desk agents that must answer inside a live workflow. Latency budget, cost math, access control, freshness, and how to know it's working.
-
02Design an AI agent that resolves IT tickets end to end
An agentic system that triages support tickets, takes real actions to fix them, and writes up the resolution. Where to use agents and where not to, action safety, durable execution, and evaluating something that changes the world.
-
03Design an evaluation platform for 50 LLM features
A shared platform that lets product teams measure and protect the quality of their LLM features, offline in CI and online in production. Versioned datasets, calibrated LLM judges, statistics that don't lie, and the cost of judging.
Problem solving
All problems-
Implement an LRU cache with per-entry TTL
The classic cache question with a time dimension added, the way AI platform teams ask it. Design choices, a tested Python solution, and the follow-ups that decide the round.
-
Build a token bucket rate limiter for an LLM gateway
Per-key rate limiting with weighted costs, so it can limit tokens per minute as well as requests. A thread-safe Python solution with tests, and the distributed follow-up.
-
Implement causal attention and a KV cache from scratch
Multi-head attention with grouped-query attention and a KV cache in NumPy, plus the test that proves cached decoding matches the full forward pass. Increasingly asked of ML and AI engineers.
Reference
The framework
The seven-step method behind every design on this site.
Numbers to know
Tokens, latency, GPU memory and cost figures to quote from memory.
KV cache calculator
Will it fit? Memory, concurrency, decode speed and cost per token.