Manuscript Offprint

arXiv:2611.00737

Can Jev Improve Demonstration Retrieval for In-Context Learning?

Rui Song, Yingji Li, Hao Xu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Demonstration selection plays a crucial role in the effectiveness of in-context learning (ICL) for large language models (LLMs). Extensive research has explored various retrieval strategies to identify informative demonstrations and improve downstream performance. Recently, the emergence of Jev, a decision-oriented language model capable of producing probabilistic judgments, offers a new perspective on evaluating demonstration utility. This motivates us to investigate a fundamental question: Can Jev improve demonstration retrieval for in-context learning? In this paper, we demonstrate that Jev can effectively enhance demonstration retrieval by directly assessing the utility of candidate demonstrations for a given query. However, applying Jev to large-scale retrieval introduces substantial computational overhead, as each candidate requires an additional decision-making inference. To address this limitation, we propose a simple yet effective knowledge distillation approach that transfers Jev's utility estimation capability to a lightweight multilayer perceptron (MLP). By learning to approximate Jev's probabilistic judgments, the distilled model enables efficient demonstration ranking while maintaining competitive retrieval performance. Our study highlights the potential of decision-oriented language models for demonstration selection and provides an efficient framework for integrating their decision-making capabilities into ICL.

1 Introduction

In-context learning (ICL) has emerged as a remarkable capability of large language models (LLMs), enabling them to adapt to diverse downstream tasks without requiring parameter updates (Song et al., 2024). Demonstrations serve as the foundation of ICL, allowing LLMs to infer task-relevant patterns and input-output relationships from a few labeled examples (Brown et al., 2020; Song et al.,

2026a). Consequently, extensive research has explored various demonstration selection strategies to identify informative examples and improve ICL performance.

Existing demonstration selection methods can be broadly categorized into heuristic-based and training-based approaches. Heuristic-based methods typically quantify the relevance between candidate demonstrations and a given query using lexical matching, such as BM25, semantic similarity in embedding spaces or perplexity, and select the highest/lowest-scoring candidates as demonstrations (Liu et al., 2022; Robertson and Zaragoza, 2009; Xu et al., 2026). To further improve selection quality, some approaches adopt a multi-stage retrieval paradigm, where an initial retrieval stage narrows the candidate pool based on static relevance scores, followed by further refinement that incorporates demonstration diversity, redundancy reduction, or feedback from LLMs (Hongjin et al., 2022; Peng et al., 2024; Song et al., 2026b). In contrast, training-based approaches learn task-aware retrievers by leveraging supervision signals derived from LLM predictions, likelihoods, or performance feedback to identify more informative demonstrations (Zhang et al., 2025; Wang et al., 2026).

Despite their effectiveness, heuristic-based methods often struggle to capture the actual utility of demonstrations, as predefined relevance metrics do not necessarily reflect their contribution to downstream predictions. Although training-based methods can better estimate demonstration utility through LLM feedback, they typically incur substantial computational costs and require retraining for different tasks or target models, limiting their scalability and cross-task generalizability.

Motivated by the recent emergence of Jev (Type-Safe AI, 2026), a decision model capable of making probabilistic judgments, we investigate whether its decision making capabilities can improve demonstration retrieval for ICL. Specifically, we first em-ploy heuristic retrieval to narrow the candidate pool and then leverage Jev to rerank demonstrations according to their estimated utility for a given query. Our experiments show that this simple strategy yields substantial performance improvements. However, repeatedly evaluating candidate demonstrations with Jev introduces considerable computational overhead and inference latency. To address this limitation, we propose a task agnostic distillation framework that transfers Jev's utility estimation capability to a lightweight multilayer perceptron (MLP). By learning to approximate Jev's judgments of demonstration utility, the MLP efficiently refines retrieved candidates without requiring repeated Jev inference. Experimental results demonstrate that our approach achieves a favorable balance between effectiveness and efficiency, while exhibiting strong generalizability across diverse tasks with a single distillation process. Our main contributions are summarized as follows:

  • We investigate the potential of Jev for ICL demonstration retrieval and demonstrate that its probabilistic judgments can effectively identify informative demonstrations.

  • We propose a simple and task-agnostic distillation framework that transfers Jev's demonstration utility estimation capability to a lightweight MLP, reducing computational overhead while improving generalizability across tasks.

  • Experiments across diverse tasks and LLMs demonstrate the effectiveness of our approach, achieving strong retrieval performance, improved efficiency, and robust cross-task generalization.

References (16)