title: Tree of Thoughts: Deliberate Problem Solving with Large Language Models
summary: 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/ysymyth/tree-of-thought-llm.
paper_authors._id: 6466f83f1343dce20e596a68
paper_authors.name: Shunyu Yao
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-05-22T14:57:27.314Z
paper_authors._id: 62aa3b8f46d66bafe2f55899
paper_authors.avatarUrl: /avatars/d45c6406042c3f6167153aba76d03776.svg
paper_authors.fullname: Shunyu Yao
paper_authors.type: user
paper_authors.user: ysymyth
paper_authors._id: 6466f83f1343dce20e596a69
paper_authors.name: Dian Yu
paper_authors._id: 6466f83f1343dce20e596a6a
paper_authors.name: Jeffrey Zhao
paper_authors._id: 6466f83f1343dce20e596a6b
paper_authors.name: Izhak Shafran
paper_authors._id: 6466f83f1343dce20e596a6c
paper_authors.name: Thomas L. Griffiths
paper_authors._id: 6466f83f1343dce20e596a6d
paper_authors.name: Yuan Cao
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-06-01T05:54:09.980Z
paper_authors._id: 6433a8c37b8247480105cf7f
paper_authors.avatarUrl: /avatars/a19536f3f3b8eae3609648bea112b381.svg
paper_authors.fullname: Yuan Cao
paper_authors.type: user
paper_authors.user: caoyuan33
paper_authors._id: 6466f83f1343dce20e596a6e
paper_authors.name: Karthik Narasimhan
paper_title: Tree of Thoughts: Deliberate Problem Solving with Large Language Models
paper_summary: 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/ysymyth/tree-of-thought-llm.
paper_ai_summary: The Tree of Thoughts framework enhances language models' problem-solving capabilities by enabling the exploration and evaluation of multiple reasoning paths and thoughts.
paper_ai_keywords: Tree of Thoughts Chain of Thought language model inference problem solving Game of 24 Creative Writing Mini Crosswords deliberate decision making self-evaluation reasoning paths lookahead backtracking global choices