大型語言模型作為類比推理者
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.