1.2 End-to-End Architectures and Feedback Loops
What You Need to Know
Section titled “What You Need to Know”Every production Claude system has the same six stages, whether or not anyone drew them. A stage is one job that the data passes through. The six stages are input, context assembly, processing, output, delivery and feedback.
This lesson uses one made-up example throughout: a van hire firm that uses Claude to answer customer emails about bookings, deposits and damage charges.
The Canonical Pipeline
Section titled “The Canonical Pipeline”- Input. This stage ingests, validates and normalises incoming data. Decide the handling of PII (personally identifiable information) here, before anything reaches a model. Do not retrofit it afterwards. Once data reaches the model, it is too late to decide. The van hire firm settles what happens to a customer’s licence number at this stage, before the email goes to Claude.
- Context assembly. This stage is retrieval, memory and prompt construction: everything that decides what the model sees. For the firm, the model sees the customer’s booking record, earlier emails and the reply instructions. Domains 2 and 3 cover the strategies. At this level, you place the stage correctly and know what belongs in it.
- Processing. This stage is the model call or calls: a single augmented call (one model call with retrieval, tools and memory added), a workflow of calls, or an agent loop. The firm’s reply could come from one call that reads the email and the booking record. Objective 1.3 covers the choice of pattern.
- Output. This stage validates and handles what the model returns. It includes structured-output parsing, schema checks, guardrail screening, and a designed failure path for when validation fails. Model output is untrusted input to downstream systems until validated. Structured outputs constrain responses to a schema, so a completed response gives downstream code valid, parseable data. Output that matches the schema can still break business rules, so business-rule checks also belong in this stage. A reply can match the schema and still quote a deposit the firm does not charge.
- Delivery. This stage is how results reach users or systems: a synchronous response, an asynchronous job, an event, or a draft for human review. The choice of delivery is a risk decision as much as a UX decision. Draft for review is the standard way to reduce risk when output errors have consequences, because a person sees the error before the customer does. The firm can send every reply about a damage charge to staff as a draft.
- Feedback loops. This stage captures user feedback, runs automated evaluation on sampled traffic, and collects monitoring signals. It routes all of them to a place where they can guide repeated changes to the prompt, the retrieval and the design. This stage separates production systems from demos. An architecture with no evaluation path cannot improve and cannot prove its value, because nothing records which outputs were wrong. At the firm, staff corrections to drafts and a graded sample of sent replies would provide input for the next prompt change.
Design for Failure
Section titled “Design for Failure”Model calls and their dependencies fail, and a production architecture assumes that they fail.
- Timeouts, retries with backoff, and idempotency apply to every model call. Backoff means a longer wait before each new retry. Idempotency means that a call that runs twice has the same effect as one run. A retry runs the call again, so any side effect it triggers can run twice. A retried call that runs a side effect twice is an incident that the system causes itself. For example, the system charges a van hire customer the deposit twice.
- A designed degraded path for every failure mode : queue the work for a human, serve a cached answer, or return an explicit error. Failure is never silent. An empty response that looks like success is the worst outcome available, because nothing tells anyone to check it. If the firm’s model call times out, the email goes to the staff queue.
- Blast radius analysis. Ask what happens downstream when the model is wrong. The answer is the blast radius, and it determines how much output validation and human review the architecture needs. A wrong internal draft costs an edit. A wrong customer-facing settlement figure costs real money and trust. The model is the same in both cases, and the architecture differs. At the firm, a wrong damage charge sent to a customer needs more checks than a wrong internal note.
In the exam
Section titled “In the exam”The most common question describes an architecture with a stage missing and asks what breaks. Check the six stages in order and mark what exists. The professional-level answer names the missing stage and fixes the root cause. It does not add capability elsewhere. When quality is inconsistent and nobody can say why, the diagnosis is a missing feedback loop, not a weak model. A bigger model, more retrieval or a longer prompt does not fix unmeasurable quality. Adding validation and feedback capture fixes it, because those stages make quality measurable. For the van hire firm, those stages hold rule checks and logged staff corrections.
Exam Traps
Section titled “Exam Traps”Practice Scenario
Section titled “Practice Scenario”A team ships a contract-review assistant: lawyers upload a contract, Claude analyses it, and a risk report is emailed back. Lawyers complain that quality is inconsistent, and the team cannot say which reports were wrong or why. Which change addresses the root cause?
- A. Add retrieval so the model sees more precedent contracts
- B. Lengthen the system prompt with more detailed review instructions
- C. Upgrade to the most capable model available
- D. Add output validation against a review rubric, plus lawyer feedback capture feeding an evaluation set
Answer & explanation
Correct: D
- A — This changes context assembly, but nothing measures whether reports improve. The diagnosed gap is measurement, not context.
- B — Prompt iteration without an evaluation loop is guesswork. There is still no signal about which reports fail or whether the new prompt helped.
- C — Without evaluation and feedback capture the team still cannot measure whether quality changed. The root cause is the missing loop, not model capability.
- D — This adds the two missing stages, output validation and the feedback loop, which are what make quality measurable and improvable.
Sources
Section titled “Sources”- Structured outputs — Anthropic
- Define success criteria and build evaluations — Anthropic
- Building Effective AI Agents — Anthropic