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

Tree of Thoughts: Deliberate Problem Solving with Large Language Models

姚顺雨 Shunyu Yao · Princeton University / Google DeepMind · 2023-05-17 · arXiv:2305.10601 ↗ · 被引 4489

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

语言模型越来越多地被部署用于各种任务的通用问题解决,但在推理过程中仍局限于词级别的从左到右决策过程。这意味着它们在需要探索、战略性前瞻或初始决策起关键作用的任务中可能表现不佳。为了克服这些挑战,我们引入了一种新的语言模型推理框架——思维树(ToT),它推广了流行的思维链提示方法,使模型能够探索作为问题解决中间步骤的连贯文本单元(思维)。ToT 允许语言模型通过考虑多个不同的推理路径和自我评估选择来决定下一步行动,并在必要时进行前瞻或回溯以做出全局选择。我们的实验表明,ToT 在三个需要非平凡规划或搜索的新任务上显著增强了语言模型的问题解决能力:24 点游戏、创意写作和迷你填字游戏。例如,在 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.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 12)

阅读逐段中英对照全文 →