Curiosity · Concept

Tree of Thoughts (ToT)

Chain-of-thought is a single left-to-right sequence of reasoning steps. Tree of Thoughts, introduced by Yao et al. (2023), instead treats reasoning as search: at each step the model proposes multiple candidate 'thoughts,' a value function (often the same model, prompted differently) rates them, and a controller runs BFS, DFS, or beam search with pruning. ToT produces large gains on problems with backtracking — 24-Game, mini crosswords, creative writing — at the cost of many more model calls. It's a good fit when problems have clear intermediate states you can score.

Quick reference

Proficiency
Intermediate
Also known as
ToT
Prerequisites
chain-of-thought, self-consistency

Frequently asked questions

What is Tree of Thoughts?

Tree of Thoughts is a prompting framework where the LLM explores a tree of intermediate reasoning steps instead of a single chain. At each node it generates candidates, self-evaluates them, and searches (BFS or DFS) with pruning toward a solution.

How is ToT different from chain-of-thought or self-consistency?

CoT is a single linear trace. Self-consistency samples multiple independent linear traces and votes. ToT actively branches, scores partial states, and prunes — it can backtrack from a bad intermediate step, which neither CoT nor self-consistency can do.

When is ToT worth the cost?

On problems with clear intermediate state you can score (puzzles, planning, theorem-lite tasks) where mistakes early ruin everything downstream. For most everyday tasks CoT or self-consistency are more cost-effective.

What evaluates the thoughts?

Usually the same LLM in a scoring prompt that rates each candidate thought ('sure', 'maybe', 'impossible' or a numeric score). For well-defined tasks an external checker (code execution, logic solver) is even better when available.

Sources

  1. Yao et al. — Tree of Thoughts: Deliberate Problem Solving with LLMs — accessed 2026-04-20
  2. Princeton NLP — Tree of Thoughts GitHub — accessed 2026-04-20