Tree of Thoughts
Explore multiple reasoning paths simultaneously and select the best solution
What is Tree of Thoughts?
Tree of Thoughts (ToT) is an advanced prompting technique that encourages the AI to explore multiple reasoning paths at once, evaluating different approaches before settling on a final answer. Instead of linear thinking, it structures the problem as a tree where each branch represents a different possibility.
This is particularly powerful for complex problems where trial-and-error or exploring alternatives leads to better outcomes than immediately committing to one approach.
When to Use It
Best For:
- • Strategic planning
- • Complex puzzles
- • Creative writing
- • Multi-criteria decisions
Not Ideal For:
- • Simple factual questions
- • Quick tasks
- • When one solution suffices
- • Limited context scenarios
Examples
• Dev Speed: 7/10 (mature tooling)
• Hiring: 9/10 (largest pool)
• Scalability: 8/10
Option 2: Next.js + Serverless
• Dev Speed: 9/10 (fastest)
• Hiring: 6/10
• Scalability: 7/10
Recommendation: Option 2 - Best for speed-to-market...
Path 2: Multiple trips - Farmer must shuttle back and forth
Path 3: Strategic ordering (correct):
1. Take goat across
2. Return alone
3. Take wolf across, bring goat back
4. Take cabbage across
5. Return alone
6. Take goat across
Best Practices
- 01 Define evaluation criteria
Tell the model how to compare and judge different paths
- 02 Limit branch count
3-5 branches is usually optimal; too many becomes unwieldy
- 03 Require explicit comparison
Ask for side-by-side evaluation, not just descriptions
- 04 Have the model "debate" paths
Let it argue for and against each approach before deciding
ToT vs Chain-of-Thought
While Chain-of-Thought explores one reasoning path sequentially, Tree of Thoughts explores multiple paths in parallel. CoT is like following a single thread; ToT is like a branching decision tree. Use ToT for complex problems where multiple solutions exist and the best isn't obvious.