Revisiting Demonstration Selection Strategies in In-Context Learning
Keqin Peng, Liang Ding, Yancheng Yuan, Xuebo Liu, Min Zhang, Yuanxin, Ouyang, Dacheng Tao

TL;DR
This paper investigates the factors influencing demonstration selection in in-context learning with large language models, proposing a new data- and model-dependent method, TopK + ConE, that improves performance across tasks.
Contribution
It introduces a novel demonstration selection method, TopK + ConE, based on the correlation between demonstration contribution and model understanding, enhancing ICL effectiveness.
Findings
Consistent improvements across language understanding and generation tasks
Demonstration choice depends on data and model factors
Provides a unified explanation for previous methods' effectiveness
Abstract
Large language models (LLMs) have shown an impressive ability to perform a wide range of tasks using in-context learning (ICL), where a few examples are used to describe a task to the model. However, the performance of ICL varies significantly with the choice of demonstrations, and it is still unclear why this happens or what factors will influence its choice. In this work, we first revisit the factors contributing to this variance from both data and model aspects, and find that the choice of demonstration is both data- and model-dependent. We further proposed a data- and model-dependent demonstration selection method, \textbf{TopK + ConE}, based on the assumption that \textit{the performance of a demonstration positively correlates with its contribution to the model's understanding of the test samples}, resulting in a simple and effective recipe for ICL. Empirically, our method yields…
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.
Code & Models
Videos
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Multimodal Machine Learning Applications
