Lune

EMNLP2025Top-tier venue

Topic Coverage-based Demonstration Retrieval for In-Context Learning

Wonbin Kweon, SeongKu Kang, Runchu Tian, Pengcheng Jiang, Jiawei Han, Hwanjo Yu

Abstract

The effectiveness of in-context learning relies heavily on selecting demonstrations that provide all the necessary information for a given test input. To achieve this, it is crucial to identify and cover fine-grained knowledge requirements. However, prior methods often retrieve demonstrations based solely on embedding similarity or generation probability, resulting in irrelevant or redundant examples. In this paper, we propose TopicK, a topic coverage-based retrieval framework that selects demonstrations to comprehensively cover topic-level knowledge relevant to both the test input and the model. Specifically, TopicK estimates the topics required by the input and assesses the model's knowledge on those topics. TopicK then iteratively selects demonstrations that introduce previously uncovered required topics, in which the model exhibits low topical knowledge. We validate the effectiveness of TopicK through extensive experiments across various datasets and both open- and closed-source LLMs. Our source code is available at https://github.com/WonbinKweon/TopicK_EMNLP2025.

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.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
  • Compositional Exemplars for In-context Learning cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Compositional Exemplars for In-context Learning cites Language Models are Few-Shot Learners
  • RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning cites BERTScore: Evaluating Text Generation with BERT
  • RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning cites Language Models are Few-Shot Learners
  • PairSem: LLM-Guided Pairwise Semantic Matching for Scientific Document Retrieval cites Language Models are Few-Shot Learners
  • SPRINT: Scalable and Predictive Intent Refinement for LLM-Enhanced Session-based Recommendation cites PairSem: LLM-Guided Pairwise Semantic Matching for Scientific Document Retrieval
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. PairSem: LLM-Guided Pairwise Semantic Matching for Scientific Document RetrievalWonbin Kweon, Runchu Tian, Seongku Kang, Pengcheng Jiang et al.WWW 2026
  2. SPRINT: Scalable and Predictive Intent Refinement for LLM-Enhanced Session-based RecommendationGyuseok Lee, Wonbin Kweon, Zhenrui Yue, Yaokun Liu et al.SIGIR 2026

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. BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger et al.ICLR 2020 · 8,443 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. Compositional Exemplars for In-context LearningJiacheng Ye, Zhiyong Wu, Jiangtao Feng, Tao Yu et al.ICML 2023 · 188 citations
  5. RLPrompt: Optimizing Discrete Text Prompts with Reinforcement LearningMingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang et al.EMNLP 2022 · 141 citations

Related papers

  1. Learning to Select In-Context Demonstration Preferred by Large Language ModelZheng Zhang, Shaocheng Lan, Lei Song, Jiang Bian et al.ACL Findings 2025 · 5 citations
  2. Revisiting Demonstration Selection Strategies in In-Context LearningKeqin Peng, Liang Ding, Yancheng Yuan, Xuebo Liu et al.ACL 2024
  3. DICE: Dynamic In-Context Example Selection in LLM Agents via Efficient Knowledge TransferRuoyu Wang, Junda Wu, Yu Xia, Tong Yu et al.KDD 2026 · 6 citations
  4. Auto-regressive In-context Demonstration SelectionYunzhe Qi, Sirui Chen, Jiaru Zou, Jingrui HeICML 2026
  5. Unified Demonstration Retriever for In-Context LearningXiaonan Li, Kai Lv, Hang Yan, Tianyang Lin et al.ACL 2023 · 40 citations
Dusk over the sea between two cliffs drawn in fine vertical lines