QRAE cuts deep search context size and speeds reasoning by 30 percent
QRAE: Query-Relevant Attention Entropy for Context Compression in DeepSearch Agents
Machine Learning
Summary
When AI agents search for information and use what they find in steps of reasoning, carrying too much extra data slows them down and wastes resources. The authors propose QRAE, a way to pick and keep only the most useful information for future steps by measuring how relevant and clear each chunk is. This method reduces the amount of data stored and processed without needing extra model passes or changes to the AI architecture. The authors show that using QRAE makes the AI more accurate while making it faster and less costly in computation.
What this means in practice
- •For software engineers building ai search agents: Reduce the data size passed between sequential reasoning steps in search-based AI agents to speed processing and improve accuracy.
- •For cloud ai service operators: Lower token consumption and latency for large language models handling multi-step retrieval and reasoning tasks to reduce operating costs.
Authors
Yingjie Tan, Haiquan Qiu, Quanming Yao, Manyi Zhong, Xianzhi Yu, Yaqing Wang
Abstract
DeepSearch LLM agents repeatedly search and carry retrieved sources into subsequent reasoning steps. This expanding context increases token consumption and latency, although many results do not contribute to later reasoning. We propose Query-Relevant Attention Entropy (QRAE), an online context compression method that uses sparse evidence-assessment heads to decide which intact retrieved chunks should persist across reasoning steps. It scores bounded candidate batches through paired prefills: a query-free control suppresses shared attention responses, while normalized entropy measures the breadth of the positive response within each chunk. High-scoring chunks enter a persistent evidence whitelist and are included in the reasoning context. Uncertain chunks remain outside the reasoning context but are retained in a candidate cache, where they can be retrieved for later reevaluation. QRAE requires neither an additional generative compression pass nor modification of the attention operator. Across multiple DeepSearch benchmarks and reasoning models, QRAE improves task success by an average of 2.35 percentage points and reduces end-to-end latency and reported token usage by an average of 30% and 45%, respectively. These benefits generalize to a model with nearly 100B parameters.