title: Learning to Retrieve In-Context Examples for Large Language Models
summary: Large language models (LLMs) have demonstrated their ability to learn
  in-context, allowing them to perform various tasks based on a few input-output
  examples. However, the effectiveness of in-context learning is heavily reliant
  on the quality of the selected examples. In this paper, we propose a novel
  framework to iteratively train dense retrievers that can identify high-quality
  in-context examples for LLMs. Our framework initially trains a reward model
  based on LLM feedback to evaluate the quality of candidate examples, followed
  by knowledge distillation to train a bi-encoder based dense retriever. Our
  experiments on a suite of 30 tasks demonstrate that our framework significantly
  enhances in-context learning performance. Furthermore, we show the
  generalization ability of our framework to unseen tasks during training. An
  in-depth analysis reveals that our model improves performance by retrieving
  examples with similar patterns, and the gains are consistent across LLMs of
  varying sizes.
paper_authors._id: 64b4aa31966b28317e594464
paper_authors.name: Liang Wang
paper_authors.status: extracted_confirmed
paper_authors.statusLastChangedAt: 2023-07-17T02:47:46.883Z
paper_authors._id: 62343594c63d91cec1ca4a8d
paper_authors.avatarUrl: /avatars/5a1ee74c2dbe349a6ec9843a1599d281.svg
paper_authors.fullname: Liang Wang
paper_authors.type: user
paper_authors.user: intfloat
paper_authors._id: 64b4aa31966b28317e594465
paper_authors.name: Nan Yang
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-05-13T07:51:13.112Z
paper_authors._id: 6341342a9948f573f36d77da
paper_authors.avatarUrl: /avatars/813717cb180b2ce566421b43dadabb43.svg
paper_authors.fullname: nyanyanya
paper_authors.type: user
paper_authors.user: nyanyanya
paper_authors._id: 64b4aa31966b28317e594466
paper_authors.name: Furu Wei
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2023-07-17T10:39:39.872Z
paper_authors._id: 6368c512fbfe97c16a40baba
paper_authors.avatarUrl: /avatars/1c23bc7c0b6d9225699ce27647623d7a.svg
paper_authors.fullname: Furu Wei
paper_authors.type: user
paper_authors.user: thegenerality
paper_title: Learning to Retrieve In-Context Examples for Large Language Models
paper_summary: Large language models (LLMs) have demonstrated their ability to learn
  in-context, allowing them to perform various tasks based on a few input-output
  examples. However, the effectiveness of in-context learning is heavily reliant
  on the quality of the selected examples. In this paper, we propose a novel
  framework to iteratively train dense retrievers that can identify high-quality
  in-context examples for LLMs. Our framework initially trains a reward model
  based on LLM feedback to evaluate the quality of candidate examples, followed
  by knowledge distillation to train a bi-encoder based dense retriever. Our
  experiments on a suite of 30 tasks demonstrate that our framework significantly
  enhances in-context learning performance. Furthermore, we show the
  generalization ability of our framework to unseen tasks during training. An
  in-depth analysis reveals that our model improves performance by retrieving
  examples with similar patterns, and the gains are consistent across LLMs of
  varying sizes.
paper_ai_summary: A framework is proposed for training dense retrievers to select high-quality in-context examples for large language models, enhancing their performance across various tasks.
paper_ai_keywords: LLMs in-context learning dense retrievers reward model bi-encoder knowledge distillation