Prompt technique
Tree-of-Thought (ToT) Prompting
When one chain isn't enough — search across many possible reasoning paths.
What it is
Tree-of-Thought (Yao et al., 2023) generalises Chain-of-Thought into a search problem. The model proposes several candidate reasoning steps at each node, evaluates them, and explores the most promising branches — like a chess engine for language. ToT excels at tasks where the path to the answer isn't linear: planning, creative writing, puzzle solving, and exploring trade-offs.
When to use it
- ✓Open-ended planning where multiple strategies are viable
- ✓Creative tasks with quality/style trade-offs
- ✓Complex puzzles, game play, or multi-step optimisation
Example
Plan a 5-day trip to Japan for a couple who love food and design. Propose 3 distinct itineraries (Tokyo-focused, Kyoto-focused, mixed). For each, list pros and cons. Then pick the strongest itinerary and expand it day-by-day.
Why it works: The model branches into three plans, evaluates each, then expands the winner — explicit ToT search inside a single prompt.
Pitfalls
- !Token-hungry — generate fewer branches with deeper expansion rather than many shallow ones.
- !Needs a good evaluator step; without it the model just picks its first branch.