paper-with-me

홈 › Papers

In-Context Learning with Iterative Demonstration Selection

2023-10-15 · Chengwei Qin, Aston Zhang, Chen Chen, Anirudh Dagar, Wenming Ye

Spurred by advancements in scale, large language models (LLMs) have demonstrated strong few-shot learning ability via in-context learning (ICL). However, the performance of ICL has been shown to be highly sensitive to the selection of few-shot demonstrations. Selecting the most suitable examples as context remains an ongoing challenge and an open problem. Existing literature has highlighted the importance of selecting examples that are diverse or semantically similar to the test sample while ignoring the fact that the optimal selection dimension, i.e., diversity or similarity, is task-specific. Based on how the test sample is answered, we propose Iterative Demonstration Selection (IDS) to leverage the merits of both dimensions. Using zero-shot chain-of-thought reasoning (Zero-shot-CoT), IDS iteratively selects examples that are diverse but still strongly correlated with the test sample as ICL demonstrations. Specifically, IDS applies Zero-shot-CoT to the test sample before demonstration selection. The output reasoning path is then used to choose demonstrations that are prepended to the test sample for inference. The generated answer is followed by its corresponding reasoning path for extracting a new set of demonstrations in the next iteration. After several iterations, IDS adopts majority voting to obtain the final result. Through extensive experiments on tasks including reasoning, question answering, and topic classification, we demonstrate that IDS can consistently outperform existing ICL demonstration selection methods.

📄 PDF Abstract BibTeX arXiv:2310.09881

Code (1)

tizzzzy/demonstration_selection_overview pytorch

Tasks

Few-Shot LearningIn-Context LearningQuestion AnsweringSentiment AnalysisTopic Classification

Similar Papers 제목 키워드 기반

Iterative Forward Tuning Boosts In-Context Learning in Language Models

2023-05-22 · Jiaxi Yang, Binyuan Hui, Min Yang, Bailin Wang 외

Despite the advancements in in-context learning (ICL) for large language models (LLMs), current research centers on specific prompt engineering, such as demonstration selection, with the expectation that a single iterati…

Decision MakingIn-Context LearningMultiple-choicePrompt Engineering

Scaling Laws for Many-Shot In-Context Learning with Self-Generated Annotations

2025-03-04 · Zhengyao Gu, Henry Peng Zou, Yankai Chen, Aiwei Liu 외

The high cost of obtaining high-quality annotated data for in-context learning (ICL) has motivated the development of methods that use self-generated annotations in place of ground-truth labels. While these approaches ha…

In-Context Learning

Misconfidence-based Demonstration Selection for LLM In-Context Learning

2024-01-12 · Shangqing Xu, Chao Zhang

In-context learning with large language models (LLMs) excels at adapting to various tasks rapidly. However, its success hinges on carefully selecting demonstrations, which remains an obstacle in practice. Current approac…

In-Context Learning

DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Task

2024-06-24 · Wenhan Liu, Yutao Zhu, Zhicheng Dou

Recently, there has been increasing interest in applying large language models (LLMs) as zero-shot passage rankers. However, few studies have explored how to select appropriate in-context demonstrations for the passage r…

In-Context LearningPassage Ranking

Learn to Select: Exploring Label Distribution Divergence for In-Context Demonstration Selection in Text Classification

2025-11-10 · Ye Jiang, Taihang Wang, Youzheng Liu, Yimin Wang 외 arxiv

In-context learning (ICL) for text classification, which uses a few input-label demonstrations to describe a task, has demonstrated impressive performance on large language models (LLMs). However, the selection of in-con…

Semantic SimilarityText Classification