Select appropriate architectural patterns (workflow, agentic, augmented LLM)
Choose between an augmented single call, a predefined workflow (chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer) and an autonomous agent based on how predictable the path is, and justify the choice by cost, latency and auditability.
Key points
- 1
Anthropic's guidance: find the simplest solution possible and only add complexity when it measurably improves outcomes. Many applications need only a single augmented LLM call (retrieval, tools, memory) with a structured output.
- 2
Workflows orchestrate LLM calls through predefined code paths; agents let the model dynamically direct its own process and tool use. Workflows give predictability, reproducibility and bounded cost; agents give flexibility at higher cost and latency.
- 3
Prompt chaining: fixed sequential steps with programmatic gates between them; use when a task decomposes into known subtasks and a check between steps catches errors.
- 4
Routing: classify the input and send it to a specialised prompt and tool set; use when inputs fall into distinct, known categories handled differently (six email types, four resolution procedures).
- 5
Parallelization: sectioning splits independent subtasks and runs them at once; voting runs the same task several times for confidence. Use when subtasks are independent or multiple perspectives are needed.
- 6
Orchestrator-workers: a central LLM decomposes the task dynamically, delegates to workers and synthesises; use when the subtasks cannot be predicted in advance.
- 7
Evaluator-optimizer: a generator and an evaluator loop against explicit criteria; use when clear evaluation criteria exist and iterative refinement measurably helps (brand-rule compliance). Bound the loop with a round limit.
- 8
Agents fit open-ended problems where the number and order of steps depend on tool results and the environment gives verifiable feedback (tests, checks). Bound them with turn limits, budgets and human checkpoints.
- 9
A predictable exception (a clarifying question in 15% of cases) is a branch in a workflow, not a reason to switch to an agent. Hybrid designs are normal: route by predictability, workflows for the known 80%, a bounded agent for the open-ended 20%.
- 10
Justify pattern choice in terms stakeholders care about: workflows are auditable and cheap per run; agents cost more tokens and vary per run; evaluator loops and parallel workers add latency.
- 11
Distractor patterns: "make it an agent for flexibility" when the path is known; orchestrator-workers for a handful of dependent steps; evaluator loops on an interactive button that must feel instant; a single agent for everything when audit needs reproducible paths.
Read the source
Further reading
Suggest a resource- Cookbook: Basic workflows(opens in a new tab)Runnable prompt-chaining, parallelization and routing implementations.Articleplatform.claude.comEditor’s pick
- Cookbook: Orchestrator workers(opens in a new tab)A runnable orchestrator-workers implementation.Articleplatform.claude.comEditor’s pick
- Cookbook: Evaluator optimizer(opens in a new tab)A runnable generate, evaluate and refine loop.Articleplatform.claude.comEditor’s pick
Test yourself on Select appropriate architectural patterns (workflow, agentic, augmented LLM)
Ten questions, with the answer and explanation after each one.