cs.LGSep 6, 2026

Data Efficient Sample Selection for In-Context Learning

Authors: V Venktesh, Cem Levi, Avishek Anand

Organizations: Stockholm University · SKIM Group B.V. · TU Delft

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.

Figures & tables

Appendix figures & tables8 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. UCS: Estimating Unseen Coverage for Improved In-Context Learning

    Apr 13, 2026Jiayi Xin, Xiang Li, Evan Qiang +4In-Context Example SelectionIn-Context Learning

  2. PLR: Plackett-Luce for Reordering In-Context Learning Examples

    Mar 22, 2026Pawel Batorski, Paul SwobodaIn-Context LearningFew-Shot Learning