Pretrained large language models (LLMs) are widely used in many sub-fields of natural language processing (NLP) and generally known as excellent few-shot learners with task-specific exemplars. Notably, chain of thought (CoT) prompting, a recent technique for eliciting complex multi-step reasoning through step-by-step answer examples, achieved the state-of-the-art performances in arithmetics and symbolic reasoning, difficult system-2 tasks that do not follow the standard scaling laws for LLMs. While these successes are often attributed to LLMs' ability for few-shot learning, we show that LLMs are decent zero-shot reasoners by simply adding "Let's think step by step" before each answer. Experimental results demonstrate that our Zero-shot-CoT, using the same single prompt template, significantly outperforms zero-shot LLM performances on diverse benchmark reasoning tasks including arithmetics (MultiArith, GSM8K, AQUA-RAT, SVAMP), symbolic reasoning (Last Letter, Coin Flip), and other logical reasoning tasks (Date Understanding, Tracking Shuffled Objects), without any hand-crafted few-shot examples, e.g. increasing the accuracy on MultiArith from 17.7% to 78.7% and GSM8K from 10.4% to 40.7% with large InstructGPT model (text-davinci-002), as well as similar magnitudes of improvements with another off-the-shelf large model, 540B parameter PaLM. The versatility of this single prompt across very diverse reasoning tasks hints at untapped and understudied fundamental zero-shot capabilities of LLMs, suggesting high-level, multi-task broad cognitive capabilities may be extracted by simple prompting. We hope our work not only serves as the minimal strongest zero-shot baseline for the challenging reasoning benchmarks, but also highlights the importance of carefully exploring and analyzing the enormous zero-shot knowledge hidden inside LLMs before crafting finetuning datasets or few-shot exemplars.
翻译:预训练的大型语言模型(LLMs)广泛应用于自然语言处理(NLP)的诸多子领域,通常被认为是具备任务特定示例的卓越小样本学习器。值得注意的是,思维链(CoT)提示——一种通过逐步回答示例引出复杂多步推理的最新方法——在算术与符号推理等不符合LLMs标准缩放定律的困难系统2任务上取得了最先进性能。尽管这些成功常被归因于LLMs的小样本学习能力,但我们证明,仅需在每个答案前添加"让我们一步一步思考",LLMs即可成为出色的零样本推理器。实验结果表明,我们的Zero-shot-CoT采用相同的单一提示模板,在多样化的基准推理任务(包括算术推理:MultiArith、GSM8K、AQUA-RAT、SVAMP;符号推理:Last Letter、Coin Flip;以及其他逻辑推理任务:Date Understanding、Tracking Shuffled Objects)中显著超越零样本LLM性能,且无需任何人工设计的小样本示例。例如,使用大型InstructGPT模型(text-davinci-002)时,MultiArith上的准确率从17.7%提升至78.7%,GSM8K从10.4%提升至40.7%;使用另一现成大型模型——540B参数的PaLM,也获得了同等量级的提升。这一单一提示在极其多样化的推理任务中的通用性,暗示了LLMs尚未被开发且未被充分研究的根本性零样本能力,表明高层次、多任务的广泛认知能力可通过简单提示来激发。我们希望这项工作不仅能作为具有挑战性推理基准的最强零样本基线,更能强调在构建微调数据集或小样本示例之前,深入探索和分析隐藏在LLMs中的海量零样本知识的重要性。