← Latest papers
💬 NLP

RARe: Retrieval Augmented Retrieval with In-Context Examples

RARe is a method that enhances the performance and out-of-domain generalization of encoder-only text retrievers by fine-tuning them to utilize semantically similar query-document pairs as in-context examples.

Original authors: Atula Tejaswi, Yoonsang Lee, Sujay Sanghavi, Eunsol Choi

Published 2026-02-10
📖 3 min read☕ Coffee break read

Original authors: Atula Tejaswi, Yoonsang Lee, Sujay Sanghavi, Eunsol Choi

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a librarian in a massive, infinite library. A person walks up to you and asks a very vague question: "Tell me about that thing with the economic dispatch."

If you are a Standard Retriever, you look at that one sentence, search your brain, and try to find a book. You might find something, but because the question was a bit fuzzy, you might grab a book on "General Economics" instead of the specific "Direct Search Methods" the person actually wanted.

The researchers who wrote this paper have come up with a way to make the librarian much smarter. They call it RARe.

The Analogy: The "Show, Don't Just Tell" Librarian

Think of RARe as a librarian who doesn't just listen to your question, but also looks at a "cheat sheet" of similar questions asked by other people earlier that day.

1. The Old Way (Standard Retrieval):
The user asks: "How do I solve economic dispatch?"
The librarian thinks: "Okay, 'economic dispatch'... let me look..." (Result: Often misses the mark).

2. The "In-Context" Way (The RARe Method):
Before the librarian answers you, they quickly glance at a small notebook of recent successful interactions:

  • Example 1: Someone asked about "Direct Search Methods," and the answer was "Method X."
  • Example 2: Someone asked about "Dynamic Dispatch," and the answer was "Method Y."
  • Now, the librarian looks at YOUR question: "How do I solve economic dispatch?"

Because the librarian saw those similar examples right before your question, their brain "clicks" into the right mode. They realize, "Ah! We are talking about specific mathematical optimization methods!" They are now much more likely to hand you the exact book you need.


What did the researchers actually do?

In technical terms, they are applying In-Context Learning (ICL)—a trick that makes giant AI models (like ChatGPT) smarter by giving them examples in the prompt—to Retrieval Models (the specialized AI that finds specific documents).

Here is the breakdown of their "recipe":

  • The Problem: Usually, if you just throw examples at a retrieval model without training it specifically to handle them, the model gets confused and performs worse. It’s like giving a chef a recipe but also throwing random ingredients on the counter; they might get distracted.
  • The Solution (RARe): They fine-tuned the model. They trained the AI specifically to look at those "cheat sheet" examples (query-document pairs) and use them to understand the target question better.
  • The "Secret Sauce": They didn't just pick random examples. They used a simple search tool (BM25) to find examples that were semantically similar to the user's question. If you ask about math, the "cheat sheet" shows math examples.

Why does this matter? (The Results)

  1. Better Accuracy: They saw performance boosts of up to 2.72%. In the world of massive AI benchmarks, that is a significant leap.
  2. Better "Out-of-the-Box" Thinking: The model became better at handling topics it hadn't seen much during training. It learned the pattern of how to use examples, which helped it generalize to new, weird subjects.
  3. Reasoning Power: It worked especially well on "reasoning" tasks—questions that require a bit of logic rather than just matching keywords.

Summary in one sentence:

RARe turns a "keyword matcher" into a "context-aware expert" by training it to learn from similar examples provided right alongside your question.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →