arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2101.06804cs.CL
收藏

GPT - $3$的好上下文示例是什么?

What Makes Good In-Context Examples for GPT-$3$?

Duke University(杜克大学);Microsoft Dynamics 365 AI(微软Dynamics 365人工智能部门);Microsoft Research(微软研究院)

Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, Weizhu Chen

摘要:

GPT- $3$由于其在各种NLP任务中的卓越性能而引起了广泛的关注,特别是其强大而通用的上下文少样本学习能力。尽管它的成功,我们发现,GPT- $3$的实证结果在很大程度上取决于上下文的例子的选择。在这项工作中,我们调查是否有更有效的策略,明智地选择在上下文中的例子(相对于随机抽样),更好地利用$3$的Few-Shot的能力。受最近成功利用检索模块来增强大规模神经网络模型的启发,我们提出检索与测试样本语义相似的示例来制定相应的提示。直观地,用这种策略选择的上下文中的示例可以用作更多信息输入以释放GPT- $3$的广泛知识。我们评估所提出的方法在几个自然语言理解和生成基准,检索为基础的提示选择方法始终优于随机基线。此外,据观察,句子编码器微调任务相关的数据集产生更有帮助的检索结果。值得注意的是,在表到文本生成(ToTTo数据集上为41.9%)和开放域问答(NQ数据集上为45.5%)等任务上观察到了显着的收益。我们希望我们的研究可以帮助理解$3$和大规模预训练LM的行为,并提高它们的Few-Shot能力。

英文摘要:

GPT-$3$ has attracted lots of attention due to its superior performance across a wide range of NLP tasks, especially with its powerful and versatile in-context few-shot learning ability. Despite its success, we found that the empirical results of GPT-$3$ depend heavily on the choice of in-context examples. In this work, we investigate whether there are more effective strategies for judiciously selecting in-context examples (relative to random sampling) that better leverage GPT-$3$'s few-shot capabilities. Inspired by the recent success of leveraging a retrieval module to augment large-scale neural network models, we propose to retrieve examples that are semantically-similar to a test sample to formulate its corresponding prompt. Intuitively, the in-context examples selected with such a strategy may serve as more informative inputs to unleash GPT-$3$'s extensive knowledge. We evaluate the proposed approach on several natural language understanding and generation benchmarks, where the retrieval-based prompt selection approach consistently outperforms the random baseline. Moreover, it is observed that the sentence encoders fine-tuned on task-related datasets yield even more helpful retrieval results. Notably, significant gains are observed on tasks such as table-to-text generation (41.9% on the ToTTo dataset) and open-domain question answering (45.5% on the NQ dataset). We hope our investigation could help understand the behaviors of GPT-$3$ and large-scale pre-trained LMs in general and enhance their few-shot capabilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