Query decomposition breaks a complex problem into smaller subtasks and handles them sequentially. It gives a language model an ordered path through tasks that might otherwise be difficult to organize. section 7.4
Financial-report summary
A prompt can ask the model to first extract key financial metrics, then summarize trends, and finally write a layperson-friendly summary. A math task can similarly begin by listing known variables before calculating each part. section 7.4
Table 7.3 Common advanced prompting techniques
| Technique |
Description |
Example prompt |
|---|---|---|
| Chain-of-thought |
Generate step-by-step reasoning before answering |
“Let’s think step by step. John has 3 apples . . .” |
| Tree-of-thought |
Explore multiple reasoning paths in parallel |
“List three strategies, evaluate each, then choose the best.” |
| Self-consistency |
Generate multiple reasoning chains and aggregate |
“Generate five solutions, then select the most common answer.” |
| Reflexion |
Critique and revise output iteratively |
“Review your answer for errors and revise if needed.” |
| Verification |
Add a final self-check before finalizing the response |
“Double-check your answer for accuracy before submitting.” |
| Decomposition |
Break the problem into subtasks executed sequentially |
“Step 1: Extract metrics. Step 2: Summarize trends. Step 3: Write summary.” |
| Least-to-most |
Solve easier subproblems first, then build up |
“First, list known variables. Then calculate step by step.” |
| Pyramid priming |
Build knowledge gradually in layers |
“Step 1: Define carbon neutrality. Step 2: List targets. Step 3: Analyze impact.” |
| Generated knowledge |
Surface key facts before answering |
“List key concepts related to quantum entanglement before answering.” |
| Role-based prompting |
Assign a role or persona to guide behavior |
“You are an experienced employment lawyer advising a client.” |
| Prompt chaining |
Connect multiple prompts into a pipeline |
“Extract relevant quotes → Summarize → Generate final answer.” |
| Conversational context |
Summarize prior dialogue to preserve coherence |
“Summarize the student’s understanding before proceeding.” |
Compare decomposition with other prompting strategies, including least-to-most prompting, which begins with easier subproblems before addressing the full task. section 7.4
