Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Learning To Retrieve Prompts for In-Context Learning

About

In-context learning is a recent paradigm in natural language understanding, where a large pre-trained language model (LM) observes a test instance and a few training examples as its input, and directly decodes the output without any update to its parameters. However, performance has been shown to strongly depend on the selected training examples (termed prompt). In this work, we propose an efficient method for retrieving prompts for in-context learning using annotated data and a LM. Given an input-output pair, we estimate the probability of the output given the input and a candidate training example as the prompt, and label training examples as positive or negative based on this probability. We then train an efficient dense retriever from this data, which is used to retrieve training examples as prompts at test time. We evaluate our approach on three sequence-to-sequence tasks where language utterances are mapped to meaning representations, and find that it substantially outperforms prior work and multiple baselines across the board.

Ohad Rubin, Jonathan Herzig, Jonathan Berant• 2021

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningHellaSwag
Accuracy86.22
1891
Natural Language InferenceRTE
Accuracy66.8
448
Physical Interaction Question AnsweringPIQA
Accuracy55.55
333
Boolean Question AnsweringBoolQ
Accuracy70.7
323
Question AnsweringOBQA
Accuracy38.07
300
Reading ComprehensionBoolQ
Accuracy74.8
279
Topic ClassificationAG-News
Accuracy91.8
225
Common Sense ReasoningCOPA
Accuracy82
197
Common Sense ReasoningWinoGrande
Accuracy51.7
189
Multiple-choice Question AnsweringARC Easy
Accuracy51.81
188
Showing 10 of 62 rows

Other info

Follow for update