Skip to content

Complete enterprise agentic platform: architecture, failures and release review

17 min reading

Defend an integrated enterprise agentic platform, including failure paths and evidence required to release.

Page details

GenAI · Lesson 45 of 45 · 6 / capstone

Sources · 17 min reading · 35 min with practice

Published · Last edited:

More
20px

Progress is saved in this browser when storage is available.

View guided paths and progress

Know first: Governance, provenance and release/audit evidence. Optional help: GenAI foundations.

Optional background references

Hypothetical scenario. Northwind brings its platform proposal to a final design review. Maya asks for a supported policy answer and a proposed support-record change. Dev’s diagram includes the course components; Priya asks what the design records when the answer is supported but the update’s response disappears.

Maya: “Can we call the workflow complete if the answer is right but the change is uncertain?”

Dev: “The answer and external operation have different acceptance evidence.”

Priya: “Trace both, preserve the operation identity and show the recovery decision before approving the design.”

You will defend the integrated retrieval, action and serving path with versioned evidence, bounded authority and explicit failure outcomes. Reuse the course’s worked ledgers and case-level checks; this capstone is a reviewable design exercise, not a claim that an enterprise platform has been deployed.

Can the complete design explain one incomplete workflow?

Hypothetical scenario. A permitted employee asks Northwind to summarize a current policy and propose a support-record change. Ingestion has published a versioned document snapshot. Retrieval applies employee scope before dense/sparse candidate fusion and reranking. Evidence assembly preserves source identity and effective date. Response-cache reuse is allowed only under the current task, policy and freshness contract; prefix reuse remains a separate model-state optimization.

The agent proposes a typed update through an approved tool. An explicit approval binds to that immutable proposal, and the executor owns the external operation identity. If the worker fails after dispatch, recovery reconciles the record rather than assuming the update never happened. A child reviewer receives only the artifact and authority needed for its task. The gateway admits model work under the run budget; traces connect the model, retrieval and tool attempts without exposing unrestricted source contents.

For the capstone exercise, reuse the chosen cost ledger from the preceding economics lesson and independently classify the outcome as accepted, rejected or incomplete. An answer can be supported while its action remains uncertain. Release evidence must cover both. Submit the architecture diagram, request/evidence/action trace, capacity assumptions, failure-recovery table, case-level evaluation and decision log. This is a worked design review, not a claim that a Python project or enterprise platform was deployed.

Hypothetical scenario. Maya asks Dev, Priya and Sam to defend the assistant before it can handle live support work.

In short. Join evidence, authority, state and budget decisions. Name each remaining unknown and its owner.

Design an assistant that can admit its limits

Hypothetical scenario. A small support team needs help answering questions about a changing product policy. Staff want a draft with evidence, not an autonomous system that silently promises refunds. The assistant may retrieve permitted documents and prepare a response; sending messages and changing customer accounts remain outside its initial scope.

This final exercise combines the whole GenAI course. You must define the task, assemble evidence, budget the request, evaluate failures, bound tools and decide whether adaptation is justified. There is no single vendor stack that makes those decisions disappear.

Write a short design before opening the explained scenarios. State the audience and task contract, draw the evidence path, show the arithmetic behind your resource assumptions and name one condition that blocks release. Reading the reference reasoning is different from demonstrating that you can defend your own design.

Reconcile the integrated platform packet

Hypothetical scenario. Trace one permitted answer and one separately approved action through the existing platform. Retain source revisions, caller scope, budget and operation identity.

Reconcile the integrated platform packet
ArtifactConcrete evidenceDecision boundary
Evidencesource/ACL versionsApplication
Budgetreserved exposureGateway
Effectapproved identityTarget
Eligible input: Evidence / scope → Gateway / workflow.Eligible input: Evidence / scope → Gateway / workflow. Evidence / scope to Gateway / workflow: eligible input; Gateway / workflow to Protected effect: approved operation.Evidence / scopeGateway / workflowProtected effecteligible inputapproved operation
Eligible input: Evidence / scope → Gateway / workflow. Enlarge the diagram to inspect its labels; the surrounding records and explanation give the text alternative.

During revocation, fallback and resume, each boundary still owns its original obligation. Model availability cannot replace disclosure authority or effect reconciliation.

The most capable model is not the requirement

A system chosen only from a model leaderboard leaves the actual product unspecified. Does the draft identify the correct account and policy version? Is the evidence permitted for this staff member? What happens when the source does not answer the question? Which actions are allowed after generation?

Define successful behavior in terms a reviewer can inspect. A useful draft cites eligible passages, distinguishes source facts from uncertainty and avoids commitments outside the support worker's authority. The service must also handle unavailable evidence and interrupted generation without inventing completion.

Begin with a baseline that presents ranked excerpts and lets staff write the reply. Compare whether synthesis reduces the relevant effort while maintaining required constraints. A larger model can be a candidate, but the comparison must explain what problem its extra capability is meant to solve.

Connect the course decisions into one flow

Source ingestion preserves identity, versions and access rules. Parsing and chunking retain enough context for policy exceptions. Retrieval combines appropriate exact-identifier and similarity signals over eligible material. The answer stage receives a bounded source set and produces a draft with references.

A bounded support drafting workflowAn authenticated task selects eligible policy evidence and generates a validated draft. A staff reviewer decides what to do with it. Evaluation examines the same evidence, draft and limitation behavior under versioned configuration.Authenticated taskpolicy + account scopeEligible evidencebounded model requestdraft validationStaff reviews draftno automatic sendingVersioned evaluation

Application checks enforce output shape and citation eligibility. Source-support review determines whether material claims follow from the evidence. Neither valid JSON nor a plausible citation establishes a correct interpretation. Preserve a useful limitation response when support is inadequate.

Record logical tasks separately from generation attempts. A partial stream is provisional output until the application's acceptance conditions are met. The user interface should distinguish a complete reviewed draft from an interrupted response that requires another decision.

Show a complete illustrative budget

Hypothetical scenario. Choose four evidence passages of 350 tokens each. Their total is 4 × 350 = 1,400 tokens. Add 600 for task instructions and the question, and reserve 500 for output. The planned request allowance is 1,400 + 600 + 500 = 2,500 tokens before any extra serialization or retained history.

Choose ten logical tasks per minute, each with one attempt. Planned input demand is 10 × (1,400 + 600) = 20,000 tokens per minute; output reservation is 10 × 500 = 5,000. If two of those tasks require one extra attempt of the same planned size, attempts become 10 + 2 = 12, input demand becomes 12 × 2,000 = 24,000 and output reservation becomes 12 × 500 = 6,000.

Choose a ten-second useful task deadline. Retrieval uses two seconds, generation is allowed six and validation reserves one. The listed sum is 2 + 6 + 1 = 9 seconds, leaving 10 − 9 = 1 second for unlisted work. This is a planning budget; measured variation and queueing can invalidate it. A second six-second generation cannot simply be added after the first exhausts its allowance.

For a hypothetical 20-case review set, choose eight straightforward policy questions, four exception questions, four insufficient-evidence questions and four permission-boundary questions. The count is 8 + 4 + 4 + 4 = 20. This deliberate mix provides coverage, not a claim about real traffic prevalence.

Suppose the candidate passes all eight straightforward cases but only two in each other group. Its total is 8 + 2 + 2 + 2 = 14, or 14 ÷ 20 = 0.7. The aggregate hides that each challenging group passes only 2 ÷ 4 = 0.5. Release decisions must inspect those required behaviors rather than celebrate the overall fraction.

In the wild: Capstone: Design Review of Northwind’s Policy Assistant

Anthropic's Building effective agents: A bounded workflow and a dynamically directed agent have different orchestration needs.

Choose changes from the failing boundary

If exception passages are missing, inspect source parsing, chunk identity and retrieval before training. If the right passages arrive but the draft ignores an exception, compare a clearer task contract, examples or answer validation. If a stable behavioral failure persists across representative cases, adaptation becomes a candidate with its own data and regression plan.

If request latency is the main issue, separate retrieval time, prefill, output generation and waiting. Shortening context can remove required evidence, and a smaller model can change exception handling. Evaluate the actual quality-resource trade rather than assuming fewer tokens or parameters is automatically better.

If staff later request automatic refunds, create a separate action design. It needs authority, validated arguments, cumulative limits, stable operation identity and recovery from uncertain effects. The drafting assistant's successful evaluation does not establish that new capability.

The policy is revoked during a conversation

Hypothetical scenario. A conversation begins with an eligible policy passage. The policy is withdrawn before the next turn, but a summary retains its old recommendation. The assistant uses that memory to draft a new answer without checking current evidence.

Conversation continuity does not establish continuing source authority. Retain source references and versions outside a lossy summary, then re-evaluate eligibility according to the application's freshness contract. A cached answer needs the same scope and version reasoning.

