Beyond a single chain
Chain of thought commits to one line of reasoning. Tree of Thoughts explores several at once. The agent generates multiple candidate next steps, evaluates each, and searches the tree for a promising path, backtracking when a branch looks weak.
Building blocks
- Thought generation propose several candidate next steps from a state
- State evaluation score how promising each candidate is
- Search use breadth first or depth first traversal to expand good nodes
- Backtracking abandon dead ends and return to a better branch
Searching the tree
Each node is a partial solution. The agent expands the most promising nodes, prunes weak ones, and stops when a leaf solves the task.
Cost versus quality
Exploring many branches multiplies model calls, so Tree of Thoughts is expensive. It pays off on puzzles where a single greedy chain often fails, such as planning games or constraint problems. For simple tasks the overhead is not worth it.
Key idea
Tree of Thoughts treats reasoning as search over branching thoughts, evaluating and backtracking to find strong paths at the cost of many more model calls.