Tree of Thoughts
ToT
Part of: Advanced Prompting Patterns
Chain of thought commits to one line of reasoning and rides it to the end. But hard problems often have a first step that looks promising and quietly dooms everything after it. Tree of thoughts (ToT) fixes that by refusing to commit early: at each step it spawns several candidate continuations, scores them, keeps the best few, and discards the rest. Reasoning stops being a single rope and becomes a branching, self-pruning search. What it is Tree of thoughts is a prompting pattern where the model explores multiple reasoning paths at once , arranged as a tree. Each node is a partial reasoning state. From any node the model proposes several next "thoughts", the branches. An evaluator scores how promising each branch is, and only the strongest survive to be expanded further. Weak branches are pruned so the search doesn't waste effort on dead ends. Where chain of thought is depth-first and irreversible (one path, no backtracking), ToT is a deliberate search: it can abandon a bad branch and pour effort into a better one. The width of the search, how many branches you keep at each level, is the beam width . How it works The loop is propose, evaluate, prune, expand: Two knobs control the s
Challenge: Prune the Reasoning Tree