Hypothetical scenario. Northwind’s review board sees healthy serving, retrieval, agent and gateway components. Priya revokes an employee’s access while a request is queued for fallback. Maya asks what the complete employee service may now return or carry out.
Dev: “Each component passed its own checks.”
Maya: “Follow this one intention through the changed authority rather than adding up component results.”
Defend the integrated optional architecture at its actual boundaries. Keep the read-only assistant and independently approved change-request capability distinct. Completing the core course does not require this specialization, and a shared platform name does not authorize arbitrary enterprise actions.
Background for this lesson
Your outcome is an integrated design defense and a concrete revision under changed authority. Prerequisites are all five optional AI architecture pages and their linked GenAI foundations. The core System Design course remains complete without this module. Begin with a read-only policy assistant and an independently approved change-request capability. Do not expand to arbitrary enterprise actions because the platform now has a shared name.
What may this employee intention become at each boundary?
Authenticate the employee and establish a task identity, permitted scope and deadline. The application selects the task contract: answer from current eligible evidence, or prepare a specific change proposal. The gateway then admits only an authorized route with a budget reservation. Infrastructure admission does not approve a business action.
The evidence path carries source identity, version, current eligibility and transformation compatibility. Retrieval selects candidates, source expansion verifies usable passages, and generation receives a bounded evidence set. The output contract distinguishes a supported answer, a limitation and an action proposal. A confident sentence cannot erase an unresolved source or provider state.
For a consequential proposal, validate current target state and any required exact approval before dispatch. Persist the accepted operation identity and reconcile uncertainty at its target. Return a status grounded in that durable state. Keep the read-only answer and the write authority separate even when they appear in one conversation.
Name the artifact crossing each boundary
The platform needs more than a global trace identifier. Preserve the task identity, evidence version, route and model configuration, proposal identity, policy decision, approval and effect receipt where the workflow requires them. These records answer different questions and can have different retention rules.
A trace explains a retained execution. An audit record establishes a required decision or effect history. A search index is a derived source projection. A model response is generated output. Treating them as interchangeable makes recovery and review ambiguous. The diagram should label what each arrow carries and which recipient is authorized to accept it.
Keep source text out of telemetry unless its use and retention are justified. Store references and bounded excerpts where adequate, with restricted investigation access. A centralized platform can amplify a retention mistake across teams just as easily as it can improve visibility.
Review one request and one approved action across the platform
Hypothetical scenario. An employee asks a policy question, then proposes a bounded change request. Trace identity, current document permission, retrieval evidence, model admission, answer support and the independently approved action. The gateway's route decision cannot approve the later business effect, and a model answer cannot grant its own authority.
| Boundary | Shared platform owns | Application owns |
|---|---|---|
| Retrieval | Index lifecycle and transport | Applicable evidence and permission |
| Model gateway | Eligible routing and budget | Task semantics / supported answer |
| Action workflow | Durable attempt evidence | Approval and business invariant |
| Recovery | Restore / replay mechanisms | External effect reconciliation |
Assign shared infrastructure responsibilities separately from application policy. The platform can own serving, budgets and evidence transport; the application owns which source is applicable, what approval means and which transition may occur. Every control needs a named operational owner and a defined unavailable outcome.
Now revoke a source during index migration and force provider fallback. The new index, cache, reranker and fallback request must all honor the same disclosure rule. If the action outcome is uncertain, the workflow retains its original business identity rather than asking another provider to improvise a replacement. Compare accepted-task cost only after counting failed, retried and unresolved work under the declared task population.
Do not equate web traffic with model work
Hypothetical worked example. Select one hundred web requests per second for a mixed employee portal. Suppose ten of those requests per second start assistant tasks. The assistant fraction is 10 ÷ 100 = 0.1. The remaining ninety web requests do not become model calls merely because the same portal hosts the assistant.
For a selected assistant mix, eight tasks per second need one model call, while two tasks per second need three calls. Model-call demand is 8 × 1 + 2 × 3 = 14 calls per second. Compared with ten tasks per second, the mean is 14 ÷ 10 = 1.4 calls per task. Retry and fallback attempts would add separate work; this subtotal excludes them.
Choose a per-call planning reservation of two thousand input tokens and five hundred output tokens, as in the gateway exercise. Fourteen calls per second reserve 14 × 2,500 = 35,000 token units per second. Across a selected sixty-second interval the subtotal is 35,000 × 60 = 2,100,000 token units. It is not a current price estimate or a measured generation rate.
For release evidence, select two hundred accepted tasks and a five-percent diagnostic trace sample. Expected traces are 200 × 0.05 = 10, with actual count subject to sampling. If twenty of those accepted tasks involve approved changes, the required approval population remains twenty, not five percent of twenty. Sampling diagnostics must not silently reduce required audit coverage.
Revise the queued request after access changes
The new condition is an employee revocation after initial request acceptance but before evidence reaches a fallback model. Identify the exact old assumption: authorization checked once at intake was treated as valid throughout queueing, retrieval and dispatch. That assumption is incompatible with the selected current-permission contract.
Carry a reference to authenticated scope and revalidate at the required evidence and dispatch boundaries. If current authority cannot be established, pause or return a limitation. Prevent cached evidence and answers from bypassing the same policy. A route authorized for the old scope does not authorize dispatch after revocation.
Record the denied or revised outcome without preserving more restricted content than necessary. If evidence already reached a model before revocation, the service cannot pretend the disclosure never happened. Describe the enforcement boundary precisely and assess retention and provider behavior under the approved contract. Current checks prevent future acceptance; they do not retroactively erase every delivered copy.
In the wild: composable patterns do not merge authorities
Anthropic’s primary account of agent patterns separates predefined workflows from model-directed behavior. That distinction helps choose a narrow orchestration shape for this platform. It does not imply that combining patterns grants common authority over documents, tools and external effects.
Likewise, the gateway and serving documents examined earlier describe mechanisms with specific scopes. Preserve those scopes in the integrated review. A successful route, valid schema and completed model call together still do not prove that an answer was supported or an action authorized.
Every component passes while the handoff leaks
Hypothetical failure scenario. Retrieval correctly filters documents at task intake. The request waits in a queue, access changes, and the gateway correctly uses its configured fallback. The fallback receives the old retained passages because no component owns revalidation at that handoff. Each component’s local check passes while the platform violates its current-permission requirement.
Assign an owner to the handoff contract and test the complete sequence with revocation during waiting. Include cached and retried paths. Component checks remain useful, but integration evidence must cover changes between their observations. The fix is an authority rule and enforced transition, not merely another monitoring label.
Defend a limited release with explicit remaining uncertainty
Present the baseline, workload, invariants, denied states, recovery plan and evaluation slices together. Separate derived budgets from measurements and owner-selected product requirements. State which source connectors, languages, task classes and providers were actually reviewed. Do not claim enterprise-wide safety from one policy collection.
Release the read-only capability independently where possible, then add one action with its own approval and recovery evidence. Keep rollback compatible with retained source and task versions. A model rollback does not reverse a committed supplier change; compensation or manual repair belongs to the business workflow.
Use the final review to identify the most important missing measurement or authority decision. The objective is a design others can challenge and operate. The following optional practice pages focus on explaining that reasoning, solving a new brief and revising after critique without memorizing another collection of component names.
Challenge the proposed mechanism
Fallback succeeds after source revocation, but its answer cites cached old text. Which platform claim failed?
Reveal the design reasoning
The end-to-end disclosure contract failed despite provider availability. Trace every derived copy, suppress the answer and repair the evidence path. Review the approved action separately; the successful model call proves neither current permission nor effect correctness.
Decision and reconsideration: Approve the integrated request and action contract with explicit owners. Keep this AI capstone optional to the completed systems core.
Check the design against changed conditions
One hundred portal requests arrive each second. Must the model fleet serve one hundred calls per second?
Reason through the consequence
No. Under the selected mix, ten tasks produce fourteen model calls per second before retries. Derive each boundary’s work from the actual task mix.
Access was valid at intake but revoked while queued. Is the earlier decision sufficient under the chosen policy?
Reason through the consequence
No. The selected current-permission contract requires revalidation at evidence and dispatch boundaries, including cached and fallback paths.
A five-percent trace sample covers twenty approved changes. Can the audit retain only one approval?
Reason through the consequence
No. Required approval evidence covers the declared action population. Trace sampling is a separate diagnostic policy, with an expected sample rather than complete coverage.
This completes the optional AI architecture sequence. Page 67 returns to core design skills: explain a familiar job platform within a chosen discussion budget without assuming GenAI knowledge or a particular employer’s rubric.
Northwind decision log
Follow one task across distinct evidence, route and action authorities.
Revalidate the handoff affected by the changed requirement.
Optional AI module complete; next practise explaining and revising a design.
Go deeper: Composition across AI boundaries
- Book chapter: Building LLM Powered Applications: chapter: LLMs for AI-Powered Applications — Valentina Alto. Use this resource to examine application orchestration responsibilities.
- Book chapter: Building LLM Powered Applications: chapter: Choosing an LLM for Your Application — Valentina Alto. Use this resource to examine model selection against the supported product contract.
- Video lecture: The AI Gateway: Scaling Centralized Inference across Decentralized Teams — Meryem Arik. Use this resource to examine route and governance responsibilities within the larger platform.
- Primary document: Building effective agents — Anthropic. Use this resource to examine choosing composable control patterns without merging authorities.