Self-Adaptive In-Context Learning: An Information Compression Perspective for In-Context Example Selection and Ordering
Zhiyong Wu, Yaoxiang Wang, Jiacheng Ye, Lingpeng Kong
Abstract
Despite the surprising few-shot performance of in-context learning (ICL), it is still a common practice to randomly sample examples to serve as context. This paper advocates a new principle for ICL: self-adaptive in-context learning. The self-adaption mechanism is introduced to help each sample find an in-context example organization (i.e., selection and permutation) that can derive the correct prediction, thus maximizing performance. To validate the effectiveness of self-adaptive ICL, we propose a general select-then-rank framework and instantiate it with new selection and ranking algorithms. Upon extensive evaluation on eight different NLP datasets, our self-adaptive ICL method achieves a 40% relative improvement over the common practice setting. Further analysis reveals the enormous potential of self-adaptive ICL that it might be able to close the gap between ICL and finetuning given more advanced algorithms. Our code will be released to facilitate future research.
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.
63 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- An Information-theoretic Approach to Prompt Engineering Without Ground Truth Labels cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Implicit In-context Learning cites An Information-theoretic Approach to Prompt Engineering Without Ground Truth Labels
- Implicit In-context Learning cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Implicit In-context Learning cites A Survey on In-context Learning
- Implicit In-context Learning cites Language Models are Few-Shot Learners
- Smoothie: Label Free Language Model Routing cites An Information-theoretic Approach to Prompt Engineering Without Ground Truth Labels
- Smoothie: Label Free Language Model Routing cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity cites Language Models are Few-Shot Learners
- A Survey on In-context Learning cites An Information-theoretic Approach to Prompt Engineering Without Ground Truth Labels
- A Survey on In-context Learning cites Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- A Survey on In-context Learning cites Language Models are Few-Shot Learners
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts 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 AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning cites Language Models are Few-Shot Learners
- Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language Models cites Language Models are Few-Shot Learners
Cited by top-tier papers63
- Implicit In-context LearningZhuowei Li, Zihao Xu, Ligong Han, Yunhe Gao et al.ICLR 2025 · 1,989 citations
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
- LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt CompressionHuiqiang Jiang, Qianhui Wu, Xufang Luo, Dongsheng Li et al.ACL 2024 · 59 citations
- Diffusion of Thought: Chain-of-Thought Reasoning in Diffusion Language ModelsJiacheng Ye, Shansan Gong, Liheng Chen, Lin Zheng et al.NeurIPS 2024 · 47 citations
- Smoothie: Label Free Language Model RoutingNeel Guha, Mayee F. Chen, Trevor Chow, Ishan S. Khare et al.NeurIPS 2024 · 44 citations
Builds on9
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- 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
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- An Information-theoretic Approach to Prompt Engineering Without Ground Truth LabelsTaylor Sorensen, Joshua Robinson, Christopher Michael Rytting, Alexander Glenn Shaw et al.ACL 2022 · 142 citations
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement LearningMingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang et al.EMNLP 2022 · 141 citations
Related papers
- Automatic Combination of Sample Selection Strategies for Few-Shot LearningBranislav Pecher, Ivan Srba, Mária Bieliková, Joaquin VanschorenACL Findings 2026 · 5 citations
- Selecting Demonstrations for Many-Shot In-Context Learning via Gradient MatchingJianfei Zhang, Bei Li, Jun Bai, Rumei Li et al.ACL Findings 2025
- What Makes a Good Order of Examples in In-Context LearningQi Guo, Leiyu Wang, Yidong Wang, Wei Ye et al.ACL Findings 2024 · 8 citations
- Customizing In-context Learning for Dynamic Interest Adaption in LLM-based RecommendationKeqin Bao, Ming Yan, Yang Zhang, Jizhi Zhang et al.ACL Findings 2025 · 1 citation
- In-Context Principle Learning from MistakesTianjun Zhang, Aman Madaan, Luyu Gao, Steven Zheng et al.ICML 2024 · 44 citations
