Selective query expansion trims agent-memory retrieval cost, with modest measured gains
A study of software-agent memory retrieval finds that expanding only low-confidence queries cuts LLM token use sharply, but the reported accuracy gain is small and statistically uncertain.
In plain words
Software agents that work over long tasks save records of what they did and later search them with plain-language questions. The paper tests a method that rewrites a search query with extra hypothetical details only when the first search attempt looks weak. This saved tokens compared with rewriting every query, but the accuracy improvement was small and not clearly reliable.
What was announced
The arXiv paper, whose abstract is the basis of this report, examines Selective Query-Side Expansion (SQE), a technique for long-horizon software agents that store execution traces and answer natural-language questions by retrieving them. Because queries and stored traces differ in wording, large language model query expansion can bridge the gap, but expanding every query costs generation on each one. SQE instead expands a query with hypothetical execution traces and paraphrases only when the top-1 dense retrieval score is low, then merges all rankings with Reciprocal Rank Fusion.
Across 8 resampled memory stores with rebuilt indices and 4,000 queries over SWE-smith agent steps, the authors report SQE reaching 69.4% Recall@5 while expanding 48% of queries, and a token-measured rerun using 55% fewer LLM tokens than always-on expansion. However, the observed gain over dense retrieval is 0.9 Recall@5 points, with a 95% confidence interval of +0.1 to +1.7 and a Holm-adjusted p-value of 0.092, so it is not statistically significant at the 0.05 level. Recall@1 drops, and the fixed top-1 gate shows no reliable gain over random selection at a similar budget. An oracle analysis found expansion helps only 5.3% of queries and hurts 4.2%, capping a perfect gate's gain at 5.3 points. The authors release the memory stores, per-method summaries, and analysis scripts.
What it does not show
- This report relies only on the paper's abstract; full-method details, baselines, and peer review status are not verifiable from the supplied excerpt.
For security and IT teams
- Scope
- The findings apply to retrieval over SWE-smith agent execution traces in the study's 8 resampled memory stores, not to agent memory systems generally.
Sources
Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 5 Dec 2026
New to the subject? AI from the Ground Up starts from the beginning.