The Idea
Not every part of a problem needs AI. Some parts need a calculator. Some need a search engine. Some need a different kind of AI altogether. Decomposed Prompting (DecomP) breaks complex tasks into sub-tasks and routes each one to the best-suited tool or specialist.
Think of it as a manager who knows their team's strengths. Instead of giving every task to one generalist, they assign the math to the accountant, the writing to the editor, and the research to the analyst.
Building Blocks
This composition extends:
Break Down the Question Give It a RoleIt uses question decomposition to identify sub-tasks, then assigns each one to a specialized handler — like giving each sub-task to a role-specific expert.
The Specialists
AI Reasoning Handler
For sub-tasks that need understanding, judgment, or creative thinking. Send "Who directed Jaws?" to AI.
Code Computation Handler
For math, string operations, or anything with an exact answer. Send "What's 847 × 293?" to a calculator.
Search Retrieval Handler
For current facts or specific data. Send "What award did Spielberg win in 1994?" to a search engine.
AI Specialized Model
A smaller or different AI for simpler sub-tasks. No need for the most expensive model on every piece.
See It in Action
Question: "What award did the director of Jaws win for Schindler's List?"
Sub-task 2: Search What award did [result of sub-task 1] win for Schindler's List?
The first sub-task went to AI (it knows common knowledge), while the second went to search (for a specific factual lookup). Each handler did what it does best.
Why This Works
AI is great at reasoning but makes arithmetic mistakes. Calculators are perfect at math but can't understand context. Search engines have the latest facts but can't reason. DecomP lets each tool do what it's best at.
The result is greater than the sum of its parts. On tasks that mix text understanding with exact computation, DecomP achieves near-perfect accuracy where pure AI approaches degrade — because the deterministic handlers (calculators, code) never make the random errors that AI does.
The Composition
Break a complex task into sub-tasks. Route each sub-task to the specialist best suited for it — AI for reasoning, code for computation, search for facts. Combine the results.
When to Use This
- • Tasks that mix different skills — reasoning plus math, or understanding plus factual lookup
- • When AI keeps making errors on the "easy" parts (like arithmetic) while nailing the "hard" parts
- • When you have access to specialized tools (calculators, search, databases)
- • When you want to use cheaper AI for simple sub-tasks and save the powerful model for complex ones
- • Building reusable "handler libraries" that can be mixed and matched across tasks
When to Skip This
- • Homogeneous tasks — if every sub-task needs the same kind of thinking, there's nothing to specialize
- • Simple problems — the overhead of decomposing and dispatching isn't worth it for straightforward questions
- • Tightly interconnected reasoning — if every step depends on the full context of every other step, it's hard to split into independent sub-tasks
How It Relates
DecomP is the next step beyond Least-to-Most. Where Least-to-Most sends every sub-problem to the same AI, DecomP recognizes that different sub-problems need different solvers. It's like upgrading from one employee doing everything to a team of specialists.
It's also related to Self-Ask (which is specialized for search-based sub-questions) and sets the stage for more complex multi-agent systems where different AI models collaborate on different aspects of a task.