Learning To Retrieve Prompts for In-Context Learning

By Ohad Rubin, Jonathan Herzig, Jonathan Berant. 2021

945 citations recorded by the source corpus.

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 prompts). In this work, we propose an efficient method for retrieving prompts for in-context learning using annotated data and an 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.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Prompting & Reasoning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Luke S. Zettlemoyer
  2. Mohit Bansal
  3. Percy Liang
  4. Hannaneh Hajishirzi
  5. Graham Neubig
  6. Jianfeng Gao
  7. Yejin Choi
  8. Noah A. Smith

In Computer Vision and Pattern Recognition

  1. Hannaneh Hajishirzi
  2. Mohit Bansal
  3. Luc Van Gool
  4. Luke S. Zettlemoyer
  5. Dacheng Tao
  6. Jianfeng Gao
  7. Trevor Darrell
  8. Quoc V. Le

In Prompting & Reasoning

  1. Denny Zhou
  2. Luke S. Zettlemoyer
  3. Tushar Khot
  4. Hannaneh Hajishirzi
  5. Ashish Sabharwal
  6. Jason Wei
  7. Peter Clark
  8. Yao Fu

Citations in the corpus