Lune

ACL Findings2024

Se²: Sequential Example Selection for In-Context Learning

Haoyu Liu, Jianfeng Liu, Shaohan Huang, Yuefeng Zhan, Hao Sun, Weiwei Deng, Furu Wei, Qi Zhang

Abstract

The remarkable capability of large language models (LLMs) for in-context learning (ICL) needs to be activated by demonstration examples. Prior work has extensively explored the selection of examples for ICL, predominantly following the "select then organize" paradigm, such approaches often neglect the internal relationships between examples and exist an inconsistency between the training and inference. In this paper, we formulate the problem as a Sequential Selection problem and introduce Se 2 , a sequential-aware method that leverages the LLM's feedback on varying context, aiding in capturing inter-relationships and sequential information among examples, significantly enriching the contextuality and relevance of ICL prompts. Meanwhile, we utilize beam search to seek and construct example sequences, enhancing both quality and diversity. Extensive experiments across 23 NLP tasks from 8 distinct categories illustrate that Se 2 markedly surpasses competitive baselines and achieves 42% relative improvement over random selection. Further in-depth analysis shows the effectiveness of proposed strategies, highlighting Se 2 's exceptional stability and adaptability across various scenarios. Code available at https://github.com/microsoft/LMOps.

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.

5 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

  • The Good, the Bad, and the Debatable: A Survey on the Impacts of Data for In-Context Learning cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Self-Consistency Improves Chain of Thought Reasoning in Language Models cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Self-Consistency Improves Chain of Thought Reasoning in Language Models cites Language Models are Few-Shot Learners
  • Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
  • Easier to Judge than to Find: Predicting In-Context Learning Success for Demonstration Selection cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Easier to Judge than to Find: Predicting In-Context Learning Success for Demonstration Selection cites Language Models are Few-Shot Learners
  • Easier to Judge than to Find: Predicting In-Context Learning Success for Demonstration Selection cites Learning to Rank for In-Context Example Retrieval
  • Learning to Rank for In-Context Example Retrieval cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
  • Learning to Rank for In-Context Example Retrieval cites Finetuned Language Models are Zero-Shot Learners
  • Finetuned Language Models are Zero-Shot Learners cites CommonGen: A Constrained Text Generation Challenge for Generative Commonsense Reasoning
  • Finetuned Language Models are Zero-Shot Learners cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Learning to Rank for In-Context Example RetrievalYuwen Ji, Luodan Zhang, Ambyer Han, Haoran Que et al.NeurIPS 2025 · 1 citation
  2. RD-MCSA: A Multi-Class Sentiment Analysis Approach Integrating In-Context Classification Rationales and DemonstrationsHaihua Xie, Yinzhu Cheng, Yaqing Wang, Miao He et al.EMNLP 2025
  3. The Good, the Bad, and the Debatable: A Survey on the Impacts of Data for In-Context LearningStephanie Schoch, Yangfeng JiEMNLP 2025
  4. Improving Dialogue State Tracking through Combinatorial Search for In-Context ExamplesHaesung Pyun, Yoonah Park, Yohan JoACL 2025
  5. Easier to Judge than to Find: Predicting In-Context Learning Success for Demonstration SelectionHaochun Wang, Chaofen Yang, Jiatong Liu, Jingbo Wang et al.ICML 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. Finetuned Language Models are Zero-Shot LearnersJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu et al.ICLR 2022 · 4,966 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. Self-Consistency Improves Chain of Thought Reasoning in Language ModelsXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V. Le et al.ICLR 2023 · 681 citations
  5. CommonGen: A Constrained Text Generation Challenge for Generative Commonsense ReasoningBill Yuchen Lin, Wangchunshu Zhou, Ming Shen, Pei Zhou et al.EMNLP Findings 2020 · 239 citations

Related papers

  1. Active Example Selection for In-Context LearningYiming Zhang, Shi Feng, Chenhao TanEMNLP 2022 · 84 citations
  2. What Do Language Models Learn in Context? The Structured Task HypothesisJiaoda Li, Yifan Hou, Mrinmaya Sachan, Ryan CotterellACL 2024 · 5 citations
  3. 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
  4. Revisiting Demonstration Selection Strategies in In-Context LearningKeqin Peng, Liang Ding, Yancheng Yuan, Xuebo Liu et al.ACL 2024
  5. Compositional Exemplars for In-context LearningJiacheng Ye, Zhiyong Wu, Jiangtao Feng, Tao Yu et al.ICML 2023 · 188 citations
Dusk over the sea between two cliffs drawn in fine vertical lines