Lune

EMNLP Findings2023

Towards Informative Few-Shot Prompt with Maximum Information Gain for In-Context Learning

Hongfu Liu, Ye Wang

Abstract

Large Language models (LLMs) possess the capability to engage In-context Learning (ICL) by leveraging a few demonstrations pertaining to a new downstream task as conditions. However, this particular learning paradigm suffers from high instability stemming from substantial variances induced by factors such as the input distribution of selected examples, their ordering, and prompt formats. In this work, we demonstrate that even when all these factors are held constant, the random selection of examples still results in high variance. Consequently, we aim to explore the informative ability of data examples by quantifying the Information Gain (IG) obtained in prediction after observing a given example candidate. Then we propose to sample those with maximum IG. Additionally, we identify the presence of template bias, which can lead to unfair evaluations of IG during the sampling process. To mitigate this bias, we introduce Calibration Before Sampling strategy. The experimental results illustrate that our proposed method can yield an average relative improvement of 14.3% across six classification tasks using three LLMs.

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · 1 top-tier paper that cites it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers1

  1. Discursive Circuits: How Do Language Models Understand Discourse Relations?Yisong Miao, Min-Yen KanEMNLP 2025

Builds on13

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations
  3. 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
  4. 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
  5. Active Learning for BERT: An Empirical StudyLiat Ein-Dor, Alon Halfon, Ariel Gera, Eyal Shnarch et al.EMNLP 2020 · 144 citations

Related papers

  1. Data Curation Alone Can Stabilize In-context LearningTing-Yun Chang, Robin JiaACL 2023 · 11 citations
  2. Task Descriptors Help Transformers Learn Linear Models In-ContextRuomin Huang, Rong GeICLR 2025
  3. Fairness-guided Few-shot Prompting for Large Language ModelsHuan Ma, Changqing Zhang, Yatao Bian, Lemao Liu et al.NeurIPS 2023 · 87 citations
  4. Not All Demonstration Examples are Equally Beneficial: Reweighting Demonstration Examples for In-Context LearningZhe Yang, Damai Dai, Peiyi Wang, Zhifang SuiEMNLP Findings 2023 · 3 citations
  5. Generative Calibration for In-context LearningZhongtao Jiang, Yuanzhe Zhang, Cao Liu, Jun Zhao et al.EMNLP Findings 2023 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines