Lune

ACL Findings2024

FastGAS: Fast Graph-based Annotation Selection for In-Context Learning

Zihan Chen, Song Wang, Cong Shen, Jundong Li

Abstract

In-context learning (ICL) empowers large language models (LLMs) to tackle new tasks by using a series of training instances as prompts. Since generating the prompts needs to sample from a vast pool of instances and annotate them (e.g., add labels in classification task), existing methods have proposed to select a subset of unlabeled examples for annotation, thus enhancing the quality of prompts and concurrently mitigating annotation costs. However, these methods often require a long time to select instances due to their complexity, hindering their practical viability. To address this limitation, we propose a graph-based selection method, FastGAS, designed to efficiently identify highquality instances while minimizing computational overhead. Initially, we construct a data similarity graph based on instance similarities. Subsequently, employing a graph partitioning algorithm, we partition the graph into pieces. Within each piece (i.e., subgraph), we adopt a greedy approach to pick the most representative nodes. By aggregating nodes from diverse pieces and annotating the corresponding instances, we identify a set of diverse and representative instances for ICL. Compared to prior approaches, our method not only exhibits superior performance on different tasks but also significantly reduces selection time. In addition, we demonstrate the efficacy of our approach in LLMs of larger sizes.

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 · 3 top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers3

  1. Mixture of Demonstrations for In-Context LearningSong Wang, Zihan Chen, Chengshuai Shi, Cong Shen et al.NeurIPS 2024 · 21 citations
  2. Separate the Wheat from the Chaff: Winnowing Down Divergent Views in Retrieval Augmented GenerationSong Wang, Zihan Chen, Peng Wang, Zhepei Wei et al.EMNLP 2025 · 1 citation
  3. AnyMAC: Cascading Flexible Multi-Agent Collaboration via Next-Agent PredictionSong Wang, Zhen Tan, Zihan Chen, Shuang Zhou et al.EMNLP 2025

Builds on18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  3. Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein et al.ICML 2021 · 1,843 citations
  4. 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
  5. Data Distributional Properties Drive Emergent In-Context Learning in TransformersStephanie C. Y. Chan, Adam Santoro, Andrew K. Lampinen, Jane X. Wang et al.NeurIPS 2022 · 407 citations

Related papers

  1. CoverICL: Selective Annotation for In-Context Learning via Active Graph CoverageCostas Mavromatis, Balasubramaniam Srinivasan, Zhengyuan Shen, Jiani Zhang et al.EMNLP 2024
  2. IDEAL: Influence-Driven Selective Annotations Empower In-Context Learners in Large Language ModelsShaokun Zhang, Xiaobo Xia, Zhaoqing Wang, Ling-Hao Chen et al.ICLR 2024 · 28 citations
  3. From Cross-Task Examples to In-Task Prompts: A Graph-Based Pseudo-Labeling Framework for In-context LearningZihan Chen, Song Wang, Xingbo Fu, Chengshuai Shi et al.EMNLP Findings 2025
  4. Selective Annotation Makes Language Models Better Few-Shot LearnersHongjin Su, Jungo Kasai, Chen Henry Wu, Weijia Shi et al.ICLR 2023 · 63 citations
  5. Large Language Models are Demonstration Pre-Selectors for ThemselvesJiarui Jin, Yuwei Wu, Haoxuan Li, Xiaoting He et al.ICML 2025
Dusk over the sea between two cliffs drawn in fine vertical lines