Lune

EMNLP Findings2024

In-Context Learning with Iterative Demonstration Selection

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.

问 Lune

尽管问,回答会引用原文。

Lune 会读完全文和相关的 Paper,每个回答都附上所依据的原文段落。

可以从这些问题问起

Lune 的依据

全文 · 引用它的 11 篇顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

引用它的顶会 Paper11

  1. A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng 等EMNLP 2024 · 479 次引用
  2. On the Noise Robustness of In-Context Learning for Text GenerationHongfu Gao, Feipeng Zhang, Wenyu Jiang, Jun Shu 等NeurIPS 2024 · 20 次引用
  3. What Makes a Good Natural Language Prompt?Do Xuan Long, Duy Dinh, Ngoc-Hai Nguyen, Kenji Kawaguchi 等ACL 2025 · 13 次引用
  4. Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context LearningChengwei Qin, Wenhan Xia, Fangkai Jiao, Chen Chen 等ACL 2025 · 7 次引用
  5. DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge TransferRuoyu Wang, Junda Wu, Yu Xia, Tong Yu 等KDD 2026 · 6 次引用

它引用的 Paper38

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  3. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
  4. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用
  5. Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan 等NeurIPS 2023 · 4,972 次引用

相关 Paper

  1. Demonstration Selection for In-Context Learning via Reinforcement LearningXubin Wang, Jianfei Wu, Yichen Yuan, Deyu Cai 等ICML 2025
  2. Many-Shot CoT-ICL: Making In-Context Learning Truly LearnTsz Ting Chung, Lemao Liu, Mo Yu, Dit-Yan YeungICML 2026 · 3 次引用
  3. Active Learning Principles for In-Context Learning with Large Language ModelsKaterina Margatina, Timo Schick, Nikolaos Aletras, Jane Dwivedi-YuEMNLP Findings 2023 · 32 次引用
  4. Task-Level Thinking Steps Help Large Language Models for Challenging Classification TaskChunhui Du, Jidong Tian, Haoran Liao, Jindou Chen 等EMNLP 2023 · 2 次引用
  5. How Many Demonstrations Do You Need for In-context Learning?Jiuhai Chen, Lichang Chen, Chen Zhu, Tianyi ZhouEMNLP Findings 2023 · 12 次引用
黄昏的海面,两侧是细线勾勒的悬崖