Data Efficient Sample Selection for In-Context Learning

Venktesh V, Cem Levi, Avishek Anand


Abstract
The In-context learning (ICL) paradigm aids large language models (LLMs) to adapt to new tasks without need for fine-tuning. However, selecting an optimal combination of demonstration examples from a large pool of example subsets is a challenging problem. Existing approaches for selection do not model the complex relationship between ICL samples and downstream LLM performance. They typically perform static task-level selection, choosing subsets once offline, which can fail to generalize to unseen queries. We introduce DearICL (Data Efficient Algorithm for Ranking) ICL samples, a new framework that models demonstration example selection as a subset ranking problem. DearICL employs a non-linear surrogate employing a differentiable sorting objective within a gap-index bandit algorithm. The gap-index based approach enables fine-grained separation of good arms and borderline arms, which is used as an auxiliary objective to train the non-linear surrogate through sufficient sampling of borderline arms, supporting instance-level subset ranking. On exemplar selection benchmarks with open-source LLMs, DearICL achieves 8.08–15.9% accuracy gains over strong linear bandit baselines, with low sample complexity. Code and data: https://github.com/VenkteshV/DearICL
Anthology ID:
2026.emnlp-main.1460
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
33387–33408
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1460/
DOI:
Bibkey:
Cite (ACL):
Venktesh V, Cem Levi, and Avishek Anand. 2026. Data Efficient Sample Selection for In-Context Learning. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 33387–33408, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Data Efficient Sample Selection for In-Context Learning (V et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1460.pdf