What is task decomposition?
Task decomposition is splitting a complex task into smaller subtasks that can each be solved and checked separately, then setting the dependencies between them and their order; language models and agents handle work they cannot solve in one pass this way.
It is the step within agent planning that breaks work into parts, while planning covers the whole strategy, tool choice and ordering. The plan-and-execute pattern is an architecture that first produces the full decomposed plan and then runs it step by step.
- Topic
- Agents and protocols
- Also known as
- Subtask decomposition, problem decomposition
How task decomposition works
- The main goal is set and split into logical subtasks, each with defined input and expected output.
- Dependencies between subtasks are identified; independent ones can run in parallel.
- Each subtask is solved with a suitable tool, a separate prompt or a separate sub-agent and its result checked.
- Results are combined and checked against the main goal; the plan is updated if needed.
In more detail
Static versus adaptive decomposition
Task decomposition can be static, generating a full plan upfront as in Least-to-Most or Plan-and-Execute. Dynamic, interleaved decomposition creates or revises the next subtask after observing tool outputs, as in ReAct or ADaPT. Static plans reduce planning overhead on predictable workflows, whereas dynamic replanning is essential when intermediate results can fail or reveal unexpected conditions.
Dependency graphs (DAG), error accumulation and passing context
Subtasks and their dependencies form a directed acyclic graph (DAG) rather than a simple linear list. Because errors compound across sequential nodes, each subtask requires explicit verification criteria or schema validation and context passed between nodes must be scoped carefully to avoid context bloat or loss of critical constraints.
Over-decomposition, recursion limits and stopping rules
In multi-agent orchestrator-worker systems, recursive decomposition can spiral into excessive model calls or circular subtasks if stopping rules are missing. Production orchestrators enforce maximum recursion depth, per-task token and latency budgets and fallback paths when a sub-agent repeatedly fails.
Commonly confused terms
| Term | How it differs |
|---|---|
| Chain of thought | Chain-of-thought prompting elicits intermediate reasoning steps inside a single model generation, whereas task decomposition explicitly splits a goal into distinct subtasks that can be executed via separate prompts, tools or sub-agents with defined dependencies. |
| Query decomposition | Query decomposition rewrites a complex user question into simpler sub-queries solely for information retrieval, whereas task decomposition spans execution steps, tool actions, state transitions and synthesis across an entire workflow. |
Why task decomposition matters for on-premises AI
Task decomposition lowers error rates in long multi-step work because each part is smaller and easier to check; errors are fixed by seeing which step produced them. Running independent subtasks in parallel can shorten time. Splitting too finely, though, raises model calls, cost and latency; information can also be lost between subtasks. In in-house agents, logging intermediate results makes the process auditable.
A manufacturer splits supply risk analysis into subtasks: extracting the supplier list, scanning internal records per supplier, scoring risk and writing the report; scanning runs in parallel with each step's output logged.
Common questions
How does task decomposition differ from agent planning?
Task decomposition splits work into subtasks. Agent planning also covers tool choice, ordering and updating the plan.
Is splitting a task into many parts always good?
No. Splitting too finely raises calls, cost and latency and can lose information between parts.
Related terms
Sources
- Zhou et al., Least-to-Most Prompting Enables Complex Reasoning in Large Language Models, 2022
- Khot et al., Decomposed Prompting: A Modular Approach for Solving Complex Tasks, 2022
In the glossary: Glossary, R to Z