What you will be able to do
- Recognise when a single prompt is doing too much, and when splitting it would only add overhead
- Split a request into parts that each have a testable definition of done
- Choose between independent parallel parts and a sequential chain
- Order stages so each one builds on output that has already been checked, and decide where a human review point belongs
- Decide what each stage must receive so that later stages do not lose detail
Key concept
Prompt chaining — Breaking a complex request into a fixed sequence of smaller prompts. Each prompt does one job and works on the checked output of the step before it. You give up some speed, and in return each call has an easier task and every intermediate result can be inspected.
1.When one prompt is doing too much
Task decomposition means breaking a request into smaller parts, each handled by its own focused prompt, and then deciding what Claude does at each step. The idea is that several easy tasks are more reliable than one hard one. Splitting is not free, though, so the first skill is recognising when a request actually needs it.
Several signs show that one prompt is carrying too much. The same request gives noticeably different results each time you run it. The task has several separate considerations, such as accuracy, tone, compliance and format, competing for attention in one call. Or you need to see an intermediate result before deciding what happens next. For complex tasks with several considerations, models generally do better when each one gets its own call, so it receives focused attention. Explicit chaining is still worth the effort when you need to inspect intermediate outputs or enforce a fixed pipeline.
Splitting is worth it when the task breaks cleanly into fixed subtasks. If you cannot name the parts without overlap, the boundaries are wrong. If a simple, single-output task already works in one prompt, splitting it only adds complexity. The overhead is real. Anthropic has seen teams spend months building elaborate multi-agent designs, only to find that better prompting on a single agent gave equivalent results. Multi-agent setups also typically use 3 to 10 times more tokens for the same task. Try a clearer single prompt first, and split only when it fails for one of the reasons above.
Each part needs its own definition of done before any work starts. A useful test: each statement of done must be concrete enough that a stranger could tell you whether the result passes or fails. "A patient with a basic smartphone can find the current wait time in under 30 seconds without creating an account" passes that test. "The system is easy to use" does not. For a decomposed request, this means writing criteria such as "every clause in contract A has a matching row, or is marked as absent in B" rather than "compare the contracts well". Criteria like these are also what the review stage later checks against.
Checkpoint 1 of 9· Check yourself
A team has three prompts in use. In which case is splitting the work into chained stages most clearly justified?
Inconsistent results and the need to inspect an intermediate result before the next step are the signs that one prompt is doing too much. Splitting a simple task that already works adds latency, tokens and complexity, so it does not make that task faster or cheaper.
“is still useful when you need to inspect intermediate outputs or enforce a specific pipeline structure.”Source: platform.claude.com
Checkpoint 2 of 9· Check yourself
A hiring team wants Claude to help screen 150 applications for one role, using several chained stages. What should they do first?
Every part needs a concrete definition of done before any work starts, because each later stage, including the review, is checked against those criteria. Setting criteria after the outputs arrive, or judging only the final ranking, leaves nothing fixed to measure against.
“Write acceptance tests before code. They give you and AI a shared definition of done.”Source: academy.claude.com
2.Independent parts or a sequential chain
Once you know a task should be split, the next question is whether the parts depend on each other. Some parts are independent facets: each customer-ticket topic, each region, each stakeholder group can be handled without seeing the others, then combined. Other parts are true stages, where step two cannot start until step one has produced its output, as when copy is translated only after it has been written.
| Pattern | How it splits the work | Use it when | Example |
|---|---|---|---|
| Prompt chaining | A fixed sequence; each call processes the previous output | The task decomposes cleanly into fixed subtasks that depend on each other | Write an outline, check it against criteria, then write the document from it |
| Parallelization (sectioning) | Independent subtasks run side by side, results aggregated | Parts can be handled separately, or each consideration deserves focused attention | One call screens queries for inappropriate content while another answers them |
Pasting a large corpus into one request is the decomposition people skip, and it costs quality. Response quality can degrade as context grows, and information that matters for one subtask clutters the reasoning for another. Take a support team building an FAQ from thousands of historical tickets. Concatenating every ticket into one prompt buries the signal. A better approach is to group the tickets by topic, generate FAQ entries for each group, and then merge and de-duplicate them. Each call reasons over one coherent topic, and the merge step sees finished entries rather than raw noise.
async def research_topic(query: str) -> dict:
# Lead agent breaks query into research facets
facets = await lead_agent.decompose_query(query)
# Spawn subagents to research each facet in parallel
tasks = [
research_subagent(facet)
for facet in facets
]
results = await asyncio.gather(*tasks)
# Lead agent synthesizes findings
return await lead_agent.synthesize(results)Parallel work fits when the parts really are independent. It does not fit sequential work, or tasks that must keep context across steps. If facet B needs facet A's conclusions, running them side by side gives two answers that do not fit together, and that is the case for a chain.
Checkpoint 3 of 9· Fill the gap
In this research helper, the lead agent splits a query into independent facets. Which asyncio call goes in the blank so the facet subagents run side by side before their results are combined?
async def research_topic(query: str) -> dict:
# Lead agent breaks query into research facets
facets = await lead_agent.decompose_query(query)
# Spawn subagents to research each facet in parallel
tasks = [
research_subagent(facet)
for facet in facets
]
results = await asyncio. ? (*tasks)
# Lead agent synthesizes findings
return await lead_agent.synthesize(results)asyncio.gather runs all the facet tasks at the same time and collects their results into one list for the synthesis step. This is parallelization: the facets are independent, so none of them has to wait for another.
Source: claude.comCheckpoint 4 of 9· Check yourself
A team runs two subtasks side by side. One estimates the market size, and the other writes a pricing recommendation that depends on that estimate. The two outputs keep contradicting each other. What is the best fix?
The pricing step needs the market-size conclusion, so these are sequential stages, not independent facets. Running dependent parts side by side gives answers that do not fit together. In a chain, each call works on the output of the step before it.
“Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one.”Source: www.anthropic.com
Checkpoint 5 of 9· Exam question
A support team wants to build a comprehensive FAQ from a large set of historical customer tickets. Which decomposition technique is most suitable?
Correct answer: B — Cluster tickets by topic, generate FAQs per cluster, then merge.
- A. Incorrect. Concatenating all tickets and asking Claude to produce the FAQ risks exceeding context limits and lacks structured input, making it difficult to identify recurring themes and organize answers coherently.
- B. Correct. Clustering tickets by topic breaks the large set into manageable sub-problems, enabling focused FAQ generation per cluster. Merging these ensures comprehensive coverage and a well-organized final document.
- C. Incorrect. While summarizing each ticket is a useful preprocessing step, it does not group related issues, so combining summaries still lacks the topic-based organization needed for a coherent FAQ.
- D. Incorrect. Employing a third-party generator avoids the decomposition challenge rather than addressing it, and does not use Claude. The question requires a technique that structures the task for Claude.
3.Draft, review, refine: building on checked output
The most common chaining pattern is self-correction. Claude generates a draft, then reviews it against explicit criteria, then refines it using that review. Each step is a separate call, so you can log, evaluate or branch between them. A research-summary chain shows the shape:
- "Summarize this medical paper covering methodology, findings, and clinical implications."
- "Review the summary above for accuracy, clarity, and completeness. Provide graded feedback."
- "Improve the summary based on this feedback: [feedback from step 2]"
Order matters because every stage inherits whatever it is given. In a chain, each call processes the previous call's output, so a wrong figure, a missed clause or a misread criterion in stage one becomes an assumption in stage two and a foundation by stage six. Without a check between stages, the error is never removed. It spreads, and the final report is built on top of it. This is why a gate on intermediate steps exists: a programmatic or human check that confirms the process is still on track before the next stage runs. One worked example writes an outline, checks that the outline meets the criteria, and only then writes the full document from it.
Latency is the trade-off chaining accepts on purpose to gain accuracy. The serious risk is that an early mistake goes unchecked and is carried into every later stage, so the final report rests on it. Repetitive wording or excess length are cosmetic by comparison.
How much human review a task needs depends on its stakes, as covered in Matching human review to risk. Inside a chain, the question is where that review goes. If you have one review point, put it on the output that every remaining stage depends on and that is hardest to fix later. Usually that is the agreed outline, the extracted facts or the first full draft, before refinement and formatting build on it. A check only at the very end finds problems after every downstream stage has already used them, so fixing them means redoing the chain.
Checkpoint 6 of 9· Put it in order
Put the calls of a self-correction chain for a policy summary in the order they run, each as its own separate call.
- 1.Review that draft against explicit criteria such as accuracy, clarity and completeness, and give graded feedback
- 2.Refine the draft using the feedback from the review
- 3.Generate a first draft of the policy summary
Self-correction always runs draft, then review against criteria, then refine. The review needs a draft to judge, and the refinement needs the review's feedback. Because each step is a separate call, you can log, evaluate or branch between them.
“self-correction: generate a draft → have Claude review it against criteria → have Claude refine based on the review.”Source: platform.claude.com
Checkpoint 7 of 9· Exam question
An analyst breaks a market review into six stages and feeds each result straight into the next, reviewing nothing until the final report is written. What is the greatest risk?
Correct answer: A — A mistake in an early stage is carried into every later stage, and the final report is built on top of it.
- A. Correct. In a chained breakdown each stage treats the previous output as settled fact. A misread figure or a wrong assumption at stage two is not questioned again, and by stage six it is woven through the analysis and expensive to unpick.
- B. Staged work does take more elapsed time, but that cost is the point of the approach and is small next to acting on a flawed report.
- C. Repetition across stages is a tidying problem that a final editing pass resolves, and it does not affect whether the conclusions hold.
- D. Length is easily controlled by stating limits, and an overlong report is a presentation issue rather than a correctness one.
4.What each stage must receive
A stage can only use what it is given. A handoff is the material passed from one stage to the next. Each stage needs three things: the original task, so it knows what the work is for; its own specific instruction; and the actual material it operates on. The orchestrator-workers pattern shows why. A central model splits the task into parts, hands each part to a worker call, and combines the workers' results; the lead agent and subagents in the research code above have exactly this shape. Each worker gets both the original task and its specific instructions, because a worker that sees only its fragment loses the context it needs to do the fragment well.
Passing a summary forward instead of the material quietly drops detail. A summary keeps what its writer thought mattered at the time. A later stage often needs something else, such as an exact clause number, a customer's precise wording, or a figure that seemed minor. Teams that split work across many agents report losing context at each handoff, partly because results must be summarized when passed between agents. The loss is hard to see, because the later stage still produces a confident answer. It just works from less than the original contained.
The safer handoff is extraction, not summary. For long documents, ask Claude to quote the relevant parts first and only then carry out the task. The quotes keep the original wording, and the next stage works from evidence instead of a paraphrase. A legal team comparing two long contracts shows the difference. Summarising each contract and comparing the summaries loses the clause-level wording where differences actually sit. One giant request, a table or a line-by-line diff, makes a single call do extraction and comparison together over a huge context. Extracting the key clauses from each contract first, then comparing them point by point, gives the comparison stage precise, aligned inputs it can check.
The same rule applies when a stage starts in a fresh conversation. Nothing agreed earlier carries over unless you include it. If a bid team agreed three evaluation criteria in an earlier stage, the scoring request must restate those criteria in full, along with the material to be scored. A one-line reminder that "we agreed some criteria" is not enough.
Checkpoint 8 of 9· Match them up
Before the comparison stage runs, a legal team has three ways to hand it two long contracts. Match each handoff to what it does to the comparison.
Tap a term, then the definition that fits it.
A summary keeps only what its writer thought mattered, and one giant request puts extraction and comparison into a single overloaded call. Quoting the relevant clauses first gives the next stage evidence in the original wording, not a paraphrase.
“For long document tasks, ask Claude to quote relevant parts of the documents first before carrying out its task.”Source: platform.claude.com
Checkpoint 9 of 9· Exam question
A legal team needs to compare two lengthy contracts to highlight differences. What is the safest decomposition approach with Claude?
Correct answer: B — Extract the key clauses from each contract first, then compare them point by point.
- A. Incorrect. Asking Claude to output a comparison table with both contracts in a single request risks exceeding the context window limit, leading to truncated input or incomplete comparisons. This approach also makes it harder to manage nuanced differences safely.
- B. Correct. Extracting key clauses first reduces complexity, focuses on relevant parts, and minimizes context overflow. This step-by-step decomposition improves accuracy by breaking the task into manageable, point-by-point comparisons.
- C. Incorrect. Summarizing each contract separately may omit important legal details and precise wording differences necessary for accurate comparison. Comparing only summaries is less reliable than directly comparing extracted clauses.
- D. Incorrect. Loading both lengthy contracts into a single context window to generate a detailed line-by-line diff risks exceeding the token limit, resulting in truncated input or an incomplete diff. This approach is less safe than decomposing the task for thorough comparison.
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practicesOfficial docs
“still useful when you need to inspect intermediate outputs or enforce a specific pipeline structure”
↩︎ When one prompt is doing too much“Use subagents when tasks can run in parallel, require isolated context, or involve independent workstreams that don't need to share state.”
↩︎ Independent parts or a sequential chain“The most common chaining pattern is self-correction”
↩︎ Draft, review, refine: building on checked output“Each step is a separate API call so you can log, evaluate, or branch at any point.”
↩︎ Draft, review, refine: building on checked output“ask Claude to quote relevant parts of the documents first before carrying out its task.”
↩︎ What each stage must receive“ask Claude to quote relevant parts of the documents first before carrying out its task.”
↩︎ Exam trap 4“is still useful when you need to inspect intermediate outputs or enforce a specific pipeline structure.”
↩︎ Checkpoint“self-correction: generate a draft → have Claude review it against criteria → have Claude refine based on the review.”
↩︎ Checkpoint“For long document tasks, ask Claude to quote relevant parts of the documents first before carrying out its task.”
↩︎ Checkpoint - 2.https://academy.claude.com/courses/ai-fluency-for-builders/delegation-the-builder-s-toolkitOfficial docs
“Each must be concrete enough that a stranger could tell you whether the finished product passes or fails.”
↩︎ When one prompt is doing too much“Delegation means decomposing the problem first, then deciding what AI handles at each step.”
↩︎ When one prompt is doing too much“Write acceptance tests before code. They give you and AI a shared definition of done.”
↩︎ Checkpoint - 3.https://www.anthropic.com/engineering/building-effective-agentsSecondary source
“LLMs generally perform better when each consideration is handled by a separate LLM call, allowing focused attention on each specific aspect.”
↩︎ When one prompt is doing too much“This workflow is ideal for situations where the task can be easily and cleanly decomposed into fixed subtasks.”
↩︎ When one prompt is doing too much“Sectioning: Breaking a task into independent subtasks run in parallel.”
↩︎ Independent parts or a sequential chain“on any intermediate steps to ensure that the process is still on track”
↩︎ Draft, review, refine: building on checked output“In the orchestrator-workers workflow, a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results.”
↩︎ What each stage must receive“Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one.”
↩︎ Key concept“on any intermediate steps to ensure that the process is still on track”
↩︎ Exam trap 3“The main goal is to trade off latency for higher accuracy, by making each LLM call an easier task.”
↩︎ Prediction“Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one.”
↩︎ Checkpoint - 4.https://claude.com/blog/best-practices-for-prompt-engineeringSecondary source
“A single prompt produces inconsistent results”
↩︎ When one prompt is doing too much“Review the summary above for accuracy, clarity, and completeness. Provide graded feedback.”
↩︎ Draft, review, refine: building on checked output“Chaining increases latency (multiple API calls) but often dramatically improves accuracy and reliability for complex tasks.”
↩︎ Exam trap 1 - 5.
“You have simple, single-output tasks (unnecessary complexity)”
↩︎ When one prompt is doing too much“Workers receive both the original task AND their specific instructions for better context”
↩︎ What each stage must receive - 6.
“Multi-agent systems typically consume 3 to 10 times more tokens than single-agent approaches for equivalent tasks.”
↩︎ When one prompt is doing too much“response quality can degrade as context grows”
↩︎ Independent parts or a sequential chain“The core implementation decomposes a question into independent facets, runs subagents concurrently, then synthesizes the results.”
↩︎ Independent parts or a sequential chain“only to discover that they suffered from lost context at each handoff and spent more tokens coordinating than executing”
↩︎ What each stage must receive“results must be summarized when passed between agents”
↩︎ What each stage must receive“improved prompting on a single agent achieved equivalent results”
↩︎ Exam trap 2