Tree of Thoughts: Deliberate Problem Solving with Large Language Models

Tree of Thoughts: Deliberate Problem Solving with Large Language Models
复制标题

DOI:
10.48550/arxiv.2305.10601
复制
发表时间:
2023-05
期刊:
ArXiv
影响因子:
--
通讯作者:
Shunyu Yao;Dian Yu;Jeffrey Zhao;Izhak Shafran;T. Griffiths;Yuan Cao;Karthik Narasimhan
Shunyu Yao;Dian Yu;Jeffrey Zhao;Izhak Shafran;T. Griffiths;Yuan Cao;Karthik Narasimhan
中科院分区:
其他
文献类型:
--
作者:
Shunyu Yao;Dian Yu;Jeffrey Zhao;Izhak Shafran;T. Griffiths;Yuan Cao;Karthik Narasimhan

文献摘要

被引文献

相似文献

语言模型越来越多地用于在广泛的任务中解决一般问题,但仍局限于推理期间的代币级别,从左到右的决策过程。这意味着他们可以缺乏需要探索,战略性lookahead或初始决策起着关键作用的任务。为了克服这些挑战,我们为语言模型推理,思想树(TOT)介绍了一个新的框架,该框架概括了促使语言模型的流行思想链,并可以对文本(思想)的连贯单位进行探索中间步骤解决问题。 TOT允许LMS通过考虑多个不同的推理路径和自我评估选择来决定下一步的行动方案,并在必要时向前看或回溯以做出全球选择,从而执行了故意的决策。我们的实验表明,TOT可以显着增强语言模型在需要非平凡计划或搜索的三个新任务上解决问题的能力:24,创意写作和迷你填字游戏的游戏。例如,在24个游戏中,gpt-4带有思想链仅解决了4%的任务,但我们的方法达到了74%的成功率。带有所有提示的代码回购:https://github.com/princeton-nlp/tree-of-thougch-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.