As large language models (LLMs) have shown effectiveness with different prompting methods, such as Chain of Thought, Program of Thought, we find that these methods have formed a great complementarity to each other on math reasoning tasks. In this work, we propose XoT, an integrated problem solving framework by prompting LLMs with diverse reasoning thoughts. For each question, XoT always begins with selecting the most suitable method then executes each method iteratively. Within each iteration, XoT actively checks the validity of the generated answer and incorporates the feedback from external executors, allowing it to dynamically switch among different prompting methods. Through extensive experiments on 10 popular math reasoning datasets, we demonstrate the effectiveness of our proposed approach and thoroughly analyze the strengths of each module. Moreover, empirical results suggest that our framework is orthogonal to recent work that makes improvements on single reasoning methods and can further generalise to logical reasoning domain. By allowing method switching, XoT provides a fresh perspective on the collaborative integration of diverse reasoning thoughts in a unified framework. The code is available at https://github.com/tengxiaoliu/XoT.
翻译:随着大语言模型(LLMs)在思维链、程序化思维等不同提示方法中展现出有效性,我们发现这些方法在数学推理任务上形成了显著的互补性。本文提出XoT,一种通过多种推理思维提示LLMs的集成问题求解框架。对于每个问题,XoT首先选择最适配的方法,再逐步迭代执行各方法。在每次迭代中,XoT主动验证生成答案的有效性,并整合来自外部执行器的反馈,从而能够动态切换不同的提示方法。通过在10个主流数学推理数据集上的广泛实验,我们验证了所提方法的有效性,并深入分析了各模块的优势。此外,实证结果表明,该框架与近期针对单一推理方法的改进工作正交,并能进一步泛化至逻辑推理领域。通过允许方法切换,XoT为在统一框架中协作整合多样化推理思维提供了全新视角。代码见https://github.com/tengxiaoliu/XoT。