What Makes Good In-Context Examples for GPT-$3$?
Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin,, Weizhu Chen

TL;DR
This paper explores a retrieval-based method for selecting in-context examples for GPT-3, demonstrating that semantically similar examples improve performance across NLP tasks compared to random sampling.
Contribution
It introduces a retrieval strategy for in-context example selection that leverages semantic similarity, significantly enhancing GPT-3's few-shot learning effectiveness.
Findings
Retrieval-based example selection outperforms random sampling.
Fine-tuned sentence encoders improve retrieval quality.
Significant performance gains on table-to-text and question answering tasks.
Abstract
GPT- 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- 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-'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-'s extensive knowledge. We evaluate…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Machine Learning in Healthcare
