Chain-of-Thought › Least-to-Most Prompting
Language AI HandbookAll chapters Chain-of-Thought › Least-to-Most PromptingOne section · Sections in this chapter8 / 16 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
One limitation of standard CoT is that it generates a single linear chain that handles the full problem in one pass. For questions involving explicit problem decomposition, a more structured approach can help. Least-to-most prompting (Zhou et al., 2022) breaks the task into two stages: first decompose the problem into subproblems, then solve them sequentially, using previous solutions as context for subsequent ones.
The first stage uses a decomposition prompt to identify the constituent subproblems:
Q: How long does it take to travel 150 miles if you drive at 60 mph
for the first half and 50 mph for the second half?
To solve this problem, we first need to know:
The model completes this with subquestions like "What distance is covered at each speed?" and "How long does each segment take?" The second stage then solves each subquestion in order, with the answer to each available as context when addressing the next.
This structured decomposition is especially useful for problems where the subproblems have a clear dependency structure. Least-to-most prompting generalizes better to longer and more complex versions of problems than single-chain CoT. Where standard CoT might succeed on a two-step problem and fail on a five-step version, least-to-most can handle the five-step version by explicitly tracking the dependency structure. The model never has to hold five simultaneous threads in a single inference step: it proceeds one thread at a time, with the result of each step written into the context before the next is attempted.
Zhou et al. (2022) showed strong generalization results on the SCAN compositional generalization benchmark. Models using least-to-most prompting generalized to instructions with significantly more steps than those seen in training examples, while standard CoT failed to generalize. The key difference is that least-to-most makes the compositional structure explicit, allowing the model to use individual subproblem solutions rather than trying to handle the entire compositional challenge at once.