What you'll learn: how to turn the whole course into two complete, reviewable designs: requirements with numbers, a full set of views, decision records, evaluation and release gates, a cost envelope, a failure table and a threat model. You finish with a design-review checklist and a readiness quiz.
At a glance
Figure 1. The course in one figure: two designs and the pages each draws on
How to read this: the two boxes on the left are the method both designs share, the middle boxes are the designs, and the boxes on the right are the pages only that design leans on.
- Both designs use one method: testable requirements, a view set, decision records, gates, a cost envelope, a failure table and a threat model.
- Design A is limited by authority: who may read which document, which action may run, and what evidence is kept.
- Design B is limited by volume: more than 94 percent of events never reach a model.
- Every number is an illustrative assumption listed under Assumptions and recomputed with Python. Both scenarios are composite.
How to read a full design
A design is not one diagram. It is a set of views, each answering one question for one reviewer (page 3), tied together by numbers (page 2). Design A uses all fifteen views below, in this order. Design B uses the same set, with governance (view 15) kept to decision B7.
| # | View | The question it answers | Drawn as | Page |
|---|---|---|---|---|
| 1 | Requirements | What must be true, and how is it measured? | Table with a number and a check | 2 |
| 2 | Context | Who uses it and what does it depend on? | Architecture diagram | 3 |
| 3 | Containers | What are the parts and how do they talk? | Architecture diagram | 3 |
| 4 | Components | Where does each rule live inside the Orchestrator or worker? | Architecture diagram | 3 |
| 5 | Runtime | In what order, and who owns the retry, on the normal and the failure path? | Sequence diagrams | 3, 10 |
| 6 | Trust boundaries | Where does trust change, and what controls the crossing? | Architecture diagram with zones | 3, 12 |
| 7 | Deployment | Where does it run, on what network path? | Architecture diagram | 3, 14 |
| 8 | Data model | What must outlive a request? | ER diagram | 3, 13 |
| 9 | Decisions | Which choices are costly to reverse, and why were they made? | ADR table | 2 |
| 10 | Evaluation | How does the team know it works, and with what uncertainty? | Gate table and widget | 8 |
| 11 | Release | How does a change reach users and roll back? | Release ladder | 9 |
| 12 | Cost | What does a successful task cost, and what moves it? | Cost-unit table and widget | 11 |
| 13 | Failure | What does the system do when each part fails? | Failure table | 10 |
| 14 | Threats | Where does text the team did not write reach something that acts? | Threat table | 12 |
| 15 | Governance | Which tier, which evidence, who oversees? | Registry and audit design | 13 |
How to read this: each row is one view, the third column is the reviewer's question, and the last column is the page that teaches how to draw and judge it.
Each design opens with its requirements, because every later view exists to satisfy or test one of them.
Check yourself: a reviewer asks "who retries when the ticket call is slow, and how many times?" Which of the fifteen views answers it?
The runtime view with the failure path drawn (view 5). The container view has no order and no retry owner, which is why page 3 asks for one sequence per scenario.
Design A: A regulated-industry knowledge and actions copilot
Composite scenario, not a real company. An insurer's claims, underwriting and service staff ask a copilot about internal policy and procedure. It answers from approved documents, with citations, and can propose two actions in the case system. A person approves the risky one. Every number is an illustrative assumption listed under Assumptions.
| Tool | Effect class | Retry class | Rule |
|---|---|---|---|
policy_search (the Retriever) |
Read-only | Safe to repeat | Entitlement filter inside the search |
task_create |
Reversible write | Repeat only with an idempotency key | The Policy engine decides; a 5 percent sample is reviewed afterwards |
letter_send |
External, irreversible | Never repeat blindly | Approval always, bound to the exact call. One retry only with the call's key, which the Case system must honour |
How to read this: the effect-class table from page 6, filled in for this system. The rule column is the control the rest of the design builds.
Requirements
| Kind | Requirement (illustrative values) | Check |
|---|---|---|
| R1 Quality | At least 90% of answers on a 400-item release set are rated acceptable (rubric v3, two reviewers). The proof gate needs 370 of 400. Re-measured on every prompt, model or index change | Eval service in CI |
| R2 Latency | p95 end to end at most 8 s for requests under 6,000 input tokens, measured at the API gateway over a rolling 7 days | Load test, then monitor |
| R3 Cost | Mean all-in cost per successful answer at most 0.016 CU. Soft limit 3,200 CU a month, hard cap 4,000 CU | Cost log and gateway budget |
| R4 Access and actions | In a 300-case suite of attempts to reach another department's documents or to trigger a letter without approval, all 300 are blocked (lower bound 99.1% on that suite). Re-run on every index change | CI, then quarterly red-team |
| R5 Audit | Every released answer and executed action has an audit entry appended before release. A monthly reconciliation of audit entries against gateway counts finds a gap of 0 | Reconciliation job |
| R6 Residency | Prompts, passages, traces and audit entries stay in one region (a fixed constraint from the contract) | Egress tests and a configuration review each release |
| R7 Freshness | A changed or withdrawn policy is searchable within 30 minutes for 99% of changes. A permission revocation applies within 5 minutes | Age of the oldest unprocessed change |
How to read this: each row names a number, a place it is measured and a check, so a reviewer can say what result would make them reject it (page 2).
Classification and governance reasoning
Figure 2. How the copilot is classified, and what triggers a new classification
How to read this: classification attaches to the intended purpose, so the loop back to the first box fires on any change of purpose, not on a model change alone.
Not legal advice. This reasoning follows the text as page 13 quotes it, checked on 2026-10-22. The law and its dates have been amended and may change again: ask counsel and read the official pages.
- Annex III. Page 13 quotes point 4(a), recruitment and selection, and point 5(b), creditworthiness. The copilot's purpose is neither. Page 13 quotes only those two points, so counsel must still read the full Annex III. This page does not say what it contains.
- Recorded result. "Not in an Annex III area on the points quoted on page 13; counsel to confirm and date." A registry field, not a conclusion.
- Purpose is the trigger. If the copilot were later used to rank or score individual customers or staff, the system returns to Classified before release (page 13, Figure 5).
- Article 50(1) and 50(5). The copilot interacts directly with staff, so a visible line at the first interaction, with the version logged, removes the question of what is obvious (page 13).
- Controls chosen anyway. Fail-closed audit and approval-bound actions are design controls chosen because of the actions. Whether any law requires them for this use is a question for counsel.
Context and containers
Figure 3. Context view of Design A
How to read this: person icons are people, the shaded box groups systems the team does not run, and each arrow is one direction with a label for what travels.
The first diagram already exposes one decision: question text and passages leave the system for the LLM provider. The decision table fixes where that provider runs.
Figure 4. Container view of Design A
How to read this: solid arrows are calls the user waits for, the dashed arrow is asynchronous, and the large box is the network the team operates in one region.
- The Audit store and the Trace store are separate on purpose: traces are sampled and redacted, the audit log is complete per decision (page 13).
- The Retriever, not the Orchestrator, owns the entitlement filter, so no other component can forget it.
- Left out to stay near the node limit: the ingestion path (as in page 5, Figure 1) and the Eval service.
The Orchestrator
Figure 5. Component view of the Orchestrator
How to read this: the large box is one container, the boxes inside it are components with one responsibility each, and everything outside is another container from Figure 4.
| Component | One responsibility | The rule that lives here | Page |
|---|---|---|---|
| Input checks | Reject oversize or unauthenticated requests | Before any model spend | 3 |
| Context builder | Choose what the model sees | Tools, system prompt and reference text first, then passages, then the question, so the prefix cache can hit | 4 |
| Workflow runner | Own the step budget | At most 3 model calls: the answer or tool request, the final text after a tool result, and one repair attempt for malformed output. A workflow written in code, not an open loop | 6 |
| Tool dispatcher | The only code that calls the Tool server | Validate, hash the exact call, ask the Policy engine, request approval, add the idempotency key | 6 |
| Output checks | Decide what reaches the user | Every citation was retrieved; links and images removed; the AI disclosure line present | 12 |
| Audit emitter | Append, wait for the acknowledgement | Fail closed: no entry, no release | 13 |
How to read this: each row is a box in Figure 5, with the rule that explains why the box exists and where the course teaches it.
Why not a free loop? The steps are known before the request arrives, so the decision tree of page 6 stops at a workflow written in code. The one action that cannot be undone gets a human decision step inside it.
Runtime: the normal path and the failure path
Figure 6. A normal question, answered with citations and recorded before release
How to read this: time runs downward, the notes mark decisions the Orchestrator makes, and the answer leaves only after the second audit acknowledgement.
Figure 7. Failure paths: the model does not answer in time, and the audit store is down
How to read this: the outer alt is the model failure, the inner alt is the audit failure, and both end in an honest message rather than a hang or a silent answer.
A retry is allowed only if the time left holds a typical attempt, so the design skips it and takes a rung of the fallback ladder of page 10. Version 1 has no second in-region deployment, so the rung is passages only.
Check yourself: in Figure 7 the model timed out after 5 s. How many seconds could a retry run, and why is it not attempted?
1.2 s (8 minus 1.1, minus 5, minus the 0.7 s reserve). A typical model attempt takes longer than that, so a retry cannot finish inside the deadline and the Orchestrator falls back to passages only.
Now the action path. Step through a letter that needs approval, first as designed and then without the controls.
Figure 8. Life of one approval request
How to read this: each box is a state of one request, each arrow carries its trigger, and the six terminal outcomes each write one audit entry.
Trust boundaries and deployment
Figure 9. Trust-boundary view of Design A
How to read this: arrows whose label starts with T1 to T6 cross a trust boundary and name the control at that crossing, and plain labels stay inside a zone.
| Crossing | What to ask | Control |
|---|---|---|
| T1 Client app to API gateway | Spoofing and tampering from a device | TLS and session token |
| T2 API gateway to Orchestrator | Is identity a verified claim or a header? | Verified identity, rate and size limits |
| T3 Retriever to the data | Could one department's text rank for another? | Filter inside the search, from the verified identity |
| T4 Model gateway and provider | What leaves, and what comes back? | Prompt text only; the reply is untrusted data |
| T5 Tool server to the case system | Does the credential allow more than it needs? | Credential scoped to the user, the tool and the call |
| T6 Approval to a person | Does the approver see what will run? | The exact call and recipient, bound by hash |
How to read this: each row is a T arrow from Figure 9, with the reviewer's question and the control (page 3 and page 12).
Figure 10. Deployment view of Design A in one region
How to read this: shaded boxes are network zones, a stacked box shows the instance count, and the only paths out of the application subnet are the two labelled egress rules.
- Egress rules attach to exactly two containers: the Model gateway and the Tool server (page 3). Everything else has no route out.
- The Model gateway reaches the model endpoint with workload identity, not a stored key. A customer-managed key protects stored artifacts, not a prompt in transit (page 14). The Tool server's credential for the Case system is scoped per call (Figure 9, T5).
- What "same region" covers, and how routing is verified, is whatever the provider documents for your service and date (page 14). On the provider pages that page 14 read, content logging is opt-in, so the audit store is the record.
Check the latency budget with the widget. Set the model stage to 7 s and see how far over the deadline the total goes.
The stages total 6.8 s with 1.2 s of slack. At 7 s for the model the total is 8.8 s, 0.8 s over, and even at 6 s no retry could fit, so the timeout stays at 5 s (page 10).
Data model
Figure 11. Audit and decision data of Design A
How to read this: each box is a table, each line says one or many, and the hash fields on AUDIT_ENTRY make an edit to old history visible.
| Design choice | Why |
|---|---|
Passages are stored as doc_id plus doc_version, not text |
"Which answers cited the superseded policy?" becomes a query (page 13, lineage) |
| The request carries the version id, which pins prompt, model, parameters, tools, retrieval and index | A bad answer names its release, and a rollback is a pointer move (page 9) |
| Audit entries hold ids and hashes, not conversation text | Retention and deletion duties are met in different stores (page 13) |
How to read this: each row is a decision visible in Figure 11, with the page that teaches it.
Decisions
| ADR | Decision and options | Chosen | Consequence and review trigger | Page |
|---|---|---|---|---|
| A1 | Build, buy or configure. Options: configure the existing search, buy a vendor assistant, build on a model API | Build on a managed model API behind the Model gateway, once the trial of the first two has been recorded against the same release set | A trial that passes R4 and R6 first wins: buy it. Revisit when a product enforces approval bound to the exact call | 2 |
| A2 | Where the model runs. Options: public endpoint, private endpoint in the same region, self-hosted | Private endpoint, a single-region call with no cross-region routing where the provider documents one, workload identity instead of a stored key, reached only through the Model gateway | Residency (R6) is a fixed constraint, so the public endpoint is excluded first. Choose the narrowest routing level the rule allows and prove it from the provider's audit log. Revisit if volume makes self-hosting break even | 4, 14 |
| A3 | Retrieval. Options: exact scan with a filter, approximate index with a post-filter, approximate index with a filter inside the scan | Hybrid retrieval (lexical plus vector fused with RRF), exact scan with the entitlement filter, no reranker in version 1 | 240,000 chunks fit an exact scan, so recall is perfect. Revisit when p95 retrieval passes 0.8 s, then use a pre-filtered approximate index. Add a reranker when recall at 50 is good and recall at 5 is poor | 5 |
| A4 | Autonomy. Options: free agent loop, workflow with a human decision, answers only | Workflow, 3 model calls at most, letters approved by a person, tasks by policy with a 5% sample | Fewer failure modes and a lower cost than a loop. Revisit when users need multi-step actions the workflow cannot express | 6 |
| A5 | Audit. Options: provider logs only, asynchronous audit events, append before release | Append before release, fail closed, ids and hashes in a write-once store | Answers now depend on the audit store: it is replicated in region and the manual process is the fallback. Revisit if reconciliation shows the answer path is low risk | 13 |
| A6 | Governance. Options: classify the model, classify the use | Register the intended purpose, record the classification with a counsel note, add the Article 50 line | Any change of purpose returns to Classified. Revisit when the Annex text or its dates change | 13 |
How to read this: each row is one decision record in table form, and the last two columns say what it costs and when to revisit it (page 2 and its decision log).
Evaluation and release
| Gate | What it measures | Number | Page |
|---|---|---|---|
| Proof gate | Quality on the release set, with a one-sided 95% Wilson lower bound | 370 of 400 clears 0.90 (lower bound 0.9004) | 8 |
| Slices | Pass rate and retrieval recall at k per department, with n and an interval; reported, not gated alone | Claims 90, Underwriting 70, Customer service 60, Legal and compliance 50, Finance 40, Shared 40, plus 50 abstention items | 8 |
| Judge | Calibration against human labels on a fresh sample | Kappa at least 0.67 and failure recall at least 80% on 200 items, re-checked monthly and after any change | 8 |
| Access and actions | The 300-case suite from R4 | 300 of 300 blocked, lower bound 99.1% | 12 |
| Action quality | End state graded, policy steps checked, pass^k | With a 0.97 success per trial, pass^3 = 0.9127 | 8 |
How to read this: each gate names its metric and its number, and the last column is the page that teaches the method.