Skip to contentNew: Does ChatGPT recommend your brand? Free 60-second AI visibility check →
By The DDH Team · Digital Dashboard Hub

How to Use Least-to-Most Prompting

Least-to-most prompting splits a hard problem into a chain of simpler subproblems, then solves them one at a time — feeding each answer forward as context for the next. It generalizes better than plain chain-of-thought on problems that are harder than the examples you can show.

By The DDH Team at Digital Dashboard HubUpdated

To use least-to-most prompting, first ask the model to decompose the problem into a sequence of smaller subproblems ordered from easiest to hardest, then solve each subproblem in turn, passing each answer into the prompt for the next one. The final subproblem's answer is your answer. The split between decomposing and solving is what makes hard, compositional problems tractable.

The technique was introduced by Zhou et al., 2022, "Least-to-Most Prompting Enables Complex Reasoning in Large Language Models" (arXiv:2205.10625), which showed it can solve problems harder than any of the few-shot examples provided. It extends chain-of-thought prompting. Every tool on Digital Dashboard Hub is free forever, no signup — start a decomposition prompt with the ChatGPT Prompt Generator.

Digital Dashboard Hub

Writing good prompts for ONE AI is hard. Writing them for GPT-5, Claude, Gemini, Perplexity, Midjourney and 6 more is a full-time job. DDH's AI Prompt Builder writes once, runs everywhere — locked to your niche, voice, and brand tone.

Free 14 days, no card.

Chain-of-thought vs. least-to-most

Feature
Dimension
Chain-of-thought
Least-to-most
StructureOne-pass reasoningDecompose, then solve subproblems in order
Decomposition is a separate stage?
Carries partial answers forward?Within one generationAcross explicit ordered steps
Solves harder-than-example problems?Often strugglesDesigned for it
Overhead (steps / context)LowHigher (multi-stage)
OriginWei et al. 2022Zhou et al. 2022

