Task Decomposition Strategies
Fixed pipeline vs dynamic decomposition and per-unit/cross-unit review are in task decomposition. This note adds selection criteria.
Strategy by task shape (design guidance, from Anthropic's published agent patterns)
| Task shape | Strategy |
|---|---|
| Known stages in a fixed order | Prompt chain with optional validation gates between steps |
| Inputs fall into categories needing different handling | Routing: classify, then dispatch to a specialised prompt or model |
| Independent pieces | Parallelisation: sectioning (different parts) or voting (same task several times) |
| Pieces not known up front | Orchestrator-workers: the model decides the split at runtime |
| Quality improves by critique | Evaluator-optimizer: generate, critique, revise |
Anthropic's current guidance notes that with adaptive thinking and native subagent orchestration, Claude handles much multi-step reasoning internally; explicit chaining is still useful when you must inspect intermediate outputs or enforce a pipeline (verified).
Choosing granularity
- Too coarse: context overload, shallow handling of each part.
- Too fine: coordination cost, lost cross-cutting issues, more spend.
- Prefer units that are independent, verifiable and similar in size.
Dependencies and merging
- Draw the dependency graph: parallelise independent branches, serialise dependent ones.
- Define the merge contract up front: schema of each unit's result, de-duplication rule, conflict rule.
- Add a cross-unit pass for interactions no single unit can see.
- Contain failures: a failed unit should produce a structured error, not abort unrelated units (5.3).
Verification points
Put checks where errors are cheap to catch: schema validation after each extraction, tests after each code change, a human gate before irreversible steps.
Exam traps
- One mega-prompt for a task with clear stages.
- Dynamic decomposition for a fixed process.
- Parallelising dependent steps.
- No merge contract, so results conflict.
- Per-unit passes only, missing cross-unit issues.
References
- Prompting best practices — checked Oct 16, 2026
Check your understanding
Customer messages need different handling by category. Pattern?Show answerHide answer
Answer
Routing.Why still chain explicitly with strong models?Show answerHide answer
Answer
To inspect intermediate outputs or enforce a fixed pipeline.What should be agreed before running parallel units?Show answerHide answer
Answer
The merge contract: result schema, de-duplication and conflict rules.