In-Context Example Ordering Guided by Label Distributions
Not on the map. Why?
Abstract (arXiv)
By allowing models to predict without task-specific training, in-context learning (ICL) with pretrained LLMs has enormous potential in NLP. However, a number of problems persist in ICL. In particular, its performance is sensitive to the choice and order of in-context examples. Given the same set of in-context examples with different orderings, model performance may vary between near random to near state-of-the-art. In this work, we formulate in-context example ordering as an optimization problem. We examine three problem settings that differ in the assumptions they make about what is known about the task. Inspired by the idea of learning from label proportions, we propose two principles for in-context example ordering guided by model's probability predictions. We apply our proposed principles to thirteen text classification datasets and nine different autoregressive LLMs with 700M to 13B parameters. We demonstrate that our approach outperforms the baselines by improving the classification accuracy, reducing model miscalibration, and also by selecting better in-context examples.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 26 of its 48 references that are in the map. First posted on arXiv 18 Feb 2024.
Builds on
26 of 48 references.
References · 26
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2017On Calibration of Modern Neural Networkscited by 4,860
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2017Understanding Black-box Predictions via Influence Functionscited by 1,714
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,184
14 more
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 414
- 2013Good Debt or Bad Debt: Detecting Semantic Orientations in Economic Textscited by 310
- 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 256
- 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 242
- 2021Noisy Channel Language Model Prompting for Few-Shot Text Classificationcited by 163
- 2022Self-Adaptive In-Context Learning: An Information Compression Perspective for In-Context Example Selection and Orderingcited by 158
- 2022Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrationscited by 70
- 2023In-context Example Selection with Influencescited by 60
- 2022Data Curation Alone Can Stabilize In-context Learningcited by 58
- 2014On Learning from Label Proportionscited by 38
- 2019Deep multi-class learning from label proportionscited by 33
- 2022Learning from Label Proportions by Learning with Label Noisecited by 30
Built on by
Citing papers per year: 2024: 5; 2025: 4; 2026: 3.
12 papers.
- 2024Eliminating Position Bias of Language Models: A Mechanistic Approachcited by 61
- 2024Beyond Perplexity: Multi-dimensional Safety Evaluation of LLM Compressioncited by 32
- 2024State Space Models are Strong Text Rerankerscited by 10
- 2024Token-based Decision Criteria Are Suboptimal in In-context Learningcited by 9
- 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learningcited by 6
- 2025Beyond Correctness: Rewarding Faithful Reasoning in Retrieval-Augmented Generationcited by 6
- 2025A Sequential Optimal Learning Approach to Automated Prompt Engineering in Large Language Modelscited by 4
- 2025Hearing the Order: Investigating Position Bias in Large Audio-Language Modelscited by 4
- 2026PLR: Plackett-Luce for Reordering In-Context Learning Examplescited by 1
- 2024Label Set Optimization via Activation Distribution Kurtosis for Zero-shot Classification with Generative Modelscited by 0
- 2026Self-Improving In-Context Learningcited by 0
- 2026Spurious Prompts: Can Irrelevant Prompts Steer Large Language Models?cited by 0
- 2026Spurious Prompts: Can Irrelevant Prompts Steer Large Language Models?28 May 2026
- 2026Self-Improving In-Context Learning22 May 2026
- 2026PLR: Plackett-Luce for Reordering In-Context Learning Examples22 Mar 2026
- 2025Beyond Correctness: Rewarding Faithful Reasoning in Retrieval-Augmented Generation15 Oct 2025
- 2025Hearing the Order: Investigating Position Bias in Large Audio-Language Models1 Oct 2025
- 2025OptiSeq: Ordering Examples On-The-Fly for In-Context Learning25 Jan 2025
- 2025A Sequential Optimal Learning Approach to Automated Prompt Engineering in Large Language Models7 Jan 2025
- 2024State Space Models are Strong Text Rerankers18 Dec 2024
- 2024Label Set Optimization via Activation Distribution Kurtosis for Zero-shot Classification with Generative Models24 Oct 2024
- 2024Beyond Perplexity: Multi-dimensional Safety Evaluation of LLM Compression6 Jul 2024
- 2024Eliminating Position Bias of Language Models: A Mechanistic Approach1 Jul 2024
- 2024Token-based Decision Criteria Are Suboptimal in In-context Learning24 Jun 2024