Match the pattern to the problem
Decide whether a problem needs an augmented LLM, a workflow or an agent from its predictability, risk and cost, and judge proposals that use more autonomy than the problem needs.
Scenario
A retailer's support team built an agent to answer "where is my order?" messages. It plans, picks from nine tools, checks its own work and replies. Answers are right, but they take 14 seconds at the 95th percentile and cost six times the budget.
Every one of these questions needs the same thing: look up one order and explain its status. The task never needed an agent to plan anything.
Explanation
Anthropic describes a ladder of patterns. Each step up buys flexibility and pays for it in latency, cost and predictability.
| Pattern | What it is | Fits when |
|---|---|---|
| Augmented LLM | One model call with retrieval, tools or memory | One question, one answer, maybe one lookup. Often enough |
| Workflow | Model calls and tools on paths written in code | The steps are known in advance |
| Agent | The model directs its own process and tool use in a loop | The number and order of steps can't be predicted |
The workflows you will meet most:
- Prompt chaining: fixed steps, each call working on the last one's output, with checks in code ("gates") between them.
- Routing: classify the input, then send it to a specialized prompt, tools or model.
- Parallelization: sectioning (independent parts at once) or voting (the same task several times for more confidence).
- Orchestrator-workers: a central call decides the subtasks for this input and hands them to workers. Use it when you can't list the subtasks in advance.
- Evaluator-optimizer: one call drafts, another critiques against clear criteria, in a loop.
Three properties decide the pattern:
- Predictability. If you can write the steps down, write them in code. Workflows give predictability and consistency for well-defined tasks; agents are for open-ended problems where you can't hard-code the path.
- Risk. Agents' autonomy brings the potential for compounding errors. An agent needs ground truth from its environment at each step (tool results, test runs), stopping conditions such as a maximum number of turns, sandboxed testing and guardrails, and checkpoints where a person can step in. If an auditor needs proof that each step ran, a fixed path gives it for free.
- Cost and latency. Agentic systems trade latency and cost for better task performance. Pay that only where the task performance needs it.
Anthropic's advice: find the simplest solution possible, and add complexity only when it demonstrably improves outcomes. Patterns also combine: a router can send most inputs to simple prompts and only the open-ended ones to an agent.
Worked example
A tax agency receives 30,000 letters a month. They fall into five types: address changes, payment plan requests, objections to an assessment, requests for documents, and complex queries about a business's tax position.
Proposal
One agent with 14 tools reads every letter, works out what is needed and acts on it, until it judges the case done.
Address changes get the same open-ended loop as complex queries: high latency and cost everywhere, a different path on every run, and 14 tools available to every letter.
Revised
Routing: a first call classifies each letter into one of the five types or "unclear". Unclear letters go to a caseworker.
Address changes, payment plans and document requests: one call each with a specialized prompt and only the tools that type needs (augmented LLM). Code applies the payment-plan rules.
Objections: a prompt chain. Extract the grounds, check in code that the assessment ID exists, draft the summary for the officer who decides.
Complex business queries: an agent with read-only tools, a turn limit, and a tax adviser who reviews every answer before it is sent.
The autonomy now sits only where the path really varies, and the rest is predictable, cheaper and easier to audit.