arXiv:2610.33768cs.IROct 2026

Manuscript Offprint

arXiv:2610.33768

SkillQR: Agentic Skill Discovery for Reason-Intensive Query Rewriting

Kenan Jiang, Meixiu Long, Zihao Zhang, Ran Xu, Eugene Agichtein, Fei Liu

Abstract

Dense retrievers provide grounded evidence that mitigates hallucinations in outputs from Large Language Models (LLMs). Real-world queries are often verbose, ambiguously framed, or require multi-step reasoning, introducing irrelevant details that weaken semantic matching for dense retrievers. Query rewriting is a widely adopted pre-retrieval technique that leverages LLMs to reformulate queries and bridge the semantic gap between such queries and the retrieval target. Existing rewriting approaches either rely on expensive proprietary models, substantial training data, or iterative retrieval and rewriting, while largely applying a uniform rewriting strategy regardless of the retrieval corpus. We observe that effective query rewriting instructions are not universal: the optimal strategy depends on the retrieval target, rather than the model alone. We introduce SkillQR, a query rewriting framework that automatically discovers reasoning strategy sets from the retrieval target and dynamically routes a query to the appropriate rewriting strategy at inference time. Without relying on training data, SkillQR achieves competitive performance compared to fine-tuned rewriting models on the BRIGHT and R2MED benchmarks, while also providing lower inference latency than iterative rewriting approaches.

1 Introduction

Retrieval is a core component of modern search and retrieval-augmented generation (RAG) systems (Karpukhin et al., 2020; Su et al., 2023; Wang et al., 2024b; Sengupta et al., 2026). Retrieval quality directly determines the evidence available for downstream generation (Lewis et al., 2020; Xu et al., 2024, 2025). In real-world applications, however, user queries rarely appear in a retrieval-friendly form. Instead, they are often indirect, ambiguously framed, and expressed through surface context rather than the underlying information need (Asai et al., 2023). Such queries may contain irrelevant details or omit critical structure, which hinders effective retrieval. This challenge is especially pronounced in reason-intensive retrieval, where successful retrieval requires inferring the latent reasoning that connects the query to relevant evidence (Chen et al., 2025; Su et al., 2025; Shao et al., 2025). As a result, even strong dense retrievers can fail when the surface form of the query does not align with the retrieval target.

Query rewriting (Wang et al., 2023; Yao et al., 2025; Ma et al., 2023) is a natural approach to this problem. The key idea is to transform the original query into a form that better reflects the information needed for retrieval, such as implicit concepts, intermediate reasoning steps, or structural constraints. Recent work shows that such reformulation can substantially improve retrieval for complex and reasoning-intensive queries, making rewriting a practical interface between users and retrievers (Qin et al., 2025; Zhong et al., 2025; Lai et al., 2025). Despite these advantages, existing query rewriting systems remain limited in both efficiency and adaptability. Many approaches rely on expensive proprietary LLMs or on reinforcement learning (RL)-based training with substantial curated data (Chen et al., 2025; Qin et al., 2025). Others depend on iterative retrieval-and-rewrite procedures or repeated corpus interaction, which further increases inference cost and latency (Lei et al., 2025; Li et al., 2025a). As a result, current methods can be costly to build, difficult to transfer across corpora, and impractical to deploy in privacy-sensitive or resource-constrained settings.

Beyond these practical limitations, existing approaches largely keep the rewriting strategy fixed across retrieval settings, such as an instruction to "generate relevant knowledge for the query", with improvements coming mainly from stronger models or additional training. We argue that this is fundamentally incomplete: the optimal rewrite de-pends not only on the query, but also on the target corpus. For example, the query "how to implement binary search" requires fundamentally different rewrites when targeting theoretical computer science papers versus Python Stack Overflow answers. However, this dependence on the retrieval target is largely overlooked in prior work. This motivates a corpus-aware view of query rewriting, in which the rewriting strategy should adapt to the corpus rather than remain fixed.

Together, these challenges highlight the need for a lightweight and adaptive query rewriting framework that improves retrieval through better strategy design rather than heavier models or iterative procedures. Motivated by this perspective, we propose SkillQR, a training-free query rewriting framework that automatically discovers corpus-grounded reasoning strategies and dynamically applies them at inference time. SkillQR extracts a compact set of rewriting strategies from the target corpus and routes each query to the appropriate strategy, enabling rewriting that is aligned with the retrieval target. Our contributions are summarized as follows:

• We show that the rewriting strategy impacts retrieval performance, and that it should be conditioned on the retrieval target.

• We propose SkillQR, a corpus-guided query rewriting framework that automatically discovers reusable rewriting skills without requiring relevance labels or model fine-tuning. 1^{1}

• We evaluate SkillQR against existing rewriting methods on two reason-intensive retrieval benchmarks, BRIGHT and R2MED, demonstrating performance comparable to previous methods using fewer resources.