Task decomposition means breaking one large, ambiguous request into a sequence of smaller, more directly answerable prompts — a manual, developer-designed version of the planning agents perform automatically (see Task Decomposition in Agentic AI for the autonomous version).
Example — One Big Ask vs Decomposed
Single, large prompt:
"Write a complete blog post about the benefits of remote work,
including an intro, 3 main points with examples, and a conclusion,
optimized for SEO with a meta description."
→ a lot for one generation to reliably nail all at once
Decomposed into a sequence:
1. "List 5 potential main points about remote work benefits, with
one sentence each."
2. (pick/refine 3) "Write a 150-word section expanding on: [point]"
(repeated for each of 3 points)
3. "Write an intro and conclusion tying together these 3 sections: [sections]"
4. "Write an SEO meta description (under 160 characters) summarizing
this post: [full post]"
Each step is narrower and easier to get right individually — and easier to inspect, regenerate, or adjust one piece without redoing the whole thing.
When Decomposition Is Worth the Added Complexity
| Signal | Decompose? |
|---|---|
| Task has multiple genuinely distinct sub-parts (research, then draft, then format) | Yes — likely improves quality and control |
| A single prompt already produces consistently good results | No — added complexity with no real benefit |
| You need to inspect or adjust intermediate results | Yes — decomposition gives you visibility a single call doesn't |
This Is Also the Foundation of Prompt Chaining
Once you decompose a task into steps, connecting those steps programmatically (output of step 1 feeds into step 2, etc.) is exactly prompt chaining — decomposition is the design thinking; chaining is the implementation.
Practical Use Case
Content generation pipelines, complex data-extraction tasks, and multi-part analysis requests all commonly benefit from decomposition — trading more LLM calls (more cost/latency) for more reliable, inspectable, individually-correctable results.
Common Mistakes
- Decomposing a task that was already working fine as a single prompt — adds cost, latency, and complexity for no real gain
- Decomposing into steps so fine-grained that coordination overhead outweighs any quality benefit
Interview Relevance
"When would you break a task into multiple prompts instead of one large prompt?" — the signals in the table above (distinct sub-parts, need for intermediate inspection) are the expected reasoning.
Practice Question
Decompose the task "generate a complete product listing (title, description, bullet features, SEO tags) from a product spec sheet" into a sequence of smaller prompts.