Skip to content
Last Dictionary

tree of thoughts

nounAlso: ToT, tree-of-thought prompting

In plain wordsA method in which an AI explores several possible next steps of a problem, judges which look promising and backs out of dead ends, like a chess player weighing moves, instead of reasoning in one straight line.

  1. A prompting framework that turns chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate. from a single line of reasoning into a search over many. A problem is split into steps; at each step the language modellanguage model, n.: A system that has learned how likely different sequences of words are, so it can predict the next word in a text and, by doing that repeatedly, write text of its own. proposes several candidate 'thoughts' (partial solutions), the same or another model rates how promising each resulting state is, and a classical search procedure — breadth-firstbreadth-first search, n.: A way of exploring a maze or network level by level — first every place one step away, then every place two steps away, and so on — so that the shortest route is found first. or depth-first searchdepth-first search, n.: A way of exploring a maze or network by following one path as far as it goes, then backing up to the most recent fork and trying the next branch. with pruning and backtracking — chooses which branches to pursue. The model can thus look ahead and abandon a bad start, which strictly left-to-right generation cannot do. In the original experiments on the Game of 24 arithmetic puzzle, GPT-4 succeeded on 74% of problems this way, against 4% with chain-of-thought prompting. The price is many more model calls; the approach influenced later search-based and agentic reasoning, though trained reasoning modelsreasoning model, n.: An AI model trained to work through a problem step by step in hidden 'thinking' text before it answers. Letting it think longer generally makes it better at math, coding and planning. now do much of this exploration within a single trace.

    We wrapped the planner in a tree-of-thoughts search so it could abandon bad itineraries early.

Origin

Introduced by Shunyu Yao and colleagues at Princeton University and Google DeepMind in 'Tree of Thoughts: Deliberate Problem Solving with Large Language Models' (May 2023; NeurIPS 2023), drawing on Allen Newell and Herbert Simon's account of problem solving as search. Jieyi Long independently proposed a similar tree-of-thought system the same month.

Related

See also
  • chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate.
  • self-consistencyself-consistency, n.: Asking an AI the same question many times, letting it reason differently each time, then going with the answer it reaches most often — a vote among its own attempts.
  • test-time computetest-time compute, n.: The computing effort an AI model spends while answering a question, as opposed to while being trained. Letting a model think longer or try many answers can make it markedly smarter.
  • state space searchstate space search, n.: Solving a problem by treating every situation it could be in as a point on a map, with each possible move as a road between points, and searching for a route from the start to a goal.
  • Monte Carlo tree searchMonte Carlo tree search, n.: A way for a game-playing program to choose a move by simulating many possible continuations, focusing on the most promising lines, and picking the move that worked out best on average.
  • reasoning modelreasoning model, n.: An AI model trained to work through a problem step by step in hidden 'thinking' text before it answers. Letting it think longer generally makes it better at math, coding and planning.

Sources

  1. Yao, S., Yu, D., Zhao, J., Shafran, I., Griffiths, T. L., Cao, Y. & Narasimhan, K. (2023). Tree of Thoughts: Deliberate Problem Solving with Large Language Models. NeurIPS 2023. arxiv.org/abs/2305.10601

Mentioned in

chain of thoughtchain of thought, n.: Getting an AI to write out its reasoning step by step before giving an answer, the way a student shows their working. This often makes answers to math and logic problems more accurate., self-consistencyself-consistency, n.: Asking an AI the same question many times, letting it reason differently each time, then going with the answer it reaches most often — a vote among its own attempts., state space searchstate space search, n.: Solving a problem by treating every situation it could be in as a point on a map, with each possible move as a road between points, and searching for a route from the start to a goal., test-time computetest-time compute, n.: The computing effort an AI model spends while answering a question, as opposed to while being trained. Letting a model think longer or try many answers can make it markedly smarter., least-to-most promptingleast-to-most prompting, n.: A prompting method that has an AI list the smaller questions a hard problem depends on, answer the easiest first, and feed each answer into the next, building up to the full solution.