Define the unavailable path. If current eligibility cannot be established, the assistant can explain that it cannot verify the policy and direct the staff member to an authorized source process. It should not turn missing evidence into an unsupported customer commitment.

Do not let the demo answer the design review

“The answer sounds human, so it is useful.” Readability matters, but task identity, evidence support and allowed commitments remain separate criteria.

“The assistant has retrieval, so its facts are current.” Ingestion, version selection, permission changes and cache reuse determine the actual evidence.

“The test passed, so the course exercise has one correct stack.” Different implementations can meet the contract. Defend their consequences and identify evidence that would change the choice.

Submit a reviewable architecture decision

Your deliverable should contain the task contract and exclusions, a source-to-draft diagram, explicit request and recovery budgets, a small case matrix with explained labels, one proposed improvement and one rejected alternative. Include what the service says when evidence, authority or resources are insufficient.

Write a release rule that separates required constraints from negotiable qualities. Preserve prompt, source, retrieval and model versions so a regression can be investigated. A rollback plan changes future behavior; it cannot undo an already disclosed passage or commitment.

For deeper infrastructure reasoning, compare this design with the system-design course's document-assistant architecture. That case focuses on storage, ownership and operational boundaries; this exercise focuses on model-task evidence and intervention choices.

Limits of Capstone: Design Review of Northwind’s Policy Assistant

This design is a hypothetical review exercise. Workload estimates are declared assumptions, and no author-run deployment result is claimed. A real release needs evidence for permissions, current sources, supported answers, recovery, cost and the operational budget that accepts the result.

Test the integrated packet

Recovery keeps the original contract: propagate or reauthorize.Recovery keeps the original contract: propagate or reauthorize. Revocation to Derived copies: propagate or reauthorize; Derived copies to Answer gate: current disclosure rule.RevocationDerived copiesAnswer gatepropagate or reauthorizecurrent disclosure rule
Recovery keeps the original contract: propagate or reauthorize. Enlarge the diagram to inspect its labels; the surrounding records and explanation give the text alternative.

A fallback answers after revocation. What decides acceptance?

Reveal the design reasoning

Current disclosure and support evidence decide. Suppress ineligible text and recover uncertain actions under their original identity.

Decision: Approve the integrated contract, owners and recovery envelope.

Final review: defend your decisions

Only straightforward questions pass reliably, but they dominate the demonstration. What should the review conclude?

The demonstration does not cover required exception, missing-evidence and permission behavior. Inspect those slices, narrow the supported scope if appropriate and repair the failing boundary before claiming the broader task is ready.

The product owner asks for a more human voice. Which boundaries can be relaxed?

None follows from that request alone. Improve prose while preserving source support, scope, uncertainty and authorized commitments. Style is a task quality, not permission to invent facts or experiences.

You may fund only one next improvement. How do you choose?

Use labeled failures and measured resource evidence. Pick an intervention that addresses the most consequential unmet requirement, state an expected effect and an evaluation that could reject it, and retain the previous working configuration. A justified decision can be retrieval work, a prompt change, validation, adaptation or an explicit scope reduction.

Northwind decision log

Join evidence, authority, state and budget decisions.
Name each remaining unknown and its owner.
Make release conditional on end-to-end acceptance evidence.

Connect the decisions from the course

