Anthropic: Building effective agents
Primary guidance on prompts, workflows, agents, routing, parallelization, and when simple designs are preferable.
Compute College
Break complex AI work into smaller stages and decide which steps belong in code, prompts, or human review.
Prompt decomposition divides a complex task into stages with clear inputs and outputs. A chain runs those stages in sequence; parallel branches handle independent subtasks before an aggregation step. Decomposition is useful when one prompt has too many responsibilities, but every added call introduces latency, token cost, failure modes, and state that must be managed.
Memory trick: A chain is a workflow, not a magic prompt. Every link needs an input, output, test, and cost.
A single giant prompt may be difficult to test and may hide which part failed. Smaller stages can use different models, deterministic code, or human approval where appropriate. The tradeoff is that a five-step chain can cost more than one call if the extra structure does not improve accepted-task rate or reduce downstream correction.
A contract workflow can extract obligations, normalize dates, check each obligation against policy, and then write a human-readable summary. The extraction step returns structured evidence; code normalizes dates; the policy check identifies exceptions; a final model call explains the result. Each stage has a smaller contract than “review this contract.”
Example figures are illustrative calculations, not current quoted market prices.
Current example
Anthropic’s guidance on effective agents recommends starting with simple composable workflows and adding agentic complexity only when it creates clear value. That principle applies to prompt chains: add a stage because it improves a measured outcome, not because more steps sound more capable.
Primary guidance on prompts, workflows, agents, routing, parallelization, and when simple designs are preferable.
Source discipline: the reference explains the concept or method; it is not a substitute for measuring a production workload under its actual provider, model, and data conditions.
Not every workflow benefits from becoming a chain. If the stages share the same context and have no independent checks, extra calls may add cost without making the result better. Start with the smallest design that can be evaluated.
Practical takeaway
Draw the workflow as a sequence or graph. For each stage, name its input, output, evaluator, model or code owner, retry behavior, and cost. Remove a stage if you cannot explain what measurable risk or quality problem it solves.
Decision check: does each added step have its own acceptance test and a benefit larger than its latency, token, and failure cost?
Compute College track
Step 7 of 18: Prompt decomposition and chaining