cs.LGMar 22, 2026

PLR: Plackett-Luce for Reordering In-Context Learning Examples

Authors: Pawel Batorski, Paul Swoboda

Organizations: Heinrich Heine Universität Düsseldorf

Abstract

In-context learning (ICL) adapts large language models by conditioning on a small set of ICL examples, avoiding costly parameter updates. Among other factors, performance is often highly sensitive to the ordering of the examples. However, exhaustive search over the n!n! possible orderings is infeasible. Therefore more efficient ordering methods use model confidence measures (e.g., label-probability entropy) over label sets or take a direct approach to finding the best ordering. We propose PLR, a probabilistic approach to in-context example ordering that replaces discrete ordering search with learning a probability distribution over orderings with the Plackett-Luce model. PLR models orderings using a Plackett-Luce distribution and iteratively updates its parameters to concentrate probability mass on high-performing orderings under a task-level metric. Candidate orderings are sampled efficiently via a Gumbel perturb-and-sort procedure. Experiments on multiple classification benchmarks show that PLR consistently improves few-shot accuracy for k∈{4,8,16,32}k \in \{4, 8, 16, 32\} examples, and we further demonstrate gains on mathematical reasoning tasks where label-based ordering methods are not applicable. Our code is available at https://github.com/Batorskq/PLR.

Figures & tables

Appendix figures & tables1 asset

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Data Efficient Sample Selection for In-Context Learning

    Sep 6, 2026V Venktesh, Cem Levi, Avishek AnandIn-Context Example SelectionIn-Context Learning

  2. Many-Shot CoT-ICL: Making In-Context Learning Truly Learn

    May 13, 2026Tsz Ting Chung, Lemao Liu, Mo Yu +1CoT ReasoningIn-Context Learning

  3. A Theoretical Interpretation of In-Context Learning via Probabilistic Modeling

    Jun 27, 2026Zhenyu Liu, Huaze Tang, Shao-Lun HuangIn-Context Learning