大型语言模型作为类比推理器
Large Language Models as Analogical Reasoners
October 3, 2023
作者: Michihiro Yasunaga, Xinyun Chen, Yujia Li, Panupong Pasupat, Jure Leskovec, Percy Liang, Ed H. Chi, Denny Zhou
cs.AI
摘要
链式思维(CoT)提示对语言模型在推理任务中展现出令人印象深刻的性能,但通常需要推理过程的标记示例。在这项工作中,我们引入了一种新的提示方法,即类比提示(Analogical Prompting),旨在自动引导大型语言模型的推理过程。受类比推理启发,这是一种认知过程,人类在解决新问题时会借鉴相关的过去经验,我们的方法提示语言模型在解决给定问题之前自动生成相关示例或知识。这种方法具有几个优点:它消除了标记或检索示例的需要,提供了通用性和便利性;它还可以根据每个问题定制生成的示例和知识,提供了适应性。实验结果表明,我们的方法在各种推理任务中表现优于0-shot CoT和手动少样本 CoT,包括 GSM8K 和 MATH 中的数学问题求解,Codeforces 中的代码生成,以及 BIG-Bench 中的其他推理任务。
English
Chain-of-thought (CoT) prompting for language models demonstrates impressive
performance across reasoning tasks, but typically needs labeled exemplars of
the reasoning process. In this work, we introduce a new prompting approach,
Analogical Prompting, designed to automatically guide the reasoning process of
large language models. Inspired by analogical reasoning, a cognitive process in
which humans draw from relevant past experiences to tackle new problems, our
approach prompts language models to self-generate relevant exemplars or
knowledge in the context, before proceeding to solve the given problem. This
method presents several advantages: it obviates the need for labeling or
retrieving exemplars, offering generality and convenience; it can also tailor
the generated exemplars and knowledge to each problem, offering adaptability.
Experimental results show that our approach outperforms 0-shot CoT and manual
few-shot CoT in a variety of reasoning tasks, including math problem solving in
GSM8K and MATH, code generation in Codeforces, and other reasoning tasks in
BIG-Bench.