Skip to content

AI Glossary · Concepts

What is Tree of Thoughts?

Tree of Thoughts

Tree of Thoughts (ToT) is a prompting and search method in which a language model proposes several possible next reasoning steps, rates them, and explores the most promising branches, backing up when one fails. It extends chain-of-thought prompting from one line of reasoning to a search over many.

Also known as: ToT, tree-of-thought prompting, tree of thought

· Chain of Thought

Model Architecture

  • 1 explainer
  • 2 sources

Picture solving a puzzle on scratch paper. You try a first move, see it leads nowhere, cross it out and try another. Chain-of-thought prompting asks a model to write out one sequence of steps; if an early step is wrong, the rest usually follows it. Tree of Thoughts instead has the model generate several candidate steps at each point, judge which look promising, and keep exploring those while dropping dead ends.

Yao and colleagues tested the idea on tasks that need planning or search, including the Game of 24 (combine four numbers with arithmetic to reach 24), creative writing and mini crosswords. In their setup, GPT-4 with chain-of-thought prompting solved 4% of Game of 24 problems and Tree of Thoughts solved 74% (Yao et al.). That is a result for those tasks and that model, not a general multiplier.

In practice, ToT is a program wrapped around a model rather than a single prompt. Code asks the model to propose steps, asks it (or a checker) to rate them, and runs a search such as breadth-first or depth-first over the tree. That means many model calls per question, so cost and latency rise quickly. It belongs to the broader family of test-time compute methods that spend more work at answer time; self-consistency is a simpler cousin that samples several full answers and votes. Many reasoning models now explore alternatives internally, so editorially, try a reasoning model first and reserve an explicit tree search for problems where you can score partial progress.

Sources

Go deeper