Learning to Select In-Context Demonstration Preferred by Large Language Model

2Citations
Citations of this article
10Readers
Mendeley users who have this article in their library.
Get full text

Abstract

In-context learning (ICL) enables large language models (LLMs) to adapt to new tasks during inference using only a few demonstrations. However, ICL performance is highly dependent on the selection of these demonstrations. Recent work explores retrieval-based methods for selecting query-specific demonstrations, but these approaches often rely on surrogate objectives such as metric learning, failing to directly optimize ICL performance. Consequently, they struggle to identify truly beneficial demonstrations. Moreover, their discriminative retrieval paradigm is ineffective when the candidate pool lacks sufficient high-quality demonstrations. To address these challenges, we propose GENICL, a novel generative preference learning framework that leverages LLM feedback to directly optimize demonstration selection for ICL. Experiments on 19 datasets across 11 task categories demonstrate that GENICL achieves superior performance than existing methods in selecting the most effective demonstrations, leading to better ICL performance. The project website is at https://foundation-model-research.github.io/GenICL.

Cite

CITATION STYLE

APA

Zhang, Z., Lan, S., Song, L., Bian, J., Li, Y., & Ren, K. (2025). Learning to Select In-Context Demonstration Preferred by Large Language Model. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (pp. 11345–11360). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2025.findings-acl.592

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free