AI GLOSSARY · PROMPTS AND INSTRUCTIONS
Tree of thoughts (ToT)
Definition
Tree of thoughts is a prompting framework in which a language model explores several candidate reasoning steps, judges them, and backtracks when needed. It generalises chain-of-thought prompting from a single line of reasoning to a branching search.
Also called: tree of thought, tree of thought prompting, tree of thoughts prompting, ToT prompting, tree-of-thought.
In plain language
Tree of thoughts means letting an AI try several routes to an answer instead of committing to the first one. Picture solving a maze on paper: you walk down one corridor, notice it is a dead end, and go back to try another. The framework has the model write out a few possible next steps, rate how promising each looks, and keep going down the best ones. It helps on puzzles that need planning or looking ahead. Generating and scoring alternatives can add token usage and latency; charges depend on the model and service. IBM notes that the setup is complex to tune and can spend effort on low-value paths.
Technical definition
Tree of Thoughts (Yao et al., arXiv 2305.10601) frames problem solving as search over a tree whose nodes are intermediate text thoughts. The abstract says the framework generalises chain-of-thought prompting, lets the model consider multiple reasoning paths, self-evaluate choices, and backtrack, and reports results on Game of 24, Creative Writing and Mini Crosswords. IBM breaks the method into four parts: thought decomposition, thought generation, state evaluation, and a search algorithm, either breadth-first or depth-first. Generating and evaluating branches can require additional inference work; batching, pruning and implementation determine call counts, token usage and latency.
Worked examples in this catalogue
Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.
Skill by Skill Almanac · Illustrative, not executed
idea-scoring-matrix 42/100 · Provisional, not yet measuredScored · Method v0.2 · How we score
- What you see
- Supplied ideas ranked with a weighted scoring matrix and sensitivity checks. This is an analogy for evaluating alternatives, not a formal ToT implementation.
- Why it exercises the concept
- Scoring alternatives helps explain one component. The skill does not generate intermediate thought states or control breadth-first or depth-first search.
How it shows up when you use agents
An agent can propose several approaches, compare them and revisit an earlier choice after a test fails. This is an analogy for exploring alternatives, not enough to establish that it implements formal Tree of Thoughts search. Asking for three options alone does not provide a search controller or state-evaluation procedure. The formal framework sits one step beyond chain of thought, which follows a single line of reasoning. The related entry on reasoning models covers models that produce intermediate steps by themselves.
What breaks when it is misunderstood: people expect branching to help every task. IBM lists computational overhead, implementation complexity and search inefficiency as limits. For a simple edit, extra search may be unnecessary; test its value against the added inference work rather than assuming an improvement. The other mistake is trusting the self-evaluation: the model that scores a branch is the same kind of model that wrote it.
Next action: use branching for choices with real alternatives, such as a design decision or a refactor with several routes, and have the agent write the options and its reasons before it touches files. Judge the options yourself or with an explicit scoring step, as the idea-scoring-matrix skill does for brainstormed ideas. Compare the task-specific quality and resource use with a simpler approach before adopting a search framework.
Common confusions
- Tree of thoughts versus chain of thought. Chain of thought writes one sequence of steps. Tree of thoughts generates alternatives at each step, evaluates them and can backtrack, and its abstract says it generalises chain-of-thought prompting. See Chain of thought.
- Tree of thoughts versus a reasoning model. Tree of thoughts is a prompting and search framework from a research paper. A reasoning model is a model built to produce intermediate steps by itself. See Reasoning model.
- Brainstorming versus tree search. Listing options is only the generation part. Tree of thoughts also scores states and searches, breadth-first or depth-first, according to IBM.
- Better answers versus higher cost. The paper reports gains on specific tasks. Additional search can add inference work; the resource and monetary effects depend on implementation, model and service.
Related terms
More in Prompts and instructions
Sources
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models, arXiv (Yao et al.) (accessed 2026-11-24)
- What is Tree Of Thoughts Prompting?, IBM (accessed 2026-11-24)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by Claude (original draft) and OpenAI Codex (targeted revisions); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
- : Targeted batch-04 source repairs; qualified scope and illustration claims. Independent affected review pending; no publication approval.
- : First version.
- : Verifier pass: applied verifier corrections.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.