Tree-of-Thoughts / Multi-Path Exploration
For problems with branching decisions, explore multiple reasoning paths and evaluate — do not commit to the first viable path.
This page is the complete instruction page for one pattern called "Tree-of-Thoughts / Multi-Path Exploration." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward — both the good effects and the costs.
This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.
Context
Problems with multiple reasonable approaches (mathematical proofs, search puzzles, design problems) benefit from exploring alternatives; greedy chains often miss the better path.
Problem
Single-chain reasoning commits early and cannot recover from an unfortunate first branch.
Forces
- Breadth of search vs cost
- Evaluation accuracy vs search depth
Solution
Generate multiple candidate thoughts at each decision point. Score candidates (heuristic, model-as-judge, or programmatic). Prune weak branches. Continue only the best. Cap by depth and breadth.
Applicability
- Combinatorial reasoning
- Design generation
- Optimisation problems with multiple reasonable strategies
Anti-Patterns
- Applied to simple tasks where a single chain suffices
- Unbounded exploration
Consequences
- +Quality improvement on branching problems
- +Robust to unlucky first guesses
- −Multiplicative token cost
- −Evaluation function hard to define well