Lune

ACL Findings2024

Effective In-Context Example Selection through Data Compression

Zhongxiang Sun, Kepu Zhang, Haoyu Wang, Xiao Zhang, Jun Xu

Abstract

In-context learning has been extensively validated in large language models.However, the mechanism and selection strategy for incontext example selection, which is a crucial ingredient in this approach, lacks systematic and in-depth research.In this paper, we propose a data compression approach to the selection of in-context examples.We introduce a two-stage method that can effectively choose relevant examples and retain sufficient information about the training dataset within the in-context examples.Our method shows a significant improvement of an average of 5.90% across five different real-world datasets using four language models.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? cites TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classification
  • Rethinking the Role of Demonstrations: What Makes In-Context Learning Work? cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Cross-Task Generalization via Natural Language Crowdsourcing Instructions cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on13

  1. Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel et al.ACL 2022 · 1,494 citations
  2. Cross-Task Generalization via Natural Language Crowdsourcing InstructionsSwaroop Mishra, Daniel Khashabi, Chitta Baral, Hannaneh HajishirziACL 2022 · 887 citations
  3. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
  4. TweetEval: Unified Benchmark and Comparative Evaluation for Tweet ClassificationFrancesco Barbieri, José Camacho-Collados, Luis Espinosa Anke, Leonardo NevesEMNLP Findings 2020 · 720 citations
  5. Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?Sewon Min, Xinxi Lyu, Ari Holtzman, Mikel Artetxe et al.EMNLP 2022 · 634 citations

Related papers

  1. UniICL: An Efficient ICL Framework Unifying Compression, Selection, and GenerationJun Gao, Qi Lv, Zili Wang, Tianxiang Wu et al.ACL 2025
  2. GistScore: Learning Better Representations for In-Context Example Selection with Gist BottlenecksShivanshu Gupta, Clemens Rosenbaum, Ethan R. ElenbergICML 2024 · 10 citations
  3. Selection-p: Self-Supervised Task-Agnostic Prompt Compression for Faithfulness and TransferabilityTsz Ting Chung, Leyang Cui, Lemao Liu, Xinting Huang et al.EMNLP Findings 2024 · 1 citation
  4. RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective AugmentationFangyuan Xu, Weijia Shi, Eunsol ChoiICLR 2024 · 260 citations
  5. Revisiting In-Context Learning with Long Context Language ModelsJinheon Baek, Sun Jae Lee, Prakhar Gupta, Geunseob Oh et al.ACL Findings 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines