Tree-of-Thought (ToT) extends chain-of-thought by exploring multiple reasoning branches simultaneously. Instead of one linear reasoning chain, ToT generates several candidate "thoughts" at each step, evaluates them, and expands the most promising branches — like a search tree. This enables backtracking from dead ends, which plain CoT cannot do. ToT is most effective for planning problems, creative writing with constraints, and mathematical reasoning where multiple approaches should be explored.
Each stage in order — click any step to read what it does.
How Tree-of-Thought differs from chain-of-thought and zero-shot.
The trade-offs worth knowing before you build this.
The original ToT paper showed 74% success rate on the 24 Game vs 4% for CoT. For problems requiring multiple decision points and backtracking (puzzles, code debugging, route planning), ToT can improve from 5% to 50%+ pass rate.
ToT requires 10-50 LLM calls per problem vs 1-3 for CoT. Cost: $0.50-5.00 per problem vs $0.02-0.10 for CoT. Reserve ToT for high-value problems where a 10x quality improvement justifies the cost (e.g., complex code generation, strategic planning).
Full parallel BFS is complex to implement. A simpler approximation: 'Generate 3 approaches, evaluate them, pick the best, continue.' This sequential ToT captures most of the benefit with much less orchestration complexity.
Sign in to share your feedback and join the discussion.