Saved in:
Bibliographic Details
Main Authors: Gao, Xiang, Sinha, Ankita, Das, Kamalika
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.08030
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929752760123392
author Gao, Xiang
Sinha, Ankita
Das, Kamalika
author_facet Gao, Xiang
Sinha, Ankita
Das, Kamalika
contents Large language models (LLMs) demonstrate impressive few-shot learning capabilities, but their performance varies widely based on the sequence of in-context examples. Key factors influencing this include the sequence's length, composition, and arrangement, as well as its relation to the specific query. Existing methods often tackle these factors in isolation, overlooking their interdependencies. Moreover, the extensive search space for selecting optimal sequences complicates the development of a holistic approach. In this work, we introduce Beam Search-based Example Sequence Constructor (BESC), a novel method for learning to construct optimal example sequences. BESC addresses all key factors involved in sequence selection by considering them jointly during inference, while incrementally building the sequence. This design enables the use of beam search to significantly reduce the complexity of the search space. Experiments across various datasets and language models show notable improvements in performance.
format Preprint
id arxiv_https___arxiv_org_abs_2503_08030
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Learning to Search Effective Example Sequences for In-Context Learning
Gao, Xiang
Sinha, Ankita
Das, Kamalika
Computation and Language
Large language models (LLMs) demonstrate impressive few-shot learning capabilities, but their performance varies widely based on the sequence of in-context examples. Key factors influencing this include the sequence's length, composition, and arrangement, as well as its relation to the specific query. Existing methods often tackle these factors in isolation, overlooking their interdependencies. Moreover, the extensive search space for selecting optimal sequences complicates the development of a holistic approach. In this work, we introduce Beam Search-based Example Sequence Constructor (BESC), a novel method for learning to construct optimal example sequences. BESC addresses all key factors involved in sequence selection by considering them jointly during inference, while incrementally building the sequence. This design enables the use of beam search to significantly reduce the complexity of the search space. Experiments across various datasets and language models show notable improvements in performance.
title Learning to Search Effective Example Sequences for In-Context Learning
topic Computation and Language
url https://arxiv.org/abs/2503.08030