Least-to-Most — Bottom-Up Problem Decomposition
From simple to complex
The Problem: Complex problems are overwhelming. How can we break them into manageable pieces and solve them one step at a time?
The Solution: Eat the Elephant One Bite at a Time
Least-to-Most prompting breaks complex problems into simpler subproblems, solves them from easiest to hardest, and builds on each solution. Each step provides context for the next, like climbing a staircase. It enhances Chain-of-Thought with explicit decomposition, and resembles Prompt Chaining where each step feeds the next.
Think of it like eating an elephant one bite at a time:
- 1. Decompose: "What are the subproblems I need to solve?"
- 2. Order: "Which is simplest? What builds on what?"
- 3. Solve easiest: Get a foundation answer
- 4. Build up: Use each answer to help solve the next problem
Where Is This Used?
- Long Math Problems: Breaking word problems into calculation steps
- Reading Comprehension: Understanding complex texts piece by piece
- Programming: Building solutions from helper functions up
- Research: Answering complex questions with dependent sub-questions
Fun Fact: Least-to-Most was specifically designed for problems that require "symbolic reasoning" — where each step depends on previous ones. It significantly outperforms standard CoT on compositional tasks!
Try It Yourself!
Use the interactive example below to see how breaking a problem into smaller pieces leads to better solutions.
📈 Least-to-Most — break complex task into subproblems, solve from simple to complex. Each next solution uses previous ones!
How many ways to climb 5 stairs if you can step 1 or 2 steps at a time?
⚠️ Correct, but without understanding why
Task: How many ways to climb 5 stairs if you can step 1 or 2 steps at a time? Break this task into subproblems from simple to complex. Then solve each subproblem in order, using solutions from previous steps for the next ones.
LLM will determine subproblems and solve them sequentially.
Task: How many ways to climb 5 stairs if you can step 1 or 2 steps at a time? Solve this task by breaking it into the following subproblems (from simple to complex): 1. 1 stair 2. 2 stairs 3. 3 stairs 4. 4 stairs 5. 5 stairs Solve each in order. In each next step, use solutions from previous ones.
Useful when you know the task structure better and want to control decomposition.
Least-to-Most works like dynamic programming: simple case solutions become building blocks for complex ones. Especially effective for: recursive problems, multi-step calculations, pedagogy (explaining concepts).
Try it yourself
Interactive demo of this technique
How many ways to climb a 5-step staircase if you can step 1 or 2 steps at a time?
This is Fibonacci numbers: F(5) = F(4) + F(3) = 5 + 3 = 8 ways.
Solving from simple to complex:
📊 Subproblem 1: 1 step Ways: only [1] Answer: 1 way
📊 Subproblem 2: 2 steps Ways: [1,1] or [2] Answer: 2 ways
📊 Subproblem 3: 3 steps If first step is 1 → 2 steps left → 2 ways If first step is 2 → 1 step left → 1 way Answer: 2 + 1 = 3 ways
📊 Subproblem 4: 4 steps First step 1 → 3 steps → 3 ways First step 2 → 2 steps → 2 ways Answer: 3 + 2 = 5 ways
📊 Subproblem 5: 5 steps First step 1 → 4 steps → 5 ways First step 2 → 3 steps → 3 ways Answer: 5 + 3 = 8 ways
✅ Final answer: 8 ways
💡 Pattern: this is Fibonacci sequence! 1, 2, 3, 5, 8...
Least-to-Most shows how simple case solutions build foundation for complex ones. The model also discovered the general pattern (Fibonacci).
Create a free account to solve challenges
3 AI-verified challenges for this lesson
This lesson is part of a structured LLM course.
My Learning Path