Manuscript Offprint

arXiv:2610.21512

QREF: Improving DeepSearch Agents by Aligning Search with Reasoning via Query Refinement and Evidence Filtering

Yujia Chen, Yuhui Wang, Junzhe Wang, Shihan Dou, Di Liang, Yujiong Shen, Yuhao Zhou, Zhiheng Xi, Ming Zhang, Senjie Jin, Jiayi Chen, Dingwei Zhu, Yajie Yang, Yuan Hua, Chenyao Lu, Tao Gui, Qi Zhang, Xuanjing Huang

Yujia Chen 1,2∗^{1,2*}, Yuhui Wang 1,2∗^{1,2*}, Junzhe Wang 1,2∗^{1,2*}, Shihan Dou 1^{1}, Di Liang 2^{2}, Yujiong Shen 1^{1}, Yuhao Zhou 1^{1}, Zhiheng Xi 1^{1}, Ming Zhang 1^{1}, Senjie Jin 1^{1}, Jiayi Chen 1^{1}, Dingwei Zhu 1^{1}, Yajie Yang 1^{1}, Yuan Hua 2^{2}, Chenyao Lu 2^{2}, Tao Gui 1†^{1\dagger}, Qi Zhang 1^{1}, Xuanjing Huang 1^{1}

1^{1}Fudan University 2^{2}Tencent

tgui@fudan.edu.cn

Abstract

DeepSearch agents achieve strong performance on complex information-seeking tasks through iterative search and reasoning. However, they often issue intent-misaligned, underconstrained, or redundant search queries, resulting in poor evidence coverage and accumulating retrieval noise. To mitigate these limitations, we propose QREF, a plug-and-play Query Refiner and Evidence Filter. Specifically, the Query Refiner rewrites search queries according to the current reasoning intent while ensuring complementary coverage across each search batch. The Evidence Filter retains evidence relevant to both the current search batch and the reasoning objective, reducing distracting retrieval results. We initialize the Query Refiner with supervised fine-tuning and optimize it through reinforcement learning based on interactions with a real-world web search environment, reducing ineffective queries. Comprehensive experiments demonstrate that our approach improves the performance of DeepSearch agents across four challenging benchmarks, achieving average relative Pass@1 improvements of 33.55% on WebSailor and 11.04% on TongyiDeepResearch without modifying architectures or retraining their reasoning policies. Compared with the original DeepSearch backbone without QREF, the RL-trained refiner reduces the fraction of query batches that lack discriminative retrieval anchors by 95%. Compared with the SFT-trained refiner, it also lowers the filter-based ineffective query ratio.

1 Introduction

Large language models (LLMs) have demonstrated remarkable capabilities in mathematical reasoning (Guo et al. 2025), code generation (Li et al. 2022), and logical reasoning (Wei et al. 2022). However, hallucinations and unreliable parametric knowledge can still cause factual errors on knowledge-intensive or domain-specific tasks (Wang et al. 2024). To overcome these limitations, DeepSearch agents interleave reasoning with iterative web search to progressively gather external evidence for complex knowledge-intensive tasks. Existing methods have improved search performance through enhanced planning, memory mechanisms, and reinforcement learning (Li et al. 2025; Wu et al. 2026a; Gao et al. 2025; Tao et al. 2025b). However, the quality of intermediate search queries, which strongly influences retrieval effectiveness at each search step, has received much less attention. During search, the agent must translate its evolving reasoning state into one or more executable queries. These queries serve as the interface between reasoning and retrieval, yet their quality is typically optimized only implicitly as part of the overall agent policy.

To characterize query failures in DeepSearch agents, we analyze 300 trajectories generated by WebSailor-32B (Li et al. 2025) and identify three recurring failure patterns in intermediate search queries: Missing Discriminative Constraints, Low Query Specificity, and Redundant Query Diversification. Missing Discriminative Constraints and Low Query Specificity reflect failures of individual queries to adequately capture the retrieval intent implied by the current reasoning state, whereas Redundant Query Diversification reflects insufficient complementary coverage of retrieval intents across queries within the same search batch. Analysis of 1,992 query batches shows that each of the three failure patterns occurs in more than 20% of batches, while 47.04% of batches contain at least one failure. Moreover, unsuccessful trajectories accumulate nearly three times as many ineffective queries as successful ones on average, with the gap emerging as early as the first search round. These findings identify intermediate query quality as a critical factor for effective retrieval and multi-hop reasoning.

Recent methods have begun to improve intermediate search behavior through process supervision or retrieval-grounded reinforcement learning (Tao et al. 2025a; Zheng et al. 2025a; Wen, Dong, and Dou 2026). Nevertheless, two limitations remain. First, query optimization is generally learned within the search agent's reasoning policy or trajectory-generation process, which limits its reuse with already-trained agents. Second, existing methods typically assess or rewrite queries individually, whereas a DeepSearch step may issue a query batch whose collective coverage matters. Moreover, query reformulation alone cannot prevent real-world search engines from returning irrelevant, redun-

∗^{*}These authors contributed equally.

†^{\dagger}Corresponding author.

Figure

Figure 1: Overview of the QREF integrated into a tool-augmented DeepSearch agent.

dant, or overly broad evidence. Effective interface optimization therefore requires improving both directions of communication: translating reasoning states into complementary retrieval actions before search, and controlling which retrieved evidence is returned to the reasoning loop afterward.

In this work, we present QREF, a plug-and-play Query Refiner and Evidence Filter for DeepSearch agents. Figure 1 provides an overview of QREF and its integration into the reasoning–search loop of a DeepSearch agent. Specifically, QREF consists of two components. Before retrieval, the Query Refiner rewrites intermediate queries into self-contained, specific, and search-effective formulations while preserving the agent's reasoning intent and ensuring complementary coverage across the search batch. After retrieval, the Evidence Filter retains evidence relevant to both the current query and the reasoning objective, filtering irrelevant, redundant, or overly general search results to reduce retrieval noise. Our module can be integrated into existing DeepSearch agents without modifying their architectures or retraining their reasoning policies.

We first initialize the Query Refiner by supervised fine-tuning (SFT) from Qwen3-8B (Yang et al. 2025). We then further optimize it with Proximal Policy Optimization (PPO) (Schulman et al. 2017) using an entity-level retrieval reward computed by comparing the retrieval outcomes of refined and original queries in real-world web search. Compared with the SFT model, reinforcement learning further improves Pass@1 across seven of eight backbone–benchmark settings and reduces the ineffective-query ratio across all backbone–benchmark settings.

In summary, our main contributions of this work are as follows:

• We analyze 300 WebSailor-32B trajectories, identifying three recurring failure categories in intermediate queries that each occur in over 20% of query batches and are strongly associated with lower final task accuracy.

• We propose QREF, a plug-and-play Query Refiner and Evidence Filter, enabling constraint-preserving, retrieval-oriented query reformulation and evidence filtering without modifying or retraining the underlying agent.

• We develop a two-stage training strategy for the Query Refiner, combining supervised fine-tuning with PPO under a fine-grained entity-level retrieval reward that directly optimizes evidence recovery in real-world web search.

• Experiments on four benchmarks and two backbone agents demonstrate consistent improvements in retrieval quality and downstream reasoning, while reducing ineffective and redundant queries.

References (35)