The Role of Diversity in In-Context Learning for Large Language Models
Wenyang Xiao, Haoyu Zhao, Lingxiao Huang

TL;DR
This paper investigates how diversity in example selection affects in-context learning performance of large language models, showing that diversity-aware methods improve accuracy and robustness, especially on complex tasks.
Contribution
It introduces a systematic study and a theoretical framework demonstrating the benefits of diversity in in-context example selection for large language models.
Findings
Diversity-aware selection improves performance on complex tasks.
Diversity enhances robustness to out-of-distribution queries.
Experimental results across multiple models support the benefits of diversity.
Abstract
In-context learning (ICL) is a crucial capability of current large language models (LLMs), where the selection of examples plays a key role in performance. While most existing approaches focus on selecting the most similar examples to the query, the impact of diversity in example selection remains underexplored. We systematically investigate the role of diversity in in-context example selection through experiments across a range of tasks, from sentiment classification to more challenging math and code problems. Experiments on Llama-3.1, Gemma-2, and Mistral-v0.3 families of models show that diversity-aware selection methods improve performance, particularly on complex tasks like math and code, and enhance robustness to out-of-distribution queries. To support these findings, we introduce a theoretical framework that explains the benefits of incorporating diversity in in-context example…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Text Readability and Simplification
MethodsFocus
