The Problem: A Single Path Is Fragile
Chain-of-thought prompting (CoT) makes the model produce linear reasoning: step 1, step 2, step 3, conclusion. It's better than no reasoning at all, but it's fragile. If the large language model (LLM) makes a mistake at step 2, the entire rest is corrupted. There's no way to backtrack. The technique itself is covered in chain-of-thought fundamentals.
Tree of Thoughts (ToT) offers a natural solution: instead of following a single path, explore multiple paths in parallel and select the best ones at each step. It's the difference between a hiker who picks a trail at random and a group of scouts who explore multiple trails and converge on the best one.
Note the price of that idea straight away, because it is what decides whether anyone actually uses it: exploring a tree means multiplying calls to the model. The arithmetic is below, and the general argument (buying quality by spending compute at question time rather than at training time) is developed in test-time compute.
Tree of Thoughts: Deliberate Problem Solving with Large Language Models (Yao et al., 2023)CoT is like a beginner chess player who plays the first move that comes to mind. ToT is like an experienced player who mentally evaluates several moves, anticipates possible responses, and chooses the most promising line. It's tree search applied to reasoning.
How It Works
The algorithm breaks down into four steps:
- Decompose: divide the problem into well-defined intermediate steps
- Generate: at each step, ask the model to propose several thoughts, the paper's word for a candidate reasoning step, a partial piece of a solution rather than a full sentence; we will say "candidate"
- Evaluate: each candidate receives a quality score, given by the model itself
- Search: a tree-traversal algorithm decides in which order candidates get expanded
Here's the tree structure:
Problem
- Thought A (score: 0.8)
- A1 (score: 0.9) β Best β Solution
- A2 (score: 0.3) β
- Thought B (score: 0.6)
- B1 (score: 0.7)
- Thought C (score: 0.2) β
Two search strategies are possible:
BFS (Breadth-First Search): you explore all candidates at each level, keep the K best, then move to the next level. It's reliable when evaluation is good, because you don't risk missing a good branch.
DFS (Depth-First Search): you explore depth-first, and backtrack if you hit a dead end. More memory-efficient for very wide trees, since you don't need to store all candidates at a level.

Every measurement below was made with GPT-4, in May 2023, by the paper's own authors.
Game of 24 (reach 24 from four numbers using the four arithmetic operations), share of problems solved: 4.0% for chain-of-thought, 74% for ToT with a breadth of 5. That breadth, written b in the paper (breadth limit), is how many states are kept at each step: at b = 1, ToT already reaches 45%.
5Γ5 mini crosswords, and here you have to look closely, because the paper reports three different success rates for the same experiment:
| Measure | Chain-of-thought | ToT |
|---|---|---|
| Letters correct | 40.6% | 78% |
| Words correctly placed | 15.6% | 60% |
| Grids fully solved | 1% | 20% |
The widely quoted "60%" is a rate of correct words, not of solved grids. On the only criterion a user cares about (is the puzzle finished?) ToT goes from 1% to 20%. The gain is real and large; it is simply five times less spectacular than the headline number. This is a textbook case for the reading grid in how to read a benchmark score: a score without its protocol says nothing.

Evaluating Candidates: The Model Judges Its Own Ideas
The centerpiece of ToT is that the model scores the quality of its own reasoning steps. No external program computes anything: the question is simply put back to the model, in plain language.
The paper does not use a numeric rating. On the Game of 24, it hands the model the numbers that remain and asks whether they can still reach 24. The model answers with one of three words: sure, likely, or impossible. Those three words are then mapped to numeric weights to rank the branches.
Evaluation instruction, as in the paper:
Evaluate if given numbers can reach 24. Remaining numbers: 10, 13, 13 Answer: sure / likely / impossible
You will often meet variants that ask for a 1-to-10 rating plus a justification. That is a common adaptation, not the paper's recipe, and it has a flaw: the model spends tokens writing a justification nobody will ever read.
Either way the principle holds: the model reflects on its own reflection. It works better the stronger the model is, and it means every node in the tree costs two calls to the model, one to propose and one to evaluate.

