1.3 Selecting Architectural Patterns
What You Need to Know
Section titled “What You Need to Know”Anthropic’s Building Effective AI Agents names three tiers. An augmented LLM is a single model call with retrieval, tools and memory added. A workflow orchestrates LLMs and tools through predefined code paths. In an agent, the model dynamically directs its own processes and tool usage. Five workflow patterns and one decision rule complete the vocabulary.
This lesson uses one made-up example throughout: a coach hire firm that gets a high volume of requests for school trips, weddings and airport runs. Each kind of request has its own pricing rules. Replies must be fast, consistent and auditable.
The Three Tiers
Section titled “The Three Tiers”The augmented LLM is the basic building block. For the firm, it is one call that retrieves prices and drafts a reply. For most business problems it is enough on its own. A system that is ready for production does not have to have many steps.
In a workflow the developer decides the steps, such as classify then quote, and the model executes within them. Code sets the path, so the workflow is predictable, testable, consistent and auditable.
An agent works in a loop and uses feedback from its environment until it meets the goal. Its flexibility has costs: more tokens, higher latency, more ways to fail and a harder audit. Its paths are not predefined, so it needs guardrails, sandboxing and observability.
The Five Workflow Patterns
Section titled “The Five Workflow Patterns”| Pattern | Selection cue | Shape |
|---|---|---|
| Prompt chaining | Task decomposes cleanly into fixed sequential subtasks | Step feeds step, optional programmatic gates between |
| Routing | Distinct input categories are better handled separately | Classifier dispatches to specialised handlers |
| Parallelisation | Subtasks are independent, or multiple perspectives help | Sectioning (split the work) or voting (repeat for confidence) |
| Orchestrator-workers | Subtasks cannot be predicted in advance | Central model decomposes dynamically, delegates to workers |
| Evaluator-optimizer | Clear evaluation criteria exist and iteration measurably helps | Generator loops against an evaluator until acceptable |
Each pattern has a precondition. Evaluator-optimizer without clear evaluation criteria is not a valid choice. With no written standard for a good quote, the firm’s evaluator has nothing to check. When the steps are known in advance, orchestrator-workers does the same work as prompt chaining at extra cost.
The Decision Rule
Section titled “The Decision Rule”Anthropic’s guidance is explicit: find the simplest solution that meets requirements, and add complexity only when it demonstrably improves outcomes.
- Escalate from augmented LLM to workflow to agent only when the simpler tier cannot meet a named requirement.
- Workflows are better than agents when the steps are known. An agent given a fixed pipeline adds cost and unpredictability with no benefit.
- Agents are worth their cost when the path cannot be scripted. This includes open-ended problem-solving, unknown step counts, and decisions that depend on intermediate findings.
Worked Selection
Section titled “Worked Selection”For the firm:
- The firm has distinct kinds of request. Each kind has its own handler, which quotes the request from the price list or passes it to a booker. Routing is the pattern whose selection cue matches this.
- The steps are known. So agent flexibility adds nothing, and the unpredictable paths of an agent conflict with the audit requirement.
- Each request is work for one context window, so multi-agent overhead is unjustified.
The firm needs a routing workflow. The argument for this choice has four parts:
- The pattern matches the cue.
- The pattern meets the requirements.
- Nothing simpler suffices.
- Nothing more complex is worth its cost.
Practise it for any scenario.
In the exam
Section titled “In the exam”The exam expects the canonical vocabulary, used precisely. Most questions here are selection questions with a scenario, its requirements and four architectures. One architecture fits. The exam treats each pattern’s precondition as a requirement: without it, the pattern is the wrong choice.
Exam Traps
Section titled “Exam Traps”Practice Scenario
Section titled “Practice Scenario”Support tickets must be classified into five categories, then either answered from a knowledge base or escalated to a human. Each category has its own answering rules, and a change to one category’s rules must not alter answers in the others. Volume is high, latency matters, and behaviour must be consistent and auditable. Which architecture fits best?
- A. A single augmented LLM call that handles classification, answering, and escalation in one prompt
- B. A routing workflow: classify each ticket, then dispatch to a specialised handler for its category
- C. An autonomous agent with knowledge-base and escalation tools that decides its own approach per ticket
- D. A multi-agent system with a coordinator and one subagent per ticket category, each holding its own tools
Answer & explanation
Correct: B
- A — The question excludes this: in one shared prompt, a change to one category’s rules can alter answers in the others. One call also gives no auditable decision points.
- B — Distinct categories handled separately is the routing selection cue. Predefined paths deliver the consistency, latency, and auditability the requirements name.
- C — Flexibility is not a stated requirement, so the costs of an agent (unpredictable paths, higher cost, harder audit) give nothing this scenario needs.
- D — The question excludes this: volume is high and latency matters, and a coordinator adds model calls to every ticket. Each ticket also fits comfortably in one context window. The multiplied token use of multi-agent systems and orchestration complexity are unjustified for classify-and-respond work.
Sources
Section titled “Sources”- Building Effective AI Agents — Anthropic
- Agent SDK overview — Anthropic