In this paper, we introduce the Tree-of-Thought (ToT) framework, a novel approach aimed at improving the problem-solving capabilities of auto-regressive large language models (LLMs). The ToT technique is inspired by the human mind's approach for solving complex reasoning tasks through trial and error. In this process, the human mind explores the solution space through a tree-like thought process, allowing for backtracking when necessary. To implement ToT as a software system, we augment an LLM with additional modules including a prompter agent, a checker module, a memory module, and a ToT controller. In order to solve a given problem, these modules engage in a multi-round conversation with the LLM. The memory module records the conversation and state history of the problem solving process, which allows the system to backtrack to the previous steps of the thought-process and explore other directions from there. To verify the effectiveness of the proposed technique, we implemented a ToT-based solver for the Sudoku Puzzle. Experimental results show that the ToT framework can significantly increase the success rate of Sudoku puzzle solving. Our implementation of the ToT-based Sudoku solver is available on GitHub: \url{https://github.com/jieyilong/tree-of-thought-puzzle-solver}.
翻译:在本文中,我们提出了思维树(Tree-of-Thought, ToT)框架,这是一种旨在提升自回归大语言模型问题解决能力的新方法。ToT技术受到人类通过试错解决复杂推理任务的思维方式的启发。在此过程中,人类通过树状思维过程探索解空间,并能在必要时进行回溯。为将ToT实现为软件系统,我们在LLM基础上增加了包括提示代理模块、检查模块、记忆模块和ToT控制器在内的附加模块。为解决特定问题,这些模块与LLM进行多轮对话。记忆模块记录问题解决过程中的对话和状态历史,使系统能够回溯到思维过程的先前步骤并从该处探索其他方向。为验证所提技术的有效性,我们实现了基于ToT的数独求解器。实验结果表明,ToT框架能显著提高数独谜题的求解成功率。我们基于ToT的数独求解器实现已在GitHub上开源:\url{https://github.com/jieyilong/tree-of-thought-puzzle-solver}。