Concrete Example: The Game of 24
Numbers: 4, 5, 6, 10, Goal: get 24 using the 4 operations
Step 1, Proposals:
- A) (remaining: 5, 6, 6) β 7/10
- B) (remaining: 6, 10, 20) β 6/10
- C) (decimal number, complicates things) β 3/10
Keep A and B, prune C.
Step 2 (from A, with 5, 6, 6):
- A1) (remaining: 6, 11) β β
- A2) β β
- A3) β β
The tree found the solution by systematically exploring promising branches and pruning dead ends.
Variants and Improvements
ToT with rollout verification: instead of settling for a score, you expand each candidate all the way to a complete solution to see whether it holds. Candidates that succeed are kept, the rest are pruned. More reliable, and far more expensive, since every branch is carried to the end.
Beam search: the lightweight version, and by far the most widespread. At each step you keep only the K best candidates (the beam) generate their continuations, and re-select the K best. It is the usual trade-off between exhaustiveness and cost. The paper's b = 5 is exactly this.
MCTS, Monte Carlo Tree Search, the search method behind the programs that beat human champions at Go. What it adds here is an explicit balance between two opposing pulls: digging into branches that already look good (exploitation) and going to look at branches still unknown (exploration).
ToT helps on combinatorial problems, the ones where you must try possibilities and be able to back out: logic puzzles, multi-step planning, mathematical solving, optimization. For simple factual questions or writing text, ordinary chain-of-thought is enough, and it costs two orders of magnitude less, the arithmetic is right below.
The Cost: What You Actually Pay
The reasoning is arithmetic, and we can do it in front of you.
A tree of breadth K (candidates per step) and depth N (number of steps) needs, at every step, one call to propose the candidates plus one evaluation call per candidate. With K = 5 and N = 3, that comes to roughly 15 proposals and 15 evaluations, so about thirty calls to the model for one question. Chain-of-thought needs one.
The paper gives its own figures, measured on the Game of 24 with GPT-4 in 2023, and they say more than any headline multiplier:
- ToT: roughly 5,500 generated tokens per problem, i.e. $0.74.
- Chain-of-thought: roughly 6,700 tokens for a hundred attempts, i.e. $0.47, so barely $0.005 for a single attempt.
In other words, on this task, a problem run through ToT costs on the order of a hundred times what the same problem costs with plain chain-of-thought. That is not a factor of 10 or 30: it is two orders of magnitude. The dollar amounts themselves have fallen a great deal since 2023; it is the ratio between the two methods that is worth remembering, not the absolute price.
Latency follows the same logic, with one nuance: candidates at the same level can be requested in parallel, but the levels themselves are necessarily sequential, you must have scored level 2 to know which branches to expand at level 3. A tree of depth N therefore has at least N unavoidable round trips.
Thirty calls instead of one is a heavy investment, and it is justifiable only when two conditions hold together: chain-of-thought fails often on your kind of problem, and tree exploration can genuinely recover those failures. For most uses (conversational agents, summarization, factual questions) plain chain-of-thought, or majority voting over a handful of answers (self-consistency), gives a far better return.
The point not to miss, for a reader assessing an invention: a gain obtained by spending a hundred times more compute at run time is not the same thing as a gain obtained by improving the model. It is a purchase, not a property of the system. See test-time compute and how to read a benchmark score.
The Conceptual Impact: Reasoning as Search
Beyond the algorithm itself, Tree of Thoughts installed an idea that spread widely: treat a model's reasoning as a search problem in a state space, not as a plain left-to-right emission of tokens.
The reasoning models that followed, o1 at OpenAI, DeepSeek-R1 moved that exploration inside the model. Rather than having an outer program orchestrate the tree across dozens of calls, the model emits one long reasoning trace in a single call, inside which it tries paths, contradicts itself and backs out. Mind the wording: "a single call" does not mean a single computation, that trace can run to thousands of tokens, each requiring a full pass through the network. The spending has not vanished, it has changed shape, billed as generated tokens rather than as requests. That is the subject of test-time compute.
Explicit ToT sees little production use, for want of a payoff, but its four basic moves (branch, prune, score, back out) have become the shared vocabulary of language-model reasoning.
1. People often quote '60% success for ToT on 5x5 crosswords'. According to the paper, what does that figure actually measure?
2. For the same question, what order of magnitude in cost separates a ToT run (breadth 5, depth 3) from a simple chain-of-thought?
3. In the original paper, how are the tree's candidates scored to decide which branches to expand?
4. What fundamentally explains the gap between 4% (chain-of-thought) and 74% (ToT) on the Game of 24?