Tree of Thoughts
A framework that explores multiple reasoning branches in parallel and selects the most promising path.
Full Definition
Tree of Thoughts (ToT) generalises chain-of-thought from a single linear reasoning path to a tree structure. At each reasoning step, the model generates multiple possible next thoughts (branches), evaluates their promise using a scoring heuristic or a separate model call, and expands only the most promising branches. This search over the thought space allows the model to backtrack from dead ends, something linear chain-of-thought cannot do. ToT is especially effective for planning, puzzle-solving, and creative writing tasks where initial paths can be misleading. The main cost is significantly more inference calls per final answer.
Examples
Solving the 24 Game (make 24 from four numbers using arithmetic) by enumerating partial expressions, scoring them for feasibility, and expanding the best ones.
Planning a novel outline by generating five possible chapter structures, scoring each for coherence, and developing only the top two.
Apply this in your prompts
PromptITIN automatically uses techniques like Tree of Thoughts to build better prompts for you.
Related Terms
Chain-of-Thought
A prompting technique that asks the model to reason step-by-step before giving a…
View →Self-Consistency
Sampling multiple reasoning paths and selecting the most common answer to improv…
View →Planning in AI
The process by which an AI agent determines a sequence of actions to achieve a g…
View →