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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 75e3d78d-07e2-4007-b14c-fdbdf18ac08eCited 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 on8
- 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
- Self-ICL: Zero-Shot In-Context Learning with Self-Generated DemonstrationsWei-Lin Chen, Cheng-Kuang Wu, Yun-Nung Chen, Hsin-Hsi ChenEMNLP 2023 · 8 citations
- In-Context Principle Learning from MistakesTianjun Zhang, Aman Madaan, Luyu Gao, Steven Zheng et al.ICML 2024 · 44 citations
- Auto-regressive In-context Demonstration SelectionYunzhe Qi, Sirui Chen, Jiaru Zou, Jingrui HeICML 2026
- Focused Large Language Models are Stable Many-Shot LearnersPeiwen Yuan, Shaoxiong Feng, Yiwei Li, Xinglin Wang et al.EMNLP 2024
- Learning to Rank for In-Context Example RetrievalYuwen Ji, Luodan Zhang, Ambyer Han, Haoran Que et al.NeurIPS 2025 · 1 citation
