Learning to Retrieve In-Context Examples for Large Language Models

AI-generated keywords: Large language models

AI-generated Key Points

  • Large Language Models (LLMs) have impressive in-context learning abilities
  • In-context learning relies on the quality of selected examples
  • Proposed framework trains dense retrievers to identify high-quality in-context examples for LLMs
  • Uses knowledge distillation and a reward model based on LLM feedback
  • Experimental results show significant improvements in in-context learning performance across 30 tasks
  • Model improves performance by retrieving examples with similar patterns
  • Quality of evaluation LLM has a greater impact on final performance than ranking LLM
  • Increasing the number of examples and retriever size leads to improved performance
  • Outperforms several baselines across various tasks such as close QA, commonsense reasoning, coreference resolution, NLI, paraphrasing, reading comprehension, sentiment analysis, data-to-text generation, and summarization
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Liang Wang, Nan Yang, Furu Wei

16 pages
License: CC BY 4.0

Abstract: 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.

Submitted to arXiv on 14 Jul. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2307.07164v1

, , , , Large Language Models, In-Context Learning, Dense Retrievers, Knowledge Distillation, Generalization Ability In recent years, Large Language Models (LLMs) have demonstrated their impressive ability to learn in-context and perform various tasks with only a few input-output examples. However, the effectiveness of this in-context learning heavily relies on the quality of selected examples. To address this issue, the authors propose a novel framework for training dense retrievers that can identify high-quality in-context examples for LLMs. This involves training a reward model based on LLM feedback to evaluate candidate examples and using knowledge distillation to train a bi-encoder based dense retriever. Experimental results on 30 tasks show that the proposed framework significantly enhances in-context learning performance and exhibits generalization ability to unseen tasks during training. Further analysis reveals that the model improves performance by retrieving examples with similar patterns, and these gains are consistent across LLMs of different sizes. The authors also investigate the impacts of using different LLMs for candidate ranking and task evaluation, finding that the quality of the evaluation LLM has a greater impact on final performance compared to the choice of ranking LLM. Additionally, they explore scaling effects with respect to the number of in-context examples and retriever size, finding that increasing both leads to improved performance. Overall, these results demonstrate that the proposed framework outperforms several baselines across various tasks such as close QA, commonsense reasoning, coreference resolution, NLI, paraphrasing, reading comprehension, sentiment analysis, data-to-text generation and summarization. In conclusion,<kgd> this paper presents a novel framework for training dense retrievers to identify high-quality in-context examples for LLMs. The experimental results demonstrate significant improvements in in-context learning performance across various tasks, showcasing the potential of this approach. Furthermore, the proposed framework exhibits generalization ability and consistent gains across different LLM sizes, making it a promising direction for future research.
Created on 05 Jan. 2024

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.