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:
- How many fruits are in one basket?
- How many fruits does Marie have in total?
- 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:
- What are the technical terms used and their definitions?
- What are the conditions of application mentioned?
- What exceptions are provided?
- 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
FAQ
What is the difference between Least To Most Prompting and Chain of Thought?
When should I use Least To Most Prompting instead of a simple prompt?
Does Least To Most Prompting work with all language models?
See also
How to use this prompt
- Copy the prompt with the button above.
- Paste it into ChatGPT, Claude or your favorite AI assistant.
- 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
Llama 3: Definition and Examples
Llama 3 is a family of open-source large language models developed by Meta (formerly Facebook), designed to compete with the best proprietary models while remaining freely accessible to the community.
LlamaIndex: Definition and Examples
LlamaIndex is an open-source framework that connects language models (LLMs) to external data sources to build AI applications
Long Context Model: Definition and Examples
A Long Context Model is a language model capable of processing and reasoning over very large amounts of text in a single interaction, with a window...
LoRA: Definition and Examples
LoRA (Low-Rank Adaptation) is an efficient fine-tuning technique that allows adapting a large language model or image generation model to a specific task.
Loss Function: Definition and Examples
A loss function is a mathematical formula that measures the gap between an AI model's predictions and the expected results. It guides
Machine Translation: Definition and Examples
Machine Translation refers to the use of software and artificial intelligence algorithms to automatically translate a text from one language to another, preserving meaning. This glossary entry explores its definition, history, examples, and practical use in prompt engineering.
Get new prompts every week
Join our newsletter.