Skip to content
Search
TechniquesGlossary

Least-to-Most Prompting

It was introduced in Least-to-Most Prompting Enables Complex Reasoning in Large Language Models (Zhou et al., 2022) to fix a weakness of chain-of-thought prompting, which did poorly on problems harder than the examples shown in the prompt. On the SCAN compositional generalization benchmark, the authors report at least 99% accuracy with least-to-most prompting using 14 examples, compared with 16% for chain-of-thought.

It's a close relative of prompt decomposition. The difference is the dependency: each step receives the answers to the steps before it. Use it when later parts of a problem really do build on earlier ones; when the steps are independent, run them separately or in parallel instead. Step-back prompting moves the other way, asking for the general principle before the specific question.

Example

Problem: A customer bought 3 licenses in March at $40 each, upgraded 2 of them in June for an extra $15 per month each, and cancelled one basic license in September. What did they pay from March through December?

Stage 1: List the smaller questions you need to answer first, in order. Don't answer them yet.
Stage 2: Answer each smaller question in order, using the earlier answers.
Stage 3: Give the final total and show which earlier answers it uses.

When to use it

  • Problems whose later steps depend on earlier results
  • Tasks harder than any example you can include in the prompt
  • Smaller models that struggle with long reasoning in one pass

When not to use it

  • Steps that are independent of each other
  • Reasoning models that already plan internally, where it can add little
  • Simple tasks with one step