Use Least-to-Most prompting
Break down complex problems into smaller parts, starting with the least amount of information.
What is Least-to-Most (LtM) prompting
Least-to-Most (LtM) prompting is a method that breaks down problems into simpler subproblems and solves them sequentially. This approach differs from Chain-of-Thought prompting, where each step is independent, as LtM utilizes the output of previous subproblems as input for the next.
Notably, LtM has demonstrated significantly higher accuracy than standard and Chain-of-Thought approaches in various tasks.
How to implement Least-to-Most prompting
- Break down the complex task into smaller, simpler parts and identify the key steps needed to solve it.
- Create a series of prompts that break down the problem into smaller, connected tasks.
- Guide the AI through each task in order, using previous answers to help with the next step.
- Check that each task’s output is accurate and makes sense before moving on.
- Combine all the task results into a complete solution that solves the original problem.
Example
Customer Inquiry:
I purchased a wireless noise-canceling headphone from your Premium Sound line last December during a holiday sale. The original price was 299, and I got them for 199. I noticed you’re now offering a trade-in program where you give full credit for old headphones towards a new pair. My current headphones have a small scratch on the right ear cup. I’m wondering if I can trade these in and get the newest model, which is priced at $349.
Instructions:
You are a customer service agent. Trade-in program offers 50% credit for headphones in good condition with minor wear. Trade-in credit cannot exceed 80% of the original product price. The current date is March 29th. Headphone models are typically valid for trade-in up to 18 months from purchase date. What subproblems must be solved before answering the inquiry?
Output:
- Determine if the customer is within the 18-month trade-in window.
- Calculate the amount of store credit the customer would receive if they trade in their headphones.
- Determine if the customer’s trade-in credit exceeds 80% of the cost of the original product.
Now, let’s solve the first subproblem:
Determine if the customer is within the 18-month trade-in window.
Output:
Yes, the customer is within the 18-month trade-in window. The customer purchased the headphones on December 1st, and today’s date is March 29th, which is within the 18-month trade-in window.
If the model doesn’t provide the final answer right away, we can continue to solve the next subproblem. In some cases, solving just the first subproblem may give us enough information to address the customer’s inquiry.
Why use Least-to-Most prompting
- Reduces errors by breaking down complex tasks into smaller parts
- Provides clear, step-by-step explanations of the reasoning process
- Makes difficult tasks easier to understand
- Works well across a variety of problems
Tips for effective Least-to-Most prompting
- Make sure the logic flows between subtasks, and gradually increase complexity.
- Make sure your instruction for each subtask is clear.
- Decide how granular to break down the problem based on the AI’s capabilities and your problem complexity.
- Regularly verify the output of each subtask for accuracy.
- Find the right balance between too many and too few steps.
Was this page helpful?