OptiSeq: Ordering Examples On-The-Fly for In-Context Learning
Rahul Atul Bhope, Praveen Venkateswaran, K. R. Jayaram, Vatche, Isahagian, Vinod Muthusamy, Nalini Venkatasubramanian

TL;DR
OptiSeq is a novel inference-time method that optimizes the order of in-context examples for LLMs, significantly enhancing their accuracy without dataset dependence.
Contribution
It introduces OptiSeq, a dataset-free, inference-time approach that systematically finds the best example orderings to improve LLM performance.
Findings
OptiSeq improves accuracy by 5.5 to 10.5 percentage points.
It effectively prunes the search space of example orderings.
Demonstrates consistent gains across multiple LLMs and tasks.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsIndustrial Vision Systems and Defect Detection · Anomaly Detection Techniques and Applications · Neural Networks and Applications
