TensorX
返回文献探索

Paper · arXiv 2310.01714

Large Language Models as Analogical Reasoners

Michihiro Yasunaga, Xinyun Chen, Yujia Li, Panupong Pasupat, Jure Leskovec, Percy Liang, Ed H. Chi, Denny Zhou

16 upvotesOctober 3, 2023arXiv 预印本
AI 摘要

Analogical Prompting enhances language model performance in reasoning tasks by self-generating relevant exemplars without labeled data.

Analogical Promptinganalogical reasoninggenerative modelsGSM8KMATHCodeforcesBIG-Benchreasoning taskscode generation

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Large Language Models as Analogical Reasoners | TensorX