Skip to main content
Interactive 3D/Tree-of-Thought Reasoning
Tree-of-Thought - BFS Search
Step 0/8 - beam width: 2
Start: Plan a birthday party
score: 0.90
Book a venue first
score: 0.70
Send invitations first
score: 0.85
Order food/cake first
score: 0.30
Book restaurant
score: 0.65
Rent party hall
score: 0.72
Digital invites → venue
score: 0.88
Paper invites → catering
score: 0.60
Order before planning venue
score: 0.25
unexplored
exploring
visited
pruned
best
Controls
Search strategy
Beam width2
15
ToT (Yao et al., 2023) lets LLMs explore multiple reasoning paths simultaneously and use a value function to prune weak branches early. BFS keeps all nodes at a depth; DFS commits to one branch.
Pruning: nodes with score below threshold (here <0.4) are discarded. This avoids exploring dead-end reasoning paths and reduces token cost.

Tree-of-Thought Reasoning - Interactive Visualization

Tree-of-Thought (Yao et al., 2023) extends chain-of-thought by maintaining a tree of partial solutions and using an LLM-based value function to evaluate and prune branches. This allows systematic exploration of multiple reasoning paths, backtracking from dead ends, and beam search over thought sequences - enabling LLMs to solve complex planning and search problems that fail with linear CoT.

  • Interactive tree diagram with step-by-step BFS and DFS exploration of reasoning paths
  • Node scoring system showing why low-score branches get pruned before full expansion
  • Toggle between BFS (explores all nodes level by level) and DFS (commits to one path first)
  • Beam width slider controlling how many parallel paths are kept at each exploration step

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.