HackerPapers

arXiv:2305.10601cs.CL

Tree of Thoughts: Deliberate Problem Solving with Large Language Models

Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, Karthik Narasimhan

Abstract

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.

arXiv comments
NeurIPS 2023 camera ready version. Code repo with all prompts: https://github.com/princeton-nlp/tree-of-thought-llm
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 15 identifiable commenters in 15 comments across 12 threads, from May 2023 to Mar 2026. Found in 4 HN submissions from May 2023 to Jun 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments12 threads

    • I didn't compare with the harness (focused on distillation) but the original ToT paper has a section on it: https://arxiv.org/abs/2305.10601

      at2005View on HNParent context

    • I have. The failure is with you and your extracting only the mechanical functionality of LLMs as all an LLM is. The high level macro structure of what ends up being trained is something nobody understands. Regardless of WHAT I say, the general consensus among academia and…

      ninetyninenineView on HNParent context

    • This is not even remotely close and very silly. A ChainOfThought in a loop. TreeOfThoughts is a more sophisticated method, see - https://arxiv.org/pdf/2305.10601 The clue we all had with OpenAI for a long time that this was a search through a tree, they hired Noam Brown, and his…

      segmondyView on HNParent context

    • On backtracking, I thought tree-of-thought enabled that? "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"…

      richardwView on HNParent context

    • I'm really excited about Gemini. It's supposed to have some sort of planning and problem solving ability[2][3]. If it is like Tree of Thoughts [1], then I'm so hyped! Also take a peek at which institution most of the ToT authors are at. 1: https://arxiv.org/pdf/2305.10601.pdf 2…

      heliophobicdudeView on HNParent context

  1. Langchain Is Pointless 1 comment
    • Chain of thought: https://arxiv.org/abs/2201.11903 ReAct: https://arxiv.org/abs/2210.03629 Reflexion: https://arxiv.org/abs/2303.11366 Tree of thoughts: https://arxiv.org/abs/2305.10601 Good video on "Tree of thoughts" which also reviews / puts it in the context of other…

      krychuView on HNParent context

  2. LLM Powered Autonomous Agents 1 comment
    • I don't know how far "pure" next-token prediction can go with planning, although I wouldn't count them out until their performance starts noticeably plateauing. But the tree of thought architecture is a very similar concept to what you're discussing, you should definitely give…

      lucubratoryView on HNParent context

  3. Native JSON Output from GPT-4 1 comment
  4. Moderation strike 1 comment
    • > The goal of stack exchange is to create a repository of question answer pairs of knowledge. The problem here is that generational AI isn't able to create these new pairs. I'm not so sure about that. I think we are quite close to an AI being able to put two and two together to…

      eterevskyView on HNParent context

  5. Tree of Thoughts 4 comments
    • You buried the lede: https://arxiv.org/pdf/2305.10601.pdf

      dventimihasuraView on HNParent context

    • Note that the repo author != the paper author. The research itself [1] seems legit. The paper author also wrote a paper called ReAct [2], which is one of the core components of the langchain framework. * [1] https://arxiv.org/abs/2305.10601 * [2] https://arxiv.org/abs/2210.03629

      flakinessView on HNParent context

    • Interestingly a 2 days prior to https://arxiv.org/abs/2305.10601, someone released https://arxiv.org/abs/2305.08291 > Large Language Model Guided Tree-of-Thought > In this paper, we introduce the Tree-of-Thought (ToT) framework, a novel approach aimed at improving the…

      joshkaView on HNParent context

    • This is Shunyu, author of Tree oF Thoughts (arxiv.org/abs/2305.10601). The official code to replicate paper results is https://github.com/ysymyth/tree-of-thought-llm Not https://github.com/kyegomez/tree-of-thoughts which according to many who told me, is not right/good…

      ysymythView on HNParent context

    • I default to immediately asking GPT4 to review its solution and fix any mistakes it finds. There’s also an interesting paper about providing it guidance that it can make a “tree of thoughts” which allows it to move forward and backwards as it comes up with solutions then present…

      superbiomeView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.