P

Least To Most Prompting: Definition and Examples

Prompt engineering technique that consists of breaking down a complex problem into progressively more difficult sub-problems, solving each one in order to build the final answer.

Full definition

Least To Most Prompting is an advanced prompt engineering strategy developed by researchers at Google Brain in 2022. It relies on a simple but powerful principle: when faced with a complex problem, start by identifying the simplest sub-problems, then gradually progress to the more difficult ones, using previous answers as context to solve each subsequent step.

This technique unfolds in two distinct phases. The first phase, called decomposition, consists of asking the model to identify the sub-problems needed to solve the main question. The second phase, called sequential resolution, consists of solving each sub-problem in increasing order of difficulty, injecting the solutions of previous sub-problems into the prompt at each step.

The major advantage of Least To Most Prompting over classic Chain of Thought is its ability to generalize to harder problems than those seen in examples. Where Chain of Thought may fail when faced with a significantly more complex problem than the provided demonstrations, Least To Most Prompting adapts by building its answer brick by brick, each intermediate solution serving as a springboard for the next.

This approach is directly inspired by pedagogical methods used in teaching, where one guides a student by starting with fundamental concepts before tackling advanced notions. It is particularly effective for mathematical reasoning tasks, multi-step problem solving, and questions requiring compositional understanding of language.

Etymology

The term "Least To Most" refers to the order of solving sub-problems: one starts with the least complex and gradually moves to the most complex. This name was introduced in the research paper "Least-to-Most Prompting Enables Complex Reasoning in Large Language Models" published by Zhou et al. at Google Brain in 2022.

Concrete examples

Solving a multi-step math problem

Problem: Marie has 3 baskets. Each basket contains 4 apples and 2 oranges. She gives half of all her fruits to Jean. How many fruits does she have left?

Break down this problem into simple sub-questions, then solve each in order:

  1. How many fruits are in one basket?
  2. How many fruits does Marie have in total?
  3. How many fruits are left after giving half away?

Understanding a complex legal text

To understand this legal article, let's first answer the simplest questions:

  1. What are the technical terms used and their definitions?
  2. What are the conditions of application mentioned?
  3. What exceptions are provided?
  4. In summary, what does this article concretely mean for an individual?

Planning a technical project with dependencies

I need to deploy a web application to production. Break down this task from simplest to most complex and solve each step by building on the previous ones: first prerequisites (server, domain), then configuration (database, environment variables), and finally deployment and testing.

Practical usage

To apply Least To Most Prompting, start by asking the model to list the necessary sub-problems, from simplest to most complex. Then solve each sub-problem sequentially, including previous answers in the context. This technique is especially useful when classic Chain of Thought fails on problems whose complexity exceeds that of the provided examples.

Related concepts

Chain of ThoughtProblem decompositionScaffoldingSequential reasoning

FAQ

What is the difference between Least To Most Prompting and Chain of Thought?
Chain of Thought asks the model to reason step by step in a linear fashion, while Least To Most Prompting explicitly breaks down the problem into sub-problems ordered by increasing difficulty. This decomposition allows for better generalization: the model can solve more complex problems than the examples provided, because each solved sub-problem enriches the context for the next one.
When should I use Least To Most Prompting instead of a simple prompt?
This technique is recommended when the problem is too complex to be solved in a single step, especially for compound math problems, long document analysis, multi-step project planning, or any task requiring combining multiple intermediate reasonings. If a direct prompt or a simple Chain of Thought suffices, it is not necessary to use this approach.
Does Least To Most Prompting work with all language models?
This technique works best with large language models (GPT-4, Claude, Gemini) that have good reasoning capabilities. Smaller models may struggle to effectively break down problems or leverage the cumulative context of sub-answers. The more capable the model, the more effective the technique.

See also

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 2500+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More definitions

Get new prompts every week

Join our newsletter.