Effective Dense Retrieval using Only In-Context Examples
Nour Jedidi, Abdul Basit Ali, Hang Li, Jimmy Lin
Key points
From the paper's conclusion- Our results demonstrate that RICE embeddings can substantially improve the accuracy of prompt-based LLM embeddings, establishing it as a simple method to build LLM-based dense retrievers that do not require training.
Abstract
Turning decoder-only large language models (LLMs) into strong dense retrievers typically requires some form of retriever training. In this paper, we ask whether LLMs can instead be prompted to produce effective representations for dense retrieval given only a few in-context examples. To answer this, we introduce RICE (Representations from In-Context Examples), a simple "training-free" approach that extracts high-quality dense representations from LLMs. To do so, RICE conditions the LLM on examples that provide a shared context for query and document encoding. Our results demonstrate that RICE embeddings can substantially improve the accuracy of prompt-based LLM embeddings, establishing it as a simple method to build LLM-based dense retrievers that do not require training. We release our code at https://github.com/nourj98/RICE.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Retriever-Free Retrieval: Navigating Documents with Decision ModelsarXiv · 2026
- Retrieval-augmented generation for natural language processing: a surveyArtificial Intelligence Review · 2026
- ZeroRAG: Adaptive Semantic Peer Routing for Decentralized Retrieval-Augmented GenerationarXiv · 2026
- Embeddings vs. Grep: Rethinking the Dense Advantage in Code SearcharXiv · 2026
- When Direction Matters: Diagnosing Relational Instruction Following in Dense RetrievalarXiv · 2026
- REDSI: Addressing the Reproducibility and Evaluation Consistency of Differentiable Search Indexing for Document RetrievalarXiv · 2026