Skip to content
Back to the collection

Tree of Thoughts: Deliberate Problem Solving with Large Language Models

Shunyu Yao, Dian Yu, Jeffrey Zhao

Show all 7 authors

Izhak Shafran, Thomas L. Griffiths, Yuan Cao, Karthik Narasimhan

2023 · arXiv

Read the paper
HN score
1
Mentions
11
Readers
11
Months
7
What’s in a score?

From the 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.

Metadata: arXiv. Abstracts retain their original authors’ rights.

In the conversation

Original HN comments, with labels from simple text rules. A label describes the whole comment and may miss context or irony. Read the discussion to make up your own mind. About the labels

11 selected excerpts · 11 total mentions

superbiome
Recommendation · rule
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 its best solution to you. The paper suggests you can squeeze a lot more performance out of LLM’s (even smaller ones) this way. I’ve been wanting to experiment with my prompting in this fashion: https://arxiv.org/pdf/2305.10601.pdf
ninetyninenine
Neutral mention · rule
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 professionals is extremely different from what you characterize. I can cite dozens of research papers contrary to your point in a simple google search: https://www.sciencedirect.com/science/article/pii/S016028962... https://www.topbots.com/llm-reasoning-research-papers/ https://arxiv.org/abs/2305.10601 https://arxiv.org/abs/2205.10625 https://arxiv.org/abs/2205.15241 The fact that these research papers exist is testament against your delusional claim that you completely understand how LLMs work just by reading Attention is all you need.
segmondy
Neutral mention · rule
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 past work all hinted towards that. Q, is obviously a search on a tree like A. So take something like CoT, build out a tree, search for the best solution across it. The search is the "system-2 reasoning"
richardw
Neutral mention · rule
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" https://arxiv.org/abs/2305.10601 Generally with you though, this thing is not leading to real smarts and that's accepted by many. Yes, it'll fill in a few gaps with exponentially more compute but it's more likely that an algo change is required once we've maxed out LLM's.
heliophobicdude
Neutral mention · rule
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: https://blog.google/technology/ai/google-io-2023-keynote-sun... 3: https://www.wired.com/story/google-deepmind-demis-hassabis-c...
krychu
Neutral mention · rule
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 methods: https://www.youtube.com/watch?v=ut5kp56wW_4 Completion vs conversational interface is something you can read about in the OpenAI API documentation. For the remaining things I don't have single specific pointer at hand.
lucubratory
Neutral mention · rule
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 it a read: https://arxiv.org/abs/2305.10601 It's not everything involved in traditional planning, but it may be a framework to use more traditional planning algorithms on LLM output.
eterevsky
Neutral mention · rule
> 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 create something marginally new. Maybe not an LLM by itself, but with some high-level iterative/recursive process like this: https://arxiv.org/pdf/2305.10601.pdf. What I'm saying is that no-AI policy maybe made sense in late 2022, but will not necessarily hold in late 2023.
joshka
Neutral mention · rule
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 problem-solving capabilities of auto-regressive large language models (LLMs). The ToT technique is inspired by the human mind's approach for solving complex reasoning tasks through trial and error. In this process, the human mind explores the solution space through a tree-like thought process, allowing for backtracking when necessary. To implement ToT as a software system, we augment an LLM with additional…
Read the full comment
modules including a prompter agent, a checker module, a memory module, and a ToT controller. In order to solve a given problem, these modules engage in a multi-round conversation with the LLM. The memory module records the conversation and state history of the problem solving process, which allows the system to backtrack to the previous steps of the thought-process and explore other directions from there. To verify the effectiveness of the proposed technique, we implemented a ToT-based solver for the Sudoku Puzzle. Experimental results show that the ToT framework can significantly increase the success rate of Sudoku puzzle solving. Our implementation of the ToT-based Sudoku solver is available on GitHub: I don't recall whether it was this paper, or another that I read that talks about using the LLM's ability to also show the probabilities of each token to measure the validity of the particular completions. However that isn't exposed in the OpenAI chat APIs (GPT-Turbo-3.5 / GPT-4), just the completions APIs (Text-Davinci-003 etc.)
flakiness
Neutral mention · rule
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

Keep following the thread.

More in Language models

More from the same topics.

2018arXiv

Talent vs Luck: the role of randomness in success and failure

A. Pluchino. A. E. Biondo, A. Rapisarda

The largely dominant meritocratic paradigm of highly competitive Western cultures is rooted on the belief that success is due mainly, if not exclusively, to personal qualities such as talent, intelligence, skills, efforts or risk taking.

16 mentions14 months
2.5HN score