Tree of Thoughts
Definition
Tree of Thoughts (ToT) extends chain-of-thought by exploring multiple reasoning paths in parallel, allowing the model to consider different approaches and backtrack from dead ends.
Why It Matters
Some problems have multiple possible approaches, and the first path might not be the best. Tree of Thoughts enables the model to explore alternatives, evaluate intermediate states, and backtrack when a path seems unpromising. This mimics how humans solve complex problems through exploration and revision.
How It Works
ToT structures problem-solving as a tree:
- Generate multiple possible next steps (branches)
- Evaluate each branchโs promise
- Expand the most promising branches
- Backtrack if a path reaches a dead end
- Continue until reaching a solution
This can be implemented through prompting patterns or explicit tree search algorithms.
When to Use
Use Tree of Thoughts for: problems with multiple valid approaches, creative tasks requiring exploration, puzzles and games (like 24, crosswords), tasks where initial approaches often fail, and when you can afford higher compute costs. For straightforward problems, simpler techniques are more efficient.
Source
Tree of Thoughts enables exploration of coherent text generation with language models by considering multiple reasoning paths and self-evaluating choices.
https://arxiv.org/abs/2305.10601