---
title: Task Decomposition — Prompt Engineering Technique
description: Task decomposition breaks a hard problem into smaller sub-problems the model solves in order, then combines. Structuring the work — as in least-to-most prompting — improves accuracy on problems too complex to solve in one pass.
canonical: https://prompeteer.ai/techniques/task-decomposition
category: Reasoning & decomposition
---

# Task Decomposition

Task decomposition breaks a hard problem into smaller sub-problems the model solves in order, then combines. Structuring the work — as in least-to-most prompting — improves accuracy on problems too complex to solve in one pass.

## What it is

Task decomposition is the strategy of reducing a complex problem into a set of simpler, ordered sub-problems. Zhou et al.'s least-to-most prompting is a canonical form: first prompt the model to break the problem into subproblems, then solve them sequentially, feeding earlier answers into later ones.

Decomposition helps because each sub-problem is within easy reach of the model even when the whole is not, and it lets solutions to simpler cases scaffold harder ones. It underpins both single-prompt reasoning (list the steps, then execute) and multi-call prompt chaining.

## When to use

- The problem is too complex or compositional to solve reliably in one shot.
- The task naturally splits into ordered subproblems that build on each other.
- Generalization to harder cases than any example matters.
- You want a structure you can later turn into a prompt chain or agent plan.

## How it works

1. Ask the model to enumerate the subproblems needed to solve the task.
2. Order the subproblems so each depends only on earlier ones.
3. Solve them in sequence, feeding earlier answers forward as context.
4. Compose the sub-answers into the final solution.

## Illustrative structure

The structure is two phases: "First, break this problem into ordered sub-questions." then "Now answer each sub-question in order, using earlier answers." The decomposition step produces the plan; the solve step executes it, simplest first.

## Pitfalls

- A flawed decomposition sends the whole solution off track.
- Over-decomposing simple tasks adds needless steps and tokens.
- Dependencies between subproblems must be respected or later steps lack inputs.
- The model may decompose inconsistently across runs; validate the plan for critical work.

## Sources

- [Zhou et al. (2022), Least-to-Most Prompting Enables Complex Reasoning](https://arxiv.org/abs/2205.10625)
- [Anthropic — Chain complex prompts](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/chain-prompts)

## Related techniques

- [chain-of-thought](https://prompeteer.ai/techniques/chain-of-thought)
- [prompt-chaining](https://prompeteer.ai/techniques/prompt-chaining)
- [self-consistency](https://prompeteer.ai/techniques/self-consistency)
