Proceedings

Performance-Driven Demonstration Selection for In-Context Learning

Download BibTeX Cite

Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence. Main Track. Pages 5946-5954.

https://doi.org/10.24963/ijcai.2026/662

Abstract

In-context learning (ICL) enables large language models (LLMs) to adapt to new tasks with considerable performance gains, yet its effectiveness is highly sensitive to the choice of demonstrations. Most existing selection methods rely on heuristic or proxy signals, such as similarity, diversity, or uncertainty, and select demonstrations independently, which may misalign with downstream performance and overlook set-level composition effects. Therefore, we propose Performance-Driven Demonstration Selection (PDDS), which directly aligns demonstration selection with ICL performance. PDDS formulates selection as predicting the target LLM’s downstream task performance for a given query–in-context pair, replacing proxy heuristics with a performance-aware objective. Unlike prior approaches that rank demonstrations independently before composing the prompt, PDDS evaluates the entire in-context set, capturing inter-demonstration interactions and composition effects. PDDS trains an end-to-end scorer using supervision from the target LLM’s actual task outcomes. At inference time, it selects high-scoring in-context sets without additional target LLM calls or validation-time feedback. Across 6 NLP tasks, 8 datasets, and 8 target LLMs ranging from 1B to 70B parameters, PDDS achieves state-of-the-art results and generalizes well across LLMs and datasets. PDDS remains effective with as few as 30 training instances and can be integrated as a plug-and-play component to enhance existing ICL methods.

  1. [Agirre et al., 2014] Eneko Agirre, Carmen Banea, Claire Cardie, Daniel Cer, Mona Diab, Aitor Gonzalez-Agirre, Weiwei Guo, Rada Mihalcea, German Rigau, and Janyce Wiebe. Semeval-2014 task 10: Multilingual semantic tex- tual similarity. In Proceedings of the 8th international workshop on semantic evaluation (SemEval 2014), pages 81-91, 2014.
  2. [Barrault et al., 2019] Loïc Barrault, Ondřej Bojar, Marta R Costa-Jussa, Christian Federmann, Mark Fishel, Yvette Graham, Barry Haddow, Matthias Huck, Philipp Koehn, Shervin Malmasi, et al. Findings of the 2019 conference on machine translation (wmt19). ACL, 2019.
  3. [Cai et al., 2025] Yuyang Cai, Peng Chen, Feng Qian, Gao Chen, and Jingwen Yan. Botwavenet: semantic segmenta- tion network for remote sensing images based on wavelet transform and attention mechanisms. Journal of Electronic Imaging, 34(2):023053-023053, 2025.
  4. [Cer et al., 2017] Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. Semeval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pages 1-14, 2017.
  5. [Chen et al., 2025] Peng Chen, Wenxuan He, Feng Qian, Guangyao Shi, and Jingwen Yan. A synergistic cnn- transformer network with pooling attention fusion for hy- perspectral image classification. Digital Signal Process- ing, 160:105070, 2025.
  6. [Chen et al., 2026] Peng Chen, Fangjun Huang, and Chao Huang. Dyc-clip: Dynamic context-aware multi-modal prompt learning for zero-shot anomaly detection. Pattern Recognition, page 113215, 2026.
  7. [Ding et al., 2026] Yu Ding, Xudong Han, Junjie Yang, Tianyang Wang, Ziqian Bi, Xinyuan Song, Junfeng Hao, Junhao Song, Enze Ge, Benji Peng, et al. Few-shot and zero-shot learning with large language models: Prompt- ing strategies and in-context learning. Authorea Preprints, 2026.
  8. [Ganesan, 2018] Kavita Ganesan. Rouge 2.0: Updated and improved measures for evaluation of summarization tasks. arXiv preprint arXiv:1803.01937, 2018.
  9. [Gonen et al., 2023] Hila Gonen, Srini Iyer, Terra Blevins, Noah A Smith, and Luke Zettlemoyer. Demystifying prompts in language models via perplexity estimation. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 10136-10148, 2023.
  10. [Guo et al., 2025] Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shi- rong Ma, Peiyi Wang, Xiao Bi, et al. Deepseek-r1: In- centivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025.
  11. [Hyndman and Koehler, 2006] Rob J Hyndman and Anne B Koehler. Another look at measures of forecast accuracy. International journal of forecasting, 22(4):679-688, 2006.
  12. [Jiang et al., 2026] Zhonglin Jiang, Shenghan Gao, Qian Tang, Zequn Wang, Yu Liu, and Hong-Zhong Huang. Generative reliability-based design optimization using in- context learning capabilities of large language models. Journal of Mechanical Design, 148(3):031705, 2026.
  13. [Li and Qiu, 2023] Xiaonan Li and Xipeng Qiu. Mot: Pre- thinking and recalling enable chatgpt to self-improve with memory-of-thoughts. CoRR, 2023.
  14. [Li et al., 2025] Chuyuan Li, Raymond Li, Thalia S Field, and Giuseppe Carenini. Delta-knn: Improving demonstra- tion selection in in-context learning for alzheimer's disease detection. arXiv preprint arXiv:2506.03476, 2025.
  15. [Liu et al., 2022] Jiachang Liu, Dinghan Shen, Yizhe Zhang, William B Dolan, Lawrence Carin, and Weizhu Chen. What makes good in-context examples for gpt-3? In Pro- ceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd workshop on knowledge extraction and integra- tion for deep learning architectures, pages 100-114, 2022.
  16. [Liu et al., 2024] Yinpeng Liu, Jiawei Liu, Xiang Shi, Qikai Cheng, Yong Huang, and Wei Lu. Let's learn step by step: Enhancing in-context learning ability with curricu- lum learning. arXiv preprint arXiv:2402.10738, 2024.
  17. [Liu et al., 2025] Hui Liu, Wenya Wang, Hao Sun, Chris Xing Tian, Chenqi Kong, Xin Dong, and Hao- liang Li. Unraveling the mechanics of learning-based demonstration selection for in-context learning. In Association for Computational Linguistics 2025, 2025.
  18. [Ma et al., 2019] Qingsong Ma, Johnny Wei, Ondřej Bojar, and Yvette Graham. Results of the wmt19 metrics shared task: Segment-level and strong mt systems pose big chal- lenges. In Proceedings of the Fourth Conference on Ma- chine Translation (Volume 2: Shared Task Papers, Day 1), pages 62-90, 2019.
  19. [Naik et al., 2023] Ranjita Naik, Varun Chandrasekaran, Mert Yuksekgonul, Hamid Palangi, and Besmira Nushi. Diversity of thought improves reasoning abilities of large language models. 2023.
  20. [Otero et al., 2026] Abraham Otero, Daniel García, Luciano Sánchez 1 , and Nahuel Costal. Can in-context learning en- able large vision language models to detect ecg. In Arti- ficial Intelligence in Biomedicine: First Conference of the Spanish Society of Artificial Intelligence in Biomedicine, CIABiomed 2025, Seville, Spain, October 23-24, 2025, Proceedings, page 200. Springer Nature, 2026.
  21. [Peng et al., 2024] Keqin Peng, Liang Ding, Yancheng Yuan, Xuebo Liu, Min Zhang, Yuanxin Ouyang, and Dacheng Tao. Revisiting demonstration selec- tion strategies in in-context learning. arXiv preprint arXiv:2401.12087, 2024.
  22. [Post, 2018] Matt Post. A call for clarity in reporting bleu scores. arXiv preprint arXiv:1804.08771, 2018.
  23. [Rush et al., 2015] Alexander M Rush, Sumit Chopra, and Jason Weston. A neural attention model for ab- stractive sentence summarization. arXiv preprint arXiv:1509.00685, 2015.
  24. [Saravia et al., 2018] Elvis Saravia, Hsien-Chi Toby Liu, Yen-Hao Huang, Junlin Wu, and Yi-Hsuan Chen. Carer: Contextualized affect representations for emotion recog- nition. In Proceedings of the 2018 Conference on Em- pirical Methods in Natural Language Processing, pages 3687-3697, 2018.
  25. [Shi et al., 2026] Lida Shi, Fausto Giunchiglia, Ran Luo, Daqian Shi, Rui Song, Xiaolei Diao, and Hao Xu. An empirical study of llms via in-context learning for stance classification. Information Processing & Management, 63(1):104322, 2026.
  26. [Socher et al., 2013] Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. Recursive deep models for se- mantic compositionality over a sentiment treebank. In Pro- ceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, 2013.
  27. [Wang et al., 2023] Wenqiang Wang, Chongyang Du, Tao Wang, Kaihao Zhang, Wenhan Luo, Lin Ma, Wei Liu, and Xiaochun Cao. Punctuation-level attack: single-shot and single punctuation attack can fool text models. In Proceed- ings of the 37th International Conference on Neural Infor- mation Processing Systems, pages 49312-49324, 2023.
  28. [Wang et al., 2024] Song Wang, Zihan Chen, Chengshuai Shi, Cong Shen, and Jundong Li. Mixture of demonstra- tions for in-context learning. Advances in Neural Informa- tion Processing Systems, 37:88091-88116, 2024.
  29. [Wang et al., 2025] Wenqiang Wang, Yan Xiao, Hao Lin, Yangshijie Zhang, and Xiaochun Cao. Multi-task ad- versarial attacks against black-box model with few-shot queries. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 13994-14014, 2025.
  30. [Yang et al., 2025] An Yang, Anfeng Li, Baosong Yang, Be- ichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.
  31. [Ye et al., 2023] Jiacheng Ye, Zhiyong Wu, Jiangtao Feng, Tao Yu, and Lingpeng Kong. Compositional exemplars for in-context learning. In ICML, pages 39818-39833. PMLR, 2023.
  32. [Zuo et al., 2025] Xinyue Zuo, Yan Xiao, Xiaochun Cao, Wenya Wang, and Jin Song Dong. Dt4lm: Differential testing for reliable language model updates in classifica- tion tasks. IEEE Transactions on Software Engineering, 2025.

References were extracted automatically from the PDF and may contain errors.

Welcome Future Conferences AI Journal Division IJCAI Proceedings About IJCAI IJCAI Awards