To enhance the reasoning capabilities of off-the-shelf Large Language Models (LLMs), we introduce a simple, yet general and effective prompting method, Re2, i.e., \textbf{Re}-\textbf{Re}ading the question as input. Unlike most thought-eliciting prompting methods, such as Chain-of-Thought (CoT), which aim to elicit the reasoning process in the output, Re2 shifts the focus to the input by processing questions twice, thereby enhancing the understanding process. Consequently, Re2 demonstrates strong generality and compatibility with most thought-eliciting prompting methods, including CoT. Crucially, Re2 facilitates a "bidirectional" encoding in unidirectional decoder-only LLMs because the first pass could provide global information for the second pass. We begin with a preliminary empirical study as the foundation of Re2, illustrating its potential to enable "bidirectional" attention mechanisms. We then evaluate Re2 on extensive reasoning benchmarks across 14 datasets, spanning 112 experiments, to validate its effectiveness and generality. Our findings indicate that, with the exception of a few scenarios on vanilla ChatGPT, Re2 consistently enhances the reasoning performance of LLMs through a simple re-reading strategy. Further analyses reveal Re2's adaptability, showing how it can be effectively integrated with different LLMs, thought-eliciting prompting, and ensemble strategies. Our code is available at \url{https://github.com/Tebmer/Rereading-LLM-Reasoning/}
翻译:为增强现成大型语言模型(LLMs)的推理能力,我们提出一种简单、通用且有效的提示方法——Re2,即对输入问题进行**重读**(\textbf{Re}-\textbf{Re}ading)。不同于多数旨在激发输出推理过程的思维引导型提示方法(如思维链CoT),Re2 通过将问题处理两次将焦点转向输入,从而增强理解过程。因此,Re2 展现出强大的通用性与兼容性,可与包括CoT在内的多数思维引导型提示方法结合使用。关键在于,Re2 使单向解码器式LLMs实现了“双向”编码——首次处理可为第二次处理提供全局信息。我们首先通过初步实证研究作为Re2的基础,论证其实现“双向”注意力机制的潜力。随后,我们在14个数据集上跨112项实验对Re2进行广泛推理基准评估,验证其有效性与通用性。结果表明,除原始ChatGPT的少数场景外,Re2 通过简单的重读策略持续增强LLMs的推理性能。进一步分析揭示Re2的适应性,展示其如何有效集成不同LLMs、思维引导型提示及集成策略。我们的代码开源在\url{https://github.com/Tebmer/Rereading-LLM-Reasoning/}。