ChatPaper.aiChatPaper

思考の木:大規模言語モデルを用いた意図的な問題解決

Tree of Thoughts: Deliberate Problem Solving with Large Language Models

May 17, 2023
著者: Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L. Griffiths, Yuan Cao, Karthik Narasimhan
cs.AI

要旨

言語モデルは、幅広いタスクにおける一般的な問題解決のためにますます活用されていますが、推論時には依然としてトークンレベルの左から右への意思決定プロセスに限定されています。これは、探索や戦略的な先読みが必要なタスク、または初期の決定が重要な役割を果たすタスクにおいて、モデルが不十分な結果を出す可能性があることを意味します。これらの課題を克服するため、我々は言語モデル推論の新しいフレームワーク「Tree of Thoughts(ToT)」を提案します。ToTは、言語モデルのプロンプティング手法として広く使われているChain of Thoughtアプローチを一般化し、問題解決に向けた中間ステップとして機能する一貫したテキストの単位(思考)を探索できるようにします。ToTにより、言語モデルは複数の異なる推論パスを考慮し、自己評価を行って次の行動を決定する意図的な意思決定が可能になります。また、必要に応じて先読みやバックトラッキングを行い、グローバルな選択を行うこともできます。我々の実験では、ToTが非自明な計画や探索を必要とする3つの新しいタスク(Game of 24、Creative Writing、Mini Crosswords)において、言語モデルの問題解決能力を大幅に向上させることが示されました。例えば、Game of 24では、Chain of Thoughtプロンプティングを用いたGPT-4が4%のタスクしか解決できなかったのに対し、我々の手法は74%の成功率を達成しました。すべてのプロンプトを含むコードリポジトリはこちら:https://github.com/ysymyth/tree-of-thought-llm。
English
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.
PDF121December 15, 2024