pith. sign in

arxiv: 2501.15030 · v2 · pith:BWULN2KFnew · submitted 2025-01-25 · 💻 cs.LG · cs.AI· cs.CL· cs.PF

OptiSeq: Ordering Examples On-The-Fly for In-Context Learning

classification 💻 cs.LG cs.AIcs.CLcs.PF
keywords optiseqexamplesorderaccuracybestin-contextllmsmultiple
0
0 comments X
read the original abstract

Developers using LLMs and LLM-based agents in their applications have provided plenty of anecdotal evidence that in-context-learning (ICL) is fragile. In this paper, we show that in addition to the quantity and quality of examples, the order in which the in-context examples are listed in the prompt affects the output of the LLM and, consequently, their performance. While prior work has explored improving ICL through dataset-dependent techniques, we introduce OptiSeq, a purely inference-time, dataset-free optimization method that efficiently determines the best example order. OptiSeq leverages log probabilities of LLM-generated outputs to systematically prune the search space of possible orderings and recommend the best order(s) by distinguishing orderings that yield high levels of accuracy and those that underperform. Extensive empirical evaluation on multiple LLMs, datasets, and prompts demonstrate that OptiSeq improves accuracy by 5.5 - 10.5 percentage points across multiple tasks.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 5 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. AdapShot: Adaptive Many-Shot In-Context Learning with Semantic-Aware KV Cache Reuse

    cs.AI 2026-05 unverdicted novelty 6.0

    AdapShot adaptively tunes shot count via entropy probes and reuses semantically-matched KV caches with position decoupling to deliver ~10% accuracy gains and 4.64x speedup over fixed-shot baselines.

  2. AdapShot: Adaptive Many-Shot In-Context Learning with Semantic-Aware KV Cache Reuse

    cs.AI 2026-05 unverdicted novelty 6.0

    AdapShot adaptively optimizes shot counts via probe entropy and semantic KV cache reuse with decoupling, reporting ~10% gain and 4.64x speedup over DBSA.

  3. Where to Place the Query? Unveiling and Mitigating Positional Bias in In-Context Learning for Diffusion LLMs via Decoding Dynamics

    cs.CL 2026-04 unverdicted novelty 6.0

    Query position is a first-order variable in dLLM ICL whose variance matches semantic quality impact; mitigated via Average Confidence metric and training-free Auto-ICL routing.

  4. The PICCO Framework for Large Language Model Prompting: A Taxonomy and Reference Architecture for Prompt Structure

    cs.CL 2026-04 accept novelty 5.0

    PICCO is a five-element reference architecture (Persona, Instructions, Context, Constraints, Output) for structuring LLM prompts, derived from synthesizing prior frameworks along with a taxonomy distinguishing prompt ...

  5. The Prompt Engineering Report Distilled: Quick Start Guide for Life Sciences

    cs.CL 2025-09 unverdicted novelty 3.0

    The paper reduces a broad set of prompt engineering techniques to six core approaches and applies them to life sciences use cases while addressing common LLM pitfalls.