1:1 mentoring with Big Tech AI engineers
System Design

10-Layer Architecture

Ten layers of a production LLM platform in five tiers, each with the failure it absorbs and its share of a per-query budget derived from visible inputs; which layers ship first; and one gateway decision written with the number that reopens it.

Last updated

Staff12 min readFirst read5-Phase FrameworkScaling 10k to 1M

After this section you can

  • Name the layer a failure belongs to, and the control that absorbs it
  • Price a request per query and find the line that moves the bill
  • Write a gateway decision with the number that reopens it
41

10-Layer Architecture

Ten layers in five tiers: the failure each one absorbs, its share of a per-query budget, and the order to ship them in.

Key idea

A platform is ten layers, and each one exists because of a failure you have not had yet. At staff level you name the layer you are in, put a number on it, and say what you defer and the number that brings it back.

Ten layers in five tiers: each absorbs one failure and owns one budget line
A · ENTRY B · CONTEXT C · EXECUTION 1 Ingestion and governance 2 Planner picks the path 3 Context engine, budget 4 Prompt engineering 5 Workflow engine 6 Agent runtime step budget D · KNOWLEDGE AND MODEL ACCESS 7 Retrieval hybrid, reranked 8 LLM gateway keys, fallback search one call per step Claude API the model E · FEEDBACK, WATCHES EVERY LAYER 9 Observability traces, tokens, cost per tenant 10 Evaluation judged quality, golden set

Read left to right, then down. Teal is a layer, blue the request, amber the model and gateway decisions. The dashed rail watches every layer. Pans sideways on a phone.

Related

More in System Design

Get full access to all 149 sections with code examples, diagrams, and interactive animations.

Unlock Premium