PromptingIndex
← All posts

Least-to-Most Prompting: How Breaking Problems Into Subproblems Unlocks Harder Reasoning

2026-07-18

Chain-of-thought prompting teaches a model to reason step by step, and that is a genuine improvement over jumping straight to an answer. But it has a structural blind spot: the model works through its reasoning in one unbroken stream, conditioning every step on the same fixed context. When a problem requires solving subproblems that are harder than any example shown in the prompt, that approach struggles. Least-to-most prompting, introduced in a 2022 Google Research paper, addresses this directly by changing the order of operations. Instead of asking the model to reason from the question to the answer in one pass, it first asks the model to identify the simpler subproblems embedded in the question, then solves each one in sequence, feeding each answer into the next step as accumulated context.

The limitation that motivated the technique

Chain-of-thought works well when a question can be answered by reasoning through the same kind of steps demonstrated in the few-shot examples. It struggles when a question is compositionally harder: when the answer depends on combining several concepts, or when the target problem has more components than any example in the prompt. The 2022 Google Research paper calls this the challenge of easy-to-hard generalization. A model shown examples with two or three reasoning steps tends to fail on problems requiring five or six, even when the individual reasoning moves are identical. Standard chain-of-thought has no mechanism to decompose the hard problem into smaller pieces it can handle one at a time, so it tries to process the full complexity in a single stream and fails once that complexity exceeds what the examples demonstrate.

How least-to-most prompting works

The technique runs in two stages. In the decomposition stage, the model receives a prompt with few-shot examples showing how to break similar problems into an ordered list of subproblems. Given a new hard question, it outputs the subproblems it needs to solve, in the order that makes each one depend only on what comes before. This decomposition is not hardcoded. The model infers it from the structure of the question, guided by the pattern in the examples.

In the subproblem-solving stage, the model processes each subproblem in sequence. Each call includes three things: the few-shot examples demonstrating how to solve individual subproblems, the previously solved subproblems and their answers accumulated as context, and the next subproblem to resolve. When the final subproblem is the original question itself, the model now has all the intermediate results it computed, and can answer the hard question grounded in those concrete steps rather than in an unbroken stream of reasoning that must handle all complexity at once.

What the benchmark results showed

The paper 'Least-to-Most Prompting Enables Complex Reasoning in Large Language Models' was submitted to arXiv on May 21, 2022 (arXiv:2205.10625) by Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc Le, and Ed Chi at Google Research, and was published at ICLR 2023. The experiments covered three categories: symbolic manipulation, compositional generalization, and math reasoning.

  • SCAN (a compositional generalization benchmark measuring whether a model can translate natural language instructions into action sequences, with a length split where test commands are longer than any training example): GPT-3 code-davinci-002 with chain-of-thought prompting achieved 16% accuracy. Least-to-most prompting achieved at least 99% accuracy in every data split, using only 14 exemplars. Neural-symbolic models specifically designed for SCAN and trained on more than 15,000 labeled training examples did not exceed this result.
  • Last-letter concatenation (concatenating the final letter of each word in a list): chain-of-thought and least-to-most perform similarly on short lists, but the accuracy gap grows as the list length increases. Chain-of-thought performance plateaus because its single reasoning stream does not scale cleanly to larger inputs; least-to-most accumulates one letter at a time across subproblems and maintains accuracy at greater lengths.
  • Mathematical reasoning (grade school math word problems from GSM8K): least-to-most prompting outperformed chain-of-thought, with the gap widening on problems that require more reasoning steps.

Why 14 examples outperformed 15,000 training examples

The SCAN result stands out because it is not just about accuracy against a baseline prompt. Models designed specifically for SCAN and trained on the entire labeled training set are the established benchmarks for the task. Least-to-most prompting, using a general-purpose language model with 14 in-context examples, matched or exceeded them. The reason is that decomposition allows the model to handle problems of arbitrary compositional complexity by reducing them to subproblems it has already seen demonstrated. A command like 'jump around left thrice and walk opposite right twice' can be broken into 'jump around left thrice' and then 'walk opposite right twice,' each of which is simpler and closer to the examples. Standard chain-of-thought has no mechanism to make that decomposition explicit, so it tries to translate the full command at once and fails when the length and nesting exceed the examples shown in the prompt.

When to use it and how to apply it today

Least-to-most prompting earns its overhead on tasks that are compositionally structured: problems where the answer depends on solving two or more distinct subproblems in sequence, where easier variants of the question exist, and where the harder cases are harder primarily because they have more components rather than because they require a fundamentally different kind of reasoning. Good fits include multi-hop questions that require finding an intermediate fact before answering the main question, code generation tasks where the output depends on several separate logical pieces, planning problems with ordered dependencies, and transformation tasks where a complex input can be decomposed into parts.

  • Write a decomposition prompt first. Show the model one or two examples of similar problems being broken into subproblems. The prompt should demonstrate the decomposition itself, not just the final answer, so the model learns what the decomposition structure looks like for your task.
  • Keep the intermediate context cumulative. Each subproblem-solving call should include all previously solved subproblems and their answers, not just the most recent one. The mechanism works because early answers inform later steps.
  • Let the model do the decomposition. If you manually specify the subproblems, you lose the key benefit: the model's ability to generalize the decomposition pattern to new problem structures it has not seen before.
  • Combine with chain-of-thought inside each subproblem if needed. The two techniques are complementary. Each individual subproblem-solving step can use chain-of-thought reasoning, adding a second layer of structure within the subproblem itself.
  • For straightforward problems, stick with chain-of-thought. Least-to-most adds at minimum one extra API call and often several. The cost is justified when a problem is compositionally complex enough that a single reasoning pass fails, not for problems where the standard approach already works.

PromptingIndex covers prompting techniques tested across Claude, ChatGPT, and Gemini, including least-to-most patterns for multi-hop reasoning, structured transformation, and mathematical problem-solving tasks.

Put these ideas to work.

Browse the prompt library