Comparative Analysis of Demonstration Selection Algorithms for LLM In-Context Learning
Not on the map. Why?
Abstract (arXiv)
In-context learning can help Large Language Models (LLMs) to adapt new tasks without additional training. However, this performance heavily depends on the quality of the demonstrations, driving research into effective demonstration selection algorithms to optimize this process. These algorithms assist users in selecting the best k input-label pairs (demonstration examples) based on a given test input, enabling LLMs to in-context learn the relationship between the provided examples and the test inputs. Despite all the proposed demonstration selection algorithms, their efficiency and effectiveness remain unclear. This lack of clarity make it difficult to apply these algorithms in real-world scenarios and poses challenges for future research aimed at developing improved methods. This paper revisits six proposed algorithms, evaluating them on five datasets from both efficiency and effectiveness perspectives. Our experiments reveal significant variations in algorithm performance across different tasks, with some methods struggling to outperform random selection in certain scenarios. We also find that increasing the number of demonstrations does not always lead to better performance, and that there are often trade-offs between accuracy and computational efficiency. Our code is available at https://github.com/Tizzzzy/DemonstrationSelectionOverview.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 20 of its 23 references that are in the map. First posted on arXiv 30 Oct 2024.
Builds on
20 of 23 references.
References · 20
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,793
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2021MetaICL: Learning to Learn In Contextcited by 450
- 2018SWAG: A Large-Scale Adversarial Dataset for Grounded Commonsense Inferencecited by 333
- 2020Evaluation of Text Generation: A Surveycited by 275
- 2022Active Example Selection for In-Context Learningcited by 195
- 2023Large Language Models Are Latent Variable Models: Explaining and Finding Good Demonstrations for In-Context Learningcited by 149
- 2023Unified Demonstration Retriever for In-Context Learningcited by 141
8 more
- 2023UPRISE: Universal Prompt Retrieval for Improving Zero-Shot Evaluationcited by 74
- 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
- 2024In-context Learning with Retrieved Demonstrations for Language Models: A Surveycited by 69
- 2023OpenICL: An Open-Source Framework for In-context Learningcited by 51
- 2024DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Taskcited by 17
- 2024In-Context Learning Demonstration Selection via Influence Analysiscited by 11
- 2024Unraveling the Mechanics of Learning-Based Demonstration Selection for In-Context Learningcited by 9
- 2024Enhancing In-Context Learning via Implicit Demonstration Augmentationcited by 6
Built on by
Citing papers per year: 2025: 3.
3 papers.