Prompt Patterns

Stepwise Decomposition

Breaks down a problem into ordered intermediate steps that can be solved before the final answer, to expose reasoning and prevent premature conclusions.

Also known asChain-of-Thought PromptingStep-by-Step ReasoningSequential Reasoning
Stepwise Decomposition pattern diagram

Problem

One-shot answers hide intermediate reasoning, making errors hard to detect and encouraging premature conclusions.

Solution

Require ordered intermediate steps before final commitment. Externalized steps function as visible working memory and local checkpoints, improving inspectability and robustness.

Example

One worked example. The book has 2–4 per technique.

Prompt
We have 500 active subscriptions. 300 are on annual plans at $948/year and 200 are on monthly plans at $99/month. What is our monthly recurring revenue? Solve step by step.
Response
Step 1: Monthly plan revenue. 200 subscribers × $99/month = $19,800/month.
Step 2: Annual plan revenue, normalized to monthly. $948/year ÷ 12 = $79/month per subscriber. 300 × $79 = $23,700/month.
Step 3: Total MRR. $19,800 + $23,700 = $43,500/month.

Final answer: Monthly recurring revenue is $43,500.

Techniques

Concrete ways to implement Stepwise Decomposition. Each technique fits a different situation.

  • 01

    Step-by-Step Instruction

    Tell the model to work through ordered steps before giving a final answer, making reasoning visible with minimal prompt overhead.

  • 02

    Demonstrated Reasoning

    Provide worked examples that show how the task should be decomposed, then present the new problem for the model to solve in the same style.

  • 03

    Incremental Stepping

    Request one step at a time across multiple turns so the user or system can inspect and redirect between steps.

Prompt Patterns book cover

Full treatment in the book

Stepwise Decomposition — the complete chapter

  • Mechanism — why this pattern works
  • 2–4 worked examples per technique
  • Placement, sequencing, and debugging rules
  • Composition with related patterns