liveBook · Manning

Least-to-most prompting

As explained in Introduction to Generative AI, Second Edition

Least-to-most prompting solves progressively harder subproblems by starting with simpler components and then addressing the complete problem.

Least-to-most prompting solves a difficult task progressively: begin with simpler subproblems, then use those components to address the complete problem. This mirrors familiar human teaching methods and can support educational or tutoring tasks. section 7.4

A math problem

Prompt the model to list all known variables first, calculate each part step by step, and produce the final answer only after completing those simpler steps. section 7.4

Table 7.3 Common advanced prompting techniques

Technique

Description

Example prompt

Chain-of-thought

Generate step-by-step reasoning before answering

“Let’s think step by step. John has 3 apples . . .”

Tree-of-thought

Explore multiple reasoning paths in parallel

“List three strategies, evaluate each, then choose the best.”

Self-consistency

Generate multiple reasoning chains and aggregate

“Generate five solutions, then select the most common answer.”

Reflexion

Critique and revise output iteratively

“Review your answer for errors and revise if needed.”

Verification

Add a final self-check before finalizing the response

“Double-check your answer for accuracy before submitting.”

Decomposition

Break the problem into subtasks executed sequentially

“Step 1: Extract metrics. Step 2: Summarize trends. Step 3: Write summary.”

Least-to-most

Solve easier subproblems first, then build up

“First, list known variables. Then calculate step by step.”

Pyramid priming

Build knowledge gradually in layers

“Step 1: Define carbon neutrality. Step 2: List targets. Step 3: Analyze impact.”

Generated knowledge

Surface key facts before answering

“List key concepts related to quantum entanglement before answering.”

Role-based prompting

Assign a role or persona to guide behavior

“You are an experienced employment lawyer advising a client.”

Prompt chaining

Connect multiple prompts into a pipeline

“Extract relevant quotes → Summarize → Generate final answer.”

Conversational context

Summarize prior dialogue to preserve coherence

“Summarize the student’s understanding before proceeding.”

Compare least-to-most prompting with decomposition, prompt chaining, verification, and other advanced prompting techniques. section 7.4

How Introduction to Generative AI, Second Edition covers it

How deep it goes
Defines the progressive strategy and gives a math example, while stopping short of implementation details or evaluation guidance.
Examples
Uses a math prompt that lists known variables, calculates parts step by step, and then produces a final answer.
What it assumes
Assumes a complex task that can be divided into smaller parts and teaches the progression from simple components to the complete problem.
What you can do after
Practice/perform staged prompting by breaking a complex problem into easier subproblems before requesting the complete solution.
How it connects
Connects least-to-most prompting with decomposition prompting, prompt chaining, pyramid priming, and human teaching methods.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Introduction to Generative AI, Second Edition. The section links point to the parts of the book it draws on.