Sources: [Zhou et al. 2022, arXiv:2205.10625](https://arxiv.org/abs/2205.10625); [Wei et al. 2022, arXiv:2201.11903](https://arxiv.org/abs/2201.11903); [DAIR.ai Prompt Engineering Guide](https://www.promptingguide.ai/). Verified June 2026.

What is least-to-most prompting?

Least-to-most prompting is a two-stage strategy. In stage one (decomposition), you prompt the model to break the original question into an ordered list of subproblems, starting with the simplest. In stage two (sequential solving), you solve each subproblem one at a time, and critically, each solved subproblem's answer is appended to the context so the next subproblem can build on it.

The name captures the ordering: you go from the 'least' (easiest, most foundational) subproblem to the 'most' (the full original problem) by accumulating partial results. By the time the model reaches the hard final step, the groundwork is already solved and in context, so the remaining leap is small.

The key result from Zhou et al. 2022 is generalization: because the model composes a solution from simpler solved pieces, it can handle problems more complex than the worked examples in the prompt — the regime where standard few-shot chain-of-thought tends to break down.


How is it different from chain-of-thought?

Chain-of-thought produces the reasoning and the answer in **one pass** — the model thinks aloud and lands on a result in a single generation. Least-to-most is **explicitly two-stage and sequential**: first decompose, then solve the subproblems in order across multiple steps, carrying answers forward. The decomposition is a first-class, separate output.

That structural difference is why least-to-most generalizes to harder-than-example problems where one-pass CoT stumbles. Each subproblem is small enough that the model is reliable on it, and chaining reliable small steps beats attempting one big, error-prone leap. Per Zhou et al. 2022, this matters most on compositional tasks — symbolic manipulation, multi-stage math, and last-letter-style problems where length itself is the difficulty.

The cost is structure and steps: you run more turns and carry more context. On easy problems that one CoT pass already nails, that overhead is wasted — least-to-most is for the hard, compositional tail.

Use least-to-most when: the problem is compositional and harder than the examples you can show — multi-stage math, symbolic reasoning, tasks that get harder with length — and a single chain-of-thought pass keeps failing on the later steps. Decompose first, then solve subproblems in order.
Skip least-to-most when: a single chain-of-thought pass already solves it, the problem doesn't decompose into ordered subproblems, or the task is open-ended with no clear chain of dependencies. The extra stages and context are wasted overhead on easy problems.


Before / after: a least-to-most setup

Take a compositional word problem. The 'before' is a single chain-of-thought pass:

``` Amy has 3 boxes. Each box has 4 bags. Each bag has 6 marbles, but every third bag is empty. She gives away half her marbles, then buys 2 more full bags. How many marbles does she have? Reason step by step, then answer. ```

On a fast model this stacks too many dependent operations into one pass and often slips on the 'every third bag' or the 'half' step. The least-to-most 'after' splits it. Stage one — decompose:

``` Break this problem into an ordered list of the smallest subproblems needed to solve it, from simplest to the full question. Do NOT solve them yet — just list them in order. [paste the problem] ```

The model returns something like: (1) total bags, (2) how many bags are empty, (3) marbles before giving any away, (4) marbles after giving half away, (5) marbles in 2 more full bags, (6) final total. Stage two — solve each in order, carrying answers forward:

``` Solve these subproblems one at a time, in order. After each, restate the running result so the next step can use it. Subproblems: 1. How many bags total? ... 2. How many bags are empty? ... 3. Marbles before giving any away? (use 1 and 2) 4. Marbles after giving half away? (use 3) 5. Marbles in 2 more full bags? ... 6. Final total? (use 4 and 5) End with: ANSWER: <number>. ```

Each step is now trivial on its own, and step 6 only has to add two already-computed numbers. The decomposition is what removed the difficulty.

---

In production you'd run stage one to get the subproblem list, then loop stage two as separate calls (or a single guided call), appending each result to the context. For code tasks, the same pattern — decompose, then implement piece by piece — works well with the Code Prompt Builder.


Least-to-most on modern reasoning models (2026)

Frontier reasoning models — GPT-5.5 in thinking mode, Claude Opus 4.8 and Sonnet 4.6 with extended thinking — already decompose problems internally during their hidden reasoning, so an explicit least-to-most scaffold often duplicates work they'd do anyway. On these models, lead with a clear problem statement and only add explicit decomposition when the output still skips or fumbles a stage.

Where the explicit version still pays off in 2026: on faster, cheaper non-reasoning tiers (the lower-cost models in cost per token, all major models); when you need the decomposition **visible** for auditing or for a human to check each step; and when subproblems map to real tool calls or database lookups, which pushes you toward an agentic tool-use pattern. For model selection, see how to choose an AI model.


How least-to-most relates to other techniques

Least-to-most is part of the chain-of-thought family but emphasizes explicit, ordered decomposition over single-pass reasoning. It overlaps with Tree of Thoughts (arXiv:2305.10601), which also breaks problems into steps but explores and prunes a branching search rather than following one linear chain of dependent subproblems.

It composes well with other patterns: add self-consistency on the hardest subproblem to vote out errors, or wrap the whole thing in a role so an expert persona drives the decomposition. For the broader map of variants, see the chain-of-thought variants comparison and the DAIR.ai Prompt Engineering Guide.

How to use least-to-most prompting, step by step

  1. 1

    Check the problem is compositional

    Least-to-most pays off when the answer is built from dependent sub-steps — multi-stage math, symbolic reasoning, tasks that get harder with length. If a single chain-of-thought pass already solves it, you don't need this. The technique is from Zhou et al. 2022 (arXiv:2205.10625).

  2. 2

    Ask the model to decompose — and not solve yet

    Stage one: prompt it to list the smallest subproblems in order from easiest to the full question, explicitly saying 'do not solve them yet.' A clean, ordered list is the foundation everything else builds on.

  3. 3

    Order subproblems from least to most

    Make sure the list runs from the most foundational subproblem to the original problem, with each step depending only on earlier ones. Fix the ordering before solving — a bad order propagates errors downstream.

  4. 4

    Solve subproblems one at a time

    Stage two: solve each subproblem in sequence. Keep each step small enough that the model is reliable on it — that reliability per step is the whole point of decomposing.

  5. 5

    Feed each answer into the next step

    Append each solved subproblem's result to the context (or restate the running result) so the next subproblem can use it. The accumulation of partial answers is what lets the model reach problems harder than the examples.

  6. 6

    Pin the final answer

    End with a fixed format like 'ANSWER: <value>' so the final result — the answer to the original problem — is easy to extract from the last step. Scaffold the prompt with the ChatGPT Prompt Generator.

  7. 7

    Layer on self-consistency for the hard step

    If one subproblem is still error-prone, sample it several times and majority-vote with self-consistency. You get reliability exactly where the decomposition is weakest, without paying the cost on every step.

Frequently Asked Questions

How do I use least-to-most prompting?

First ask the model to break the problem into an ordered list of subproblems from easiest to the full question (without solving them), then solve each subproblem in turn, feeding each answer into the next step's context. The last subproblem's answer is your answer. The method is from Zhou et al. 2022 (arXiv:2205.10625).

What is least-to-most prompting?

It's a two-stage technique: decompose a hard problem into simpler ordered subproblems, then solve them sequentially, carrying each partial answer forward. Because it composes a solution from easy solved pieces, it can handle problems harder than the few-shot examples in the prompt.

What's the difference between least-to-most and chain-of-thought?

Chain-of-thought reasons to an answer in a single pass. Least-to-most is explicitly two-stage and sequential — it decomposes first, then solves subproblems in order across multiple steps, passing answers forward. That structure is why it generalizes to harder-than-example problems where one-pass chain-of-thought stumbles.

When should I use least-to-most prompting?

Use it on compositional problems that are harder than the examples you can show — multi-stage math, symbolic reasoning, tasks that get harder with length — especially when a single chain-of-thought pass keeps failing on later steps. Skip it when one pass already works or the problem doesn't decompose into ordered subproblems.

Do I still need least-to-most on modern reasoning models?

Often not for the reasoning itself — frontier models like GPT-5.5 in thinking mode and Claude Opus 4.8 / Sonnet 4.6 with extended thinking decompose internally. Explicit least-to-most still helps on faster non-reasoning tiers, when you need the decomposition visible for auditing, or when subproblems map to real tool calls. See how to choose an AI model.

What's the difference between least-to-most and Tree of Thoughts?

Both break problems into steps, but least-to-most follows one linear chain of dependent subproblems solved in order, while Tree of Thoughts (arXiv:2305.10601) explores a branching search of multiple reasoning paths and prunes weak branches. Least-to-most is simpler and linear; ToT is a heavier deliberate search.

Can I combine least-to-most with self-consistency?

Yes. Decompose with least-to-most, then apply self-consistency to the single hardest subproblem — sample it several times and majority-vote. You buy reliability exactly where the decomposition is weakest without paying the cost on every step.

What's a good least-to-most prompt template?

Stage one: 'Break this into the smallest ordered subproblems, easiest first. Do not solve them yet.' Stage two: 'Solve each in order; after each, restate the running result so the next step can use it. End with ANSWER: <value>.' Scaffold both with the ChatGPT Prompt Generator.

Decompose hard problems the easy way.

The ChatGPT Prompt Generator scaffolds a clean decompose-then-solve prompt for you. Free forever, no signup. Part of 40+ free prompt tools.

Browse all prompt tools →