Hypothetical scenario. Use Northwind’s accumulated decisions to challenge the policy-assistant design, including the optional application and mechanism cases.

  1. Tokens, BPE, and Context Budgets: Why the Upload Passed and the Request Failed
    • Count the complete request before admission.
    • Reserve space for the answer and tool results.
    • Reject or shorten evidence before calling the provider.
  2. Attention and the KV Cache: Why Long Chats Run Out of GPU Memory
    • Budget cache memory by active tokens.
    • Include key/value heads, layers and element width.
    • Admit a conversation only when its growth fits.
  3. Prompts as Contracts: Writing Instructions You Can Test
    • Define the answer contract before editing instructions.
    • Test revisions on the same labeled cases.
    • Keep the prompt version with the acceptance evidence.
  4. Structured Outputs: Making a Model’s Answer Safe to Parse
    • Validate structure at the application boundary.
    • Check business rules after parsing.
    • Route invalid output to a bounded recovery path.
  5. Embeddings and Similarity: Why “Close” Is Not the Same as “Right”
    • Use similarity to propose evidence.
    • Test relevance against labeled questions.
    • Keep permissions separate from distance scores.
  6. Retrieval-Augmented Generation: Getting the Right Paragraph to the Model
    • Retrieve the current authorized document revision.
    • Keep chunk identity with the answer.
    • Inspect retrieval before changing the generator.
  7. Chunking Documents: How Splits and Overlap Hide or Reveal the Answer
    • Split at meaningful document boundaries.
    • Retain qualifiers with the rule they modify.
    • Evaluate complete evidence rather than chunk length alone.
  8. Vector Indexes (HNSW and Friends): Exact vs Approximate Search
    • Compare approximate results with an exact baseline.
    • Measure recall under the permitted filter.
    • Choose index settings from a latency and recall budget.
  9. Designing a Retrieval Service from Source to Answer
    • Track each source revision through ingestion.
    • Carry authorization into retrieval and caches.
    • Expose evidence freshness in the answer record.
  10. Calling Model APIs: Timeouts, Retries, and Budgets
    • Carry one deadline through every attempt.
    • Separate unknown outcomes from confirmed failures.
    • Cap retries and record the final state.
  11. Serving Open Models: KV Cache Growth, Batching, and Admission Limits
    • Reserve headroom for growing sequences.
    • Measure prefill and decode separately.
    • Reject work before memory exhaustion spreads.
  12. Evaluation Sets: Building the Test Before You Tune
    • Label representative tasks before tuning.
    • Separate development cases from release cases.
    • Refresh the set when the workload changes.
  13. LLM Judges: Calibration, Bias, and Release Gates
    • Calibrate graders against human labels.
    • Swap answer order to expose sensitivity.
    • Review false accepts before setting a release gate.
  14. Tool Calling and MCP: Letting a Model Act Without Giving It the Keys
    • Treat a tool call as a proposal.
    • Authorize arguments with the caller’s identity.
    • Verify the external outcome before reporting completion.
  15. Durable Agents: State Machines, Budgets, and Uncertain Actions
    • Persist action identity before attempting a write.
    • Reconcile uncertain actions before resuming.
    • Keep time and attempt budgets in durable state.
  16. Prompt, RAG, or Fine-Tune? Choosing the Failure to Change
    • Classify the failure before choosing an intervention.
    • Change evidence for missing facts and training for behavior.
    • Compare accepted outcomes on a fixed evaluation set.
  17. Distillation and Small Models: Preserve the Task, Measure the Trade
    • Define which teacher behavior must survive.
    • Evaluate rare costly errors separately.
    • Select the smaller model only within task constraints.
  18. Capstone: Design Review of Northwind’s Policy Assistant
    • Join evidence, authority, state and budget decisions.
    • Name each remaining unknown and its owner.
    • Make release conditional on end-to-end acceptance evidence.
  19. Case: AI-Assisted Support Triage
    • Separate classification from escalation authority.
    • Keep uncertain cases in a visible review queue.
    • Measure missed urgent cases as well as average accuracy.
  20. Case: Document Pipelines and Visual Evidence
    • Retain page and region provenance.
    • Validate tables before indexing their text.
    • Escalate evidence that extraction cannot preserve.
  21. Case: A Document-Maintenance Assistant
    • Bind proposed edits to a source revision.
    • Require review of the resulting document.
    • Reject stale edits instead of overwriting new work.
  22. Hybrid Retrieval: Fusing BM25 and Vectors, Then Reranking
    • Retrieve lexical and semantic candidates separately.
    • Fuse ranks without equating incompatible scores.
    • Evaluate the final evidence set after reranking.
  23. Post-Training: RLHF, DPO, and Reasoning Models
    • Specify the behavior and reward being optimized.
    • Keep training signals distinct from factual evidence.
    • Test accepted tasks after each adaptation.
  24. Long-Context Systems: When Bigger Windows Help and When They Don’t
    • Compare full context with selective retrieval.
    • Budget tokens and cache growth together.
    • Test evidence use at different context positions.

Go deeper into evidence and operating discipline

Check the mechanism in this lesson

The answer is supported, but a worker failed after dispatching the approved update. Is the entire workflow accepted?

Compare the explanation

Not until the action outcome is reconciled. Answer quality and external-action completion are separate acceptance conditions. Use the durable operation identity and record an incomplete state while the effect remains uncertain.

Carry the decision forward

The core course returns to its first promise: permitted evidence, authorized actions and accepted outcomes. Use the optional depth chapters when a diagnosed constraint requires them. Page 46 begins with embedding adaptation; revisit representation and retrieval evaluation before deciding whether to change the similarity function.