Tree of Thoughts: Deliberate Problem Solving with Large Language Models
Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023))
Subscriber deck — free during early access
6 cards in “3 Tree of Thoughts: Deliberate Problem Solving with LM” · whole deck
3 Tree of Thoughts: Deliberate Problem Solving with LM
- What is a “thought” in Tree of Thoughts, and how big should it be?A coherent language sequence that is an intermediate step toward a solution: a few words (crosswords), one equation (Game of 24), or a paragraph-long plan (creative writing). It should be small enough to generate diverse, promising candidates, but big enough for the model to judge its promise.
- Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
- What four questions define an instance of Tree of Thoughts?How to decompose the process into thought steps; how to generate candidate thoughts from a state; how to evaluate states heuristically; and which search algorithm to use. A state \(s = [x, z_{1 \ldots i}]\) is the input plus the thoughts so far.
The model proposes next steps and judges each state; the search expands only promising ones (invented Game of 24 example) - Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
- What two ways of generating thoughts does Tree of Thoughts use, and when does each fit?Sampling i.i.d. thoughts from a CoT prompt, good when the thought space is rich (e.g. paragraphs) so samples differ; or proposing several thoughts at once with a “propose prompt”, good when the space is constrained (a word or an equation) so independent samples would duplicate.
- Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
- How does Tree of Thoughts evaluate states, and why is this new?The language model itself reasons about states, either valuing each (e.g. a score, or sure/maybe/impossible, via quick lookahead and commonsense such as “1 2 3 are too small to reach 24”) or voting for the most promising among several. Earlier search heuristics were either programmed (Deep Blue) or learned (AlphaGo).
- Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
- Which search algorithms does Tree of Thoughts use?Breadth-first search keeping the \(b\) best states per step (shallow trees: Game of 24, creative writing), and depth-first search exploring the most promising state first, pruning subtrees judged impossible and backtracking (crosswords). A* and MCTS are left for future work.
- Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
- Why do Yao et al. say Tree of Thoughts generalizes earlier prompting methods?IO, CoT, CoT-SC and self-refinement are special cases: trees of limited depth and breadth. The model, decomposition, generation, evaluation and search can each be varied independently, and no training is needed.
- Yao et al., 2023, Tree of Thoughts (Advances in Neural Information Processing Systems 36 (NeurIPS 2023)), §3
Source
- Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao and Karthik Narasimhan. 2023. Tree of Thoughts: Deliberate Problem Solving with Large Language Models. In Advances in Neural Information Processing Systems 36 (NeurIPS 2023). https://papers.nips.cc/paper_files/paper/2023/hash/271db9922b8d1f4dd7aaef84ed5ac703-Abstract-Conference.html