Skip to content

    AI Architect

    AI Architect Cheat Sheet: Rules, Formulas and Checklists

    One-page map of the AI Architect course: for each lesson the decision rule, the formula or number to remember, and a link to the exact section that teaches it.

    By Published 10 min read

    • ai-architect
    • cheat-sheet
    • reference
    Share

    The whole AI Architect course on one page, for someone who has read it. This page is a map, not new content: every rule, formula and number below is copied from the lesson in the last column, so open that section to see the reasoning, the assumptions and the date a fact was checked. Page numbers are the course order.

    The course on one figure

    Figure 1. The reference system, with the page that teaches each part

    The reference system with the course page for each partClient app to API gateway (HTTPS); API gateway to Orchestrator (question, identity); Orchestrator to Retriever (search); Retriever to Vector index (similarity search); Retriever to Document store (approved passages); Orchestrator to Model gateway (prompt); Model gateway to LLM provider (HTTPS); Orchestrator to Policy engine (may this run?); Orchestrator to Tool server (tool call); Orchestrator to Event bus (audit event); Event bus to Worker (consume); Worker to Trace store (write); Eval service to Trace store (read cases)SYSTEM BOUNDARYClient app: page 3Client apppage 3LLM provider: pages 4, 14LLM providerpages 4, 14Model gateway: pages 4, 10, 11Model gatewaypages 4, 10, 11Tool server: page 6Tool serverpage 6Vector index: page 5Vector indexpage 5API gateway: pages 3, 10API gatewaypages 3, 10Orchestrator: page 6Orchestratorpage 6Retriever: page 5Retrieverpage 5Document store: page 5Document storepage 5Policy engine: page 12Policy enginepage 12Event bus: page 7Event buspage 7Worker: page 7Workerpage 7Trace store: pages 9, 13Trace storepages 9, 13Eval service: page 8Eval servicepage 8HTTPSquestion, identitysearchsimilarity searchapproved passagespromptHTTPSmay this run?tool callaudit eventconsumewriteread cases

    How to read this: each box carries the pages that teach it, and the figure uses the course's component names. Page 2 (requirements, ADRs and design reviews) applies to the whole design, page 3 teaches how to draw views like this one, page 11 covers the cost of the calls through the Model gateway, page 14 covers the LLM provider as a managed cloud service, and page 15 applies the course in two full designs.

    Which page when

    Each symptom is the first column of a failure table in the lesson. Follow the link to see what the system should do.

    Symptom Read
    A requirement exists only in conversation Page 2, failure scenarios
    Only the happy path is drawn Page 3, failure scenarios
    A cache returns another tenant's or an old-policy answer Page 4, failure scenarios
    A filtered query returns too few results Page 5, failure scenarios
    The loop does not terminate Page 6, failure scenarios
    A poison message blocks a partition Page 7, failure scenarios
    The aggregate is green while a slice regressed Page 8, failure scenarios
    The canary result is inconclusive Page 9, failure scenarios
    Provider returns 429 for a minute Page 10, failure scenarios
    The forecast is off by three times Page 11, failure scenarios
    Injected text in a retrieved document asks for a send Page 12, failure scenarios
    A system in production is not in the registry Page 13, failure scenarios
    Inference is routed outside the allowed region Page 14, failure scenarios
    You want to see two complete designs and test whether the whole course holds together Page 15, capstone

    Part 1: Design the system (pages 2 to 8)

    Each table lists decision rules (If, then), formulas and numbers. Left column: the situation, formula or calculation. Middle column: the response or the result. Right column: the section that teaches it.

    Page 2: Requirements, ADRs and design reviews

    AI Architect Mindset: Requirements, ADRs, Design Reviews

    Remember Then or result Read
    If A requirement has no number and no measurement point Do not build against it Decision framework
    If A review ends without a recorded outcome Treat the design as not approved Decision framework
    Formula p ± 1.96 × √(p(1 − p) / n) only the lower bound can demonstrate a bar Worked example
    Calc (1 − 0.995) × 400,000 2,000 failed requests in the window Worked example

    Page 3: Diagramming AI systems

    Diagramming AI Systems: C4, Sequence, State, ER

    Remember Then or result Read
    If 3 or more participants, or any async step Draw a sequence diagram Decision framework
    If Data crosses to a party you do not control, or model output or retrieved text can trigger an action Mark a trust boundary and name its control Decision framework
    Number About 15 nodes at most Over that, split into an overview and zoom-ins The diagram checklist
    Calc 3 x 3 x 3 = 27 attempts at the ticketing system the Orchestrator is the only layer that retries Worked example

    Page 4: Models, routing and inference

    Models, Routing and Inference for AI Architects

    Remember Then or result Read
    If The request type is known before the call Route with rules first Decision framework
    If An answer depends on user, tenant, time or changing data No semantic cache; exact caches keyed on all inputs Decision framework
    Formula Bytes per token = 2 (key and value) x layers x KV heads x head dimension x bytes per value Context length becomes memory Attention and the KV cache
    Formula With the large model at cost 1 and the small at 0.1, a cascade costs 0.1 + f for escalation rate f It stops paying at 0.9 Routing policies
    Formula cached cost for n requests = 1.25 + 0.1 (n - 1) prefix-lengths Anthropic 5-minute multipliers, as of 2026-10-22 Prompt caching and prefix stability

    Page 5: Data and retrieval

    Data and Retrieval Architecture for AI Systems

    Remember Then or result Read
    If Callers see part of the corpus Filter from verified identity inside the search Decision framework
    If Queries contain identifiers or defined terms Add a lexical index and fuse with RRF Decision framework
    Formula RRFscore(d) = sum over rankings r of 1 / (k + r(d)) with k = 60 Reciprocal rank fusion
    Calc 40 × (1/500) 0.08 allowed results per top-40 Worked example

    Page 6: Agents, tools and MCP

    Agents, Tools and MCP: Architecture for AI Architects

    Remember Then or result Read
    If A tool is irreversible Key, policy decision, approval above a limit Decision framework
    If A loop can run long Cap calls, tokens and time from measured runs Decision framework
    Formula Total(N) = sum of I(k) for k = 1..N = N * (S + U) + (a + r) * N * (N - 1) / 2 the total grows with the square of the steps Context growth and compaction
    Number The loop costs 4.7 to 9.3 times the input tokens 2.7 to 4.0 times the latency Worked example

    Page 7: Multi-agent and event-driven designs

    Multi-Agent and Event-Driven AI Architecture

    Remember Then or result Read
    If Delivery can repeat Commit after processing; idempotent effect keyed by event id Decision framework
    If State change and event must agree One local transaction through an outbox Decision framework
    Rule Retention must cover the longest period one event can be redelivered or replayed Keys are kept 24 hours and the topic keeps events 7 days Idempotency keys
    Formula in-flight work = arrival rate x time in the system Little's law Worked example
    Number capacity is partitions divided by step time 4 events per second of headroom turns a 3-minute outage into a 15-minute recovery Worked example

    Page 8: Evaluation

    Evaluating AI Systems: Metrics, Judges and Gates

    Remember Then or result Read
    If A gate blocks merges Confidence bound; state the detectable drop Decision framework
    If A judge decides the release Calibrate; report kappa and failure recall Decision framework
    Formula kappa = (P(A) - P(E)) / (1 - P(E)) Cohen's kappa asks how much better than chance the agreement is Calibrating a judge
    Number With n = 400, a one-sided 95% lower bound and a 0.90 threshold it needs 370 passes (92.5%) A system at 0.92 fails this 0.90 proof gate 60% of the time at n = 400 Confidence intervals and sample sizes
    Number about 3.6 points at 400 items about 16 for a 30-item slice At a glance

    Part 2: Operate, secure and govern (pages 9 to 15)

    Page 9: LLMOps and observability

    LLMOps and Observability for AI Systems

    Remember Then or result Read
    If Any answer-shaping part changes Mint a release ID and stamp it on every span Decision framework
    If A change has side-effecting tools Shadow with stubbed tools and canary behind approval Decision framework
    Formula ((1.645 x sqrt(0.92 x 0.08) + 0.8416 x sqrt(0.88 x 0.12)) / 0.04)^2 323.8, so 324 items Worked example
    Number halving the drop roughly quadruples the sample about 1,221 (1,271 with the correction) Worked example

    Page 10: Reliability and scaling

    Reliability and Scaling for AI Systems

    Remember Then or result Read
    If Several layers could retry One owner per failure class; SDK retries to 0 Decision framework
    If Many clients retry on one signal Full or decorrelated jitter and an attempt limit Decision framework
    Formula L = λ x W L / calls per worker / target utilisation Capacity and Little's law
    Formula v = min(cap, base x 2^n) uniform(0, v) Backoff with jitter
    Number Refill is the limit divided by 60 300 per minute is 5 per second Rate limiting algorithms
    Number SRE book: retry only while the retry ratio is below 10% up to three attempts, then let the failure bubble up One retry owner

    Page 11: Cost and unit economics

    Cost and Unit Economics for AI Systems

    Remember Then or result Read
    If Per-task cost is not measured Instrument at the Model gateway before changing anything Decision framework
    If Output tokens dominate Shorten format and max_tokens first Decision framework
    Formula cost per successful task = (model + retrieval + tools + retries + review + infrastructure) / share of tasks that succeed A model one third the cost per attempt (1 CU against 3) that succeeds 25% of the time costs 1 / 0.25 = 4 CU per success Cost per successful task
    Formula h* = (w - 1) / (w - r) = 0.25 / 1.15 = 21.7% for w = 1.25 and r = 0.1 Caching wins when h r + (1 - h) w < 1 Cache hit-rate math
    Formula Effective ratio for the batchable work = (1 - f) b + f = b + (1 - b) f let b be the batch cost ratio (0.5) Batch versus real-time
    Formula Break-even escalation rate f* = 1 - (c_s + c_g) / c_l Cascade cost per request = c_s + c_g + f x c_l Cascade break-even

    Page 12: Security and threat modeling

    Security and Threat Modeling for AI Systems

    Remember Then or result Read
    If The model's output can trigger a tool Authority comes from the session and a scoped credential, never from a model-written value Decision framework
    If An action is irreversible or external Require approval, show the exact content, restrict destinations Decision framework
    Calc 2,000 x 0.15 300 a day Worked example
    Number approving everything costs 6.7 times as much reviewer time 40,000 s against 6,000 s Worked example
    Number the one-sided 95% Wilson lower bound on the block rate is 99.1% It says nothing about attacks outside the suite Worked example

    Page 13: Governance and responsible AI

    Governance and Responsible AI in Practice

    Remember Then or result Read
    If A team wants to ship an AI feature Register it with its intended purpose before launch Decision framework
    If Decision records hold personal data Keep ids and hashes in the audit store, content elsewhere Decision framework
    Rule The risk tier follows the intended use, not the model record the intended purpose per system At a glance
    Calc 120 MB x 365 43.8 GB Worked example
    Calc (40 + 6.13) / 6 7.7, so 8 people Worked example

    The lesson quotes the EU AI Act text and its application dates with the date they were checked. Read the lesson's section on where the text stands before relying on any date, and treat nothing here as legal advice.

    Page 14: Cloud platforms for AI

    Cloud Platforms for AI: Networking, Identity, Keys, Logs

    Remember Then or result Read
    If A workload holds a long-lived key Move to workload identity Decision framework
    If The model endpoint is public Add a private endpoint and close the public path Decision framework
    Calc Re-encrypt 1,000 x 50 MB = 50,000 MB (50 GB) Re-wrap 1,000 data keys of 32 bytes = 32,000 bytes of key material Customer-managed keys and envelope encryption
    Calc 800 MB x 365 = 292,000 MB = 292 GB content logs are 16 times larger Logging and audit trails
    Calc 40,000 x 365 14,600,000 events a year, each checked Worked example

    The page names the provider products for each job and dates every provider detail with "as of". Read the page before relying on one, and treat the numbers above as its worked assumptions, not as provider limits.

    Page 15: Capstone

    Page 15, the capstone holds two full designs and the readiness quiz. Use it to check that you can apply every page above in one design. This sheet carries no rule from it.

    Decision frameworks and failure tables

    Every lesson from page 2 to page 14 ends its teaching with a decision framework (If, then, because, revisit when) and a failure table (failure, what the system does, why). Use them as checklists in a design review.

    The same questions, one per line and grouped by page, are in the design-review checklist, which you can also download. The ADR template, which you can also download, is on the same page.

    Last verified: 2026-10-23

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Get new articles by email

    Free. We email a confirmation link first, and you can unsubscribe from any email.

    Join engineers building production AI systems

    Comments