liveBook · Manning

Tree-of-thought

Also called ToT

Tree-of-thought is a reasoning technique that explores and evaluates multiple branching paths of intermediate reasoning to develop a solution.

How 7 Manning books explain it

The Architecture of Reasoning

A technique for deliberately generating, clarifying, comparing, and narrowing alternative reasoning paths.

How it is used
Widens the solution space before teams commit to an ambiguous or consequential decision.
How deep it goes
Provides a procedural scaffold from distinct branches through assumptions, risks, criteria, and explicit convergence; does not prescribe branching for bounded decisions.
Examples
Uses a rewrite-versus-refactor architecture review and alternative diagnoses of slipping service response times.
What you can do after
Practice/perform bounded branching to compare distinct approaches and record why one was chosen over the others.

Read how The Architecture of Reasoning explains Tree-of-thought →

AI Agents in Action, Second Edition

A thought tree is a tree-structured representation of alternative intermediate reasoning steps and their extensions.

How it is used
Uses explicit branching search for multistep problems where lookahead and evaluation matter.
How deep it goes
Explains generation, expansion, evaluation, pruning, and backtracking, then exercises branch scoring and retention.
Examples
Uses a time-machine jump puzzle and an exercise that scores and prunes expanded branches.
What you can do after
Practice branching candidate plans, scoring partial solutions, retaining promising paths, and counting model calls.

Read how AI Agents in Action, Second Edition explains Tree-of-thought →

Introduction to Generative AI, Second Edition

Tree of thought is a prompting technique that explores multiple branching sequences of intermediate reasoning before selecting a solution.

How it is used
Uses branching prompts to compare candidate reasoning paths before selecting an approach for complex or constrained tasks.
How deep it goes
Explains the branching-and-selection mechanism and gives one worked example, but does not provide implementation details or systematic search procedures.
Examples
Uses customer-retention strategies, logic puzzles, scientific problem-solving, and search-heavy applications as examples.
What you can do after
Apply it via prompting to generate, compare, and select multiple candidate solutions.

Read how Introduction to Generative AI, Second Edition explains Tree-of-thought →

Building Reliable AI Systems

A prompting method in which a language model explores and evaluates multiple reasoning paths before selecting a solution.

How it is used
Supports structured decisions when a single reasoning path may miss viable alternatives.
How deep it goes
Describes branch generation, evaluation, and selection, with worked decision scenarios.
Examples
Uses a damaged-TV return and a shipping-cost optimization problem to illustrate competing branches.
What you can do after
Apply it through prompts that generate, evaluate, and select among candidate solutions.

Read how Building Reliable AI Systems explains Tree-of-thought →

AI Agents in Action

Tree of thought prompting is a prompting technique that explores and evaluates multiple intermediate reasoning paths while constructing a solution.

How it is used
Uses branching plan generation and evaluation to explore solutions to complex problems.
How deep it goes
Explains chained prompts, paired generation and evaluation, breadth-first and depth-first execution, and short-circuiting invalid plans.
Examples
Demonstrates a breadth-first Prompt Flow for a complex time-travel problem.
What you can do after
Apply it via Semantic Kernel and Prompt Flow to generate and evaluate branching plans.

Read how AI Agents in Action explains Tree-of-thought →

Transformers in Action

Tree-of-thought prompting explores and evaluates multiple branching intermediate reasoning paths before producing an answer.

How it is used
Applies prompting to complex tasks requiring exploratory, strategic reasoning and deliberate selection among intermediate solutions.
How deep it goes
Explains generation, evaluation, BFS, DFS, pruning, and a GPT-4 implementation rather than only defining the technique.
Examples
Demonstrates Game of 24 with arithmetic branches, candidate labels, a GPT-4 workflow, and a final valid equation.
What you can do after
Apply it via a tree-search implementation that generates, evaluates, prunes, and selects intermediate reasoning paths.

Read how Transformers in Action explains Tree-of-thought →

AI Agents and Applications

Tree of thought is a reasoning technique that lets a language model explore, evaluate, refine, and backtrack across multiple reasoning paths.

How it is used
Improves deliberate reasoning, planning, and decision-making for tasks requiring strategic exploration.
How deep it goes
Defines exploration, evaluation, refinement, and backtracking but does not specify an implementation procedure.
Examples
Uses Game of 24, creative writing, and mini crosswords as application examples.
What you can do after
Evaluate when multiple reasoning paths and backtracking may improve a language-model solution.

Read how AI Agents and Applications explains Tree-of-thought →

Also covered in

What to know first

Related concepts

Questions about Tree-of-thought

What is Tree-of-thought?

Tree-of-thought is a reasoning technique that explores and evaluates multiple branching paths of intermediate reasoning to develop a solution.

Which Manning books explain Tree-of-thought?

The Architecture of Reasoning, AI Agents in Action, Second Edition, Introduction to Generative AI, Second Edition, Building Reliable AI Systems, AI Agents in Action, Transformers in Action and AI Agents and Applications.

What should I know before learning Tree-of-thought?

Manning books that teach Tree-of-thought usually introduce language model, chain-of-thought prompting, retrieval-augmented generation and hallucination first.

What is the difference between Tree-of-thought and chain-of-thought?

Tree-of-thought is a reasoning technique that explores and evaluates multiple branching paths of intermediate reasoning to develop a solution. A chain-of-thought is an ordered sequence of intermediate reasoning steps that connects information or a problem to a conclusion, whether expressed or generated as text.

What is Tree-of-thought a kind of?

Tree-of-thought is a kind of reasoning pattern. A reasoning pattern is an organized strategy of steps or rules for carrying out multi-step reasoning or problem solving toward a conclusion.

What is Tree-of-thought also called?

Tree-of-thought is also called ToT.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.