Research map / Large language models / Retrieval and knowledge
Learning to Rank for In-Context Example Retrieval
Yuwen Ji, Luodan Zhang, Ambyerhan, Haoran Que, Lei Shi, Wang Chao, Yue Zhang
Westlake University · Beihang University · Alibaba Group
Read the paperPlace an idea next to itCheck your own paper ↗
Proposes training an in-context example retriever with a ranking objective instead of a classification objective, to match how ICEs are retrieved at inference by score ranking.
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Problem
Retrieval-based in-context learning trains retrievers with a classification objective that labels in-context examples as most useful or the rest, but at inference examples are selected by score ranking, so the training objective mismatches test-time use.
Approach
Replace the absolute-score classification objective for the ICE retriever with a learning-to-rank objective so training directly optimizes the ordering used at inference.
On benchmark leaderboards
- BoolQ leaderboard accuracy 64.6 · rank 96 of 114 papers
- AGNews leaderboard accuracy 91 · rank 53 of 114 papers
- WSC leaderboard accuracy 62.5 · rank 19 of 24 papers
- PAWS leaderboard accuracy 73 · rank 5 of 10 papers
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| train retriever with ranking objective (SeDPO) instead of classification (Se2) | in-context example retriever · PAWS | accuracy: 54.7 -> 73.0 | Improved |
| train retriever with SeDPO instead of Se2 | in-context example retriever · Paraphrase average | avg. metric: 73.2 -> 77.9 | Improved |
| add in-batch rejection (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 73.9 -> 77.9 | Improved |
| add positive chosen data filtering (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 77.9 -> 77.9 | No clear effect |
| use diverse high-margin preference pairs instead of top-1 chosen (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 70.8 -> 77.9 | Improved |
| use score-based preference pairs instead of random preference pairs (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 57.6 -> 77.9 | Improved |
| use SeDPO loss instead of LambdaRank (UDR) loss (ablation) | retriever training · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 72.9 -> 77.9 | Improved |
| use RoBERTa-base instead of BERT-base-uncased as retriever backbone (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 77.9 -> 85.7 | Improved |
| initialize Se2 retriever with trained SeDPO weights (ablation) | Se2 · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 73.2 -> 79.0 | Improved |
| initialize SeDPO with Se2 weights (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric: 77.9 -> 74.8 | Hurt |
| increase beta too far from 0.01-0.1 range (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric | Hurt |
| increase T (number of preferred/dispreferred examples) too much (ablation) | SeDPO · Paraphrase average (GPT-Neo-2.7B) | avg. metric | Mixed |
Earlier methods this paper compares with
Named baselines from earlier accepted papers in this paper's results tables: better than 1 of 1 on most shared results.
- UPRISE — UPRISE: Universal Prompt Retrieval for Improving Zero-Shot Evaluation (EMNLP 2023) · better on 5 of 5 shared results
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Open problems in retrieval-augmented reasoning
How can retrieval-augmented reasoning cut its extra LLM calls, storage and dependence on retrieval and LLM-built structures?
- Multi-step retrieval needs extra LLM calls and slows inference. · 22 papers state it
- Tested on English, or English and one other language, only. · 15 papers state it
- Graphs, trees and memories built by LLMs or parsers pass on their errors. · 12 papers state it
Closest papers by meaning
- Learning vs Retrieval: The Role of In-Context Examples in Regression with Large Language Models (NAACL 2025 · similarity 0.90)
- KITE: Kernelized and Information Theoretic Exemplars for In-Context Learning (EMNLP 2026 · similarity 0.90)
- In-Context Example Ordering Guided by Label Distributions (NAACL 2024 · similarity 0.89)
- Se²: Sequential Example Selection for In-Context Learning (ACL 2024 · similarity 0.89)
- Mixture of Demonstrations for In-Context Learning (NeurIPS 2024 · similarity 0.88)
- Scalable In-context Ranking with Generative Models (NeurIPS 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.