[Paper Review] Tree of Thoughts: Deliberate Problem Solving with Large Language Models
Tree of Thoughts (ToT) augments language models with a tree-structured deliberate search over intermediate thoughts, enabling planning and backtracking to solve tasks requiring reasoning and planning beyond chain-of-thought prompting.
Language models are increasingly being deployed for general problem solving across a wide range of tasks, but are still confined to token-level, left-to-right decision-making processes during inference. This means they can fall short in tasks that require exploration, strategic lookahead, or where initial decisions play a pivotal role. To surmount these challenges, we introduce a new framework for language model inference, Tree of Thoughts (ToT), which generalizes over the popular Chain of Thought approach to prompting language models, and enables exploration over coherent units of text (thoughts) that serve as intermediate steps toward problem solving. ToT allows LMs to perform deliberate decision making by considering multiple different reasoning paths and self-evaluating choices to decide the next course of action, as well as looking ahead or backtracking when necessary to make global choices. Our experiments show that ToT significantly enhances language models' problem-solving abilities on three novel tasks requiring non-trivial planning or search: Game of 24, Creative Writing, and Mini Crosswords. For instance, in Game of 24, while GPT-4 with chain-of-thought prompting only solved 4% of tasks, our method achieved a success rate of 74%. Code repo with all prompts: https://github.com/princeton-nlp/tree-of-thought-llm.
Motivation & Objective
- Motivate the need for deliberate, tree-structured problem solving in LLMs beyond left-to-right token generation.
- Introduce the Tree of Thoughts (ToT) framework that maintains a tree of intermediate thoughts and uses search algorithms to explore them.
- Demonstrate ToT on challenging tasks (Game of 24, Creative Writing, Mini Crosswords) and compare to IO prompting, CoT, and CoT-SC.
- Show that ToT achieves higher success rates and provides modular, adaptable components without additional training.
Proposed method
- Decompose problem solving into a tree of thoughts where each node is a partial solution state.
- Generate next thoughts from a state using either i.i.d. sampling from a CoT prompt or a propose prompt for more constrained spaces.
- Evaluate frontier states with a deliberate heuristic via LM-based evaluation prompts or voting prompts to guide search.
- Apply BFS or DFS search over the thought tree with configurable breadth and depth limits to balance exploration and cost.
- Implement ToT-BFS and ToT-DFS algorithms that select top states based on evaluated heuristics and allow backtracking.

Experimental results
Research questions
- RQ1Can ToT improve problem solving for tasks requiring planning, search, and backtracking beyond standard prompting?
- RQ2How do different thought generation and evaluation strategies affect ToT performance across distinct problem domains?
- RQ3What are the effects of using BFS versus DFS within the ToT framework on solution quality and efficiency?
- RQ4How does ToT compare to IO prompting, Chain-of-Thought prompting, and CoT-SC on challenging reasoning tasks?
Key findings
- ToT substantially improves performance on three challenging tasks compared with IO, CoT, and CoT-SC.
- In Game of 24, ToT with b=1 achieves 45% success and with b=5 achieves 74% success, versus 7.3%, 4.0%, and 9.0% for IO, CoT, and CoT-SC respectively.
- Creative Writing experiments show ToT yields higher average coherence scores (ToT 7.56 vs IO 6.19 and CoT 6.93) and human preference for ToT outputs in a majority of pairs.
- Mini Crosswords results indicate ToT significantly outperforms IO and CoT on word-level and game-level metrics, reaching 60% word-level success and solving 4 of 20 games with standard settings.
- A simple oracle-best-state ablation and pruning/backtracking analyses suggest room for improvement via better state evaluation and DFS heuristics.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.