What is Tree of Thoughts?
Chain-of-thought gets a model to reason step by step, but it's single-threaded — one path, all the way down. Tree of Thoughts (ToT) goes further: the model explores several paths at once, branching like a tree, and picks the best one. When a branch dead-ends, it can backtrack and try another.How is it different from chain-of-thought?
Chain-of-thought: a single lineStart from the problem, reason in order, reach an answer. Simple and direct, but if it goes wrong there's no easy way back.
Tree of Thoughts: a forest
At key points it expands into several candidate ideas, scores each one, keeps the promising branches and prunes the dead ends — and it can backtrack. It's closer to how humans weigh options.
How does it work, roughly?
Generate multiple thoughtsAt each step, ask the model to propose several possible next moves.
Evaluate and score
Give each candidate branch a score to judge whether it's worth pursuing.
Search and backtrack
Follow the high-scoring branches, and when needed, go back a step and try another route — repeating until a good answer shows up.
Where does it shine?
Tasks that need multi-step planning, have many possible answers, or punish a single wrong move benefit most — puzzles, math proofs, outlining an article, planning a complex project. The trade-off is more calls and more latency, so for simple questions it's overkill.Bottom line: Tree of Thoughts makes the AI think several moves ahead, like a chess player, and pick the best plan among many.
Comments