arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.10601cs.CLcs.AIcs.LG
收藏

思维树:利用大型语言模型进行深思熟虑的问题求解

Tree of Thoughts: Deliberate Problem Solving with Large Language Models

Princeton University(普林斯顿大学);Google DeepMind(谷歌DeepMind)

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

AI总结:

本文提出思维树(ToT)框架,通过多路径探索、自我评估、前瞻与回溯,使语言模型实现深思熟虑的决策,并在 24 点游戏等任务上显著超越思维链提示。

摘要:

语言模型正越来越多地被部署用于广泛任务中的通用问题求解,但在推理过程中仍局限于词元级、从左到右的决策过程。这意味着它们在需要探索、战略性前瞻或初始决策起关键作用的任务中可能表现不足。为了克服这些挑战,我们引入了一种新的语言模型推理框架——思维树(Tree of Thoughts,ToT),该框架推广了流行的思维链(Chain of Thought)提示方法,并支持对作为问题求解中间步骤的连贯文本单元(思维)进行探索。ToT 使语言模型能够通过考虑多条不同的推理路径并自我评估选择来决定下一步行动,同时在必要时进行前瞻或回溯以做出全局选择,从而实现深思熟虑的决策。我们的实验表明,ToT 在三个需要非平凡规划或搜索的新任务上显著增强了语言模型的问题求解能力:24 点游戏(Game of 24)、创意写作(Creative Writing)和迷你填字游戏(Mini Crosswords)。例如,在 24 点游戏中,使用思维链提示的 GPT-4 仅解决了 4% 的任务,而我们的方法达到了 74% 的成功率。代码仓库及所有提示:https://github.com/princeton-nlp/tree-of-thought-llm。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