UMass Amherst Fixes Search-R1's Memory Leaks Without Retraining, Boosting Accuracy 5.6%
A test-time patch for the Search-R1 agentic RAG pipeline lifts exact match by 5.6% while cutting retrieval turns by 10.5%.
ProTakeaways
- Two test-time modules for Search-R1 lift exact match 5.6% and cut turns 10.5%.
- Contextualization uses GPT-4.1-mini to distill retrieved passages into a persistent memory cache.
- De-duplication swaps already-seen documents for the next-ranked unseen passages from the retriever.
- Evaluated on 500 samples from HotpotQA and Natural Questions with Qwen2.5-7B Search-R1 (PPO).
- De-duplication alone increased searches to 2.498; contextualization dropped them to 2.142.
- Full paper from UMass Amherst and Adobe Research, no code released.
Agentic retrieval systems that let a language model call a search tool in a reasoning loop have become the default recipe for multi-hop question answering. But watch one run for long enough and the pattern becomes obvious: the model keeps searching for things it already retrieved, and it often fails to actually use the passages it fetched. A group from UMass Amherst and Adobe Research went digging into Search-R1, one of the most cited RL-trained search agents, and found both failure modes are easy to fix without retraining anything.
Their paper proposes two lightweight test-time modules that wrap around the existing pipeline. Together they push exact match up by 5.6% and cut the average number of retrieval turns by 10.5% on the same base model.
Where Search-R1 leaks accuracy and tokens
Iterative agentic frameworks like Search-R1 introduce inefficiencies, including repetitive retrieval of previously processed information and challenges in contextualizing retrieved results, leading to unnecessary retrieval turns, suboptimal reasoning, inaccurate answers, and increased token consumption. The authors ran a qualitative pass over the Qwen2.5-7B Search-R1 reasoning chains and named the two culprits: information forgetting, where the model loses track of what earlier retrievals said and issues near-duplicate queries, and ineffective information extraction, where the answer is sitting in the retrieved passage but the model never surfaces it.
For context, Search-R1 works by interleaving <think> and <search> tags. On each turn the model either commits to an answer or emits a query to a dense E5 retriever over a 2018 Wikipedia dump, which returns the top-k passages. The retrieved text is dropped verbatim into the reasoning trace, and the loop continues.
Two modules, no retraining

The fix is entirely at inference time. Each retrieval turn is intercepted by one (or both) of these components:
- Contextualization. After every retrieval, GPT-4.1-mini reads the newly fetched passages plus the original user prompt and extracts only the spans relevant to answering the question. That distilled content is appended to a persistent memory cache that grows across turns. The base LLM then reasons over the cache instead of the raw dump. The external model is instructed to preserve everything already in the cache and only add new information.
- De-duplication. A set of document IDs seen in prior turns is maintained. If the retriever returns a passage already in that set, it is discarded and replaced with the next-highest-ranking unseen document from the ranked list. With k=3, this forces exploration into passages that never made it into the previous top-3.
- Hybrid. The two run in sequence: de-duplicate first, then contextualize.
What the numbers say
Evaluation uses 500 sampled question-answer pairs from the HotpotQA and Natural Questions validation sets, with the trained Qwen2.5-7B Search-R1-base (PPO) as the baseline. Alongside standard exact match, the authors add an LLM-as-a-Judge score using GPT-4.1-mini, because Search-R1's EM suffers from obvious false negatives such as "2" vs. "Two" or "950 Pesos" vs. "P950".
| Variant | Exact Match | LLM Match | Avg. searches |
|---|---|---|---|
| Qwen2.5-7B base (PPO) | 0.464 | 0.538 | 2.392 |
| + Contextualization | 0.490 | 0.574 | 2.142 |
| + De-duplication | 0.478 | 0.560 | 2.498 |
| + Hybrid | 0.480 | 0.568 | 2.154 |
Contextualization wins on every metric. De-duplication alone is a mixed bag: accuracy improves slightly but the model actually issues more searches. The reason is telling. The baseline tends to give up on a line of inquiry once it retrieves duplicates, treating them as a signal that nothing new is available. Strip the duplicates out and the model keeps rephrasing the query looking for more context that usually was already in the first retrieval anyway.
The real takeaway for RAG builders
The stronger conclusion buried in the results is that information extraction, not retrieval breadth, is the bottleneck in current RL-trained search agents. Adding more unique documents barely helped; distilling what was already retrieved helped a lot. The 16 to 18 point gap between LLM Match and Exact Match across every variant also suggests that anyone benchmarking these systems purely on string EM is underselling their real accuracy.
A few caveats worth knowing before you drop this into production. There is no released code; the modifications are described against the public Search-R1 repository. Contextualization adds an external GPT-4.1-mini call on every retrieval turn, so wall-clock and dollar cost may rise even as the number of retriever calls drops. And the confidence intervals in the per-turn breakdown overlap, meaning the gains are averaged across easy and hard questions rather than showing a clean win on hard multi-hop cases specifically.