Abstract: Traditional information retrieval (IR) methods excel at textual and semantic matching but struggle in reasoning-intensive retrieval tasks that require multi-hop inference or complex semantic understanding between queries and documents. One promising solution is to explicitly rewrite or augment queries using large language models (LLMs) to elicit reasoning-relevant content prior to retrieval. However, the widespread use of large-scale language models like GPT-4 or LLaMA3-70B remains impractical due to their high inference cost and limited deployability in real-world systems. In this work, we introduce TongSearch QR (Previously Known as "TongSearch Reasoner"), a family of small-scale language models for query reasoning and rewriting in reasoning-intensive retrieval. With a novel semi-rule-based reward function, we employ reinforcement learning approaches enabling smaller language models, e.g., Qwen2.5-7B-Instruct and Qwen2.5-1.5B-Instruct, to achieve query reasoning performance rivaling large-scale language models without their prohibitive inference costs. Experiment results on BRIGHT benchmark show that with BM25 as retrievers, both TongSearch QR-7B and TongSearch QR-1.5B models significantly outperform existing baselines, including prompt-based query reasoners and some latest dense retrievers trained for reasoning-intensive retrieval tasks, offering superior adaptability for real-world deployment.
Bridging the Reasoning Gap in Retrieval
Traditional Information Retrieval (IR) systems—whether they use keyword matching (BM25) or modern vector embeddings—excel at finding documents that look like the query. However, they struggle with reasoning-intensive retrieval. Imagine a programmer asking for an "alternative to Function A." The perfect documentation might describe "Function B" without ever mentioning Function A. A standard retriever fails here because there is no lexical or shallow semantic overlap. To find the right answer, the system must first reason that Function B serves the same purpose as Function A.
While large language models (LLMs) like GPT-4 can perform this "query reasoning" (rewriting the query to include necessary background logic), they are often too slow and expensive to sit in the middle of a real-world production search pipeline. TongSearch-QR addresses this by getting "frontier-level" reasoning out of "mobile-sized" models.
Methodology: Reinforced Query Reasoning
The researchers developed TongSearch-QR by fine-tuning Qwen2.5-Instruct models using Group Relative Policy Optimization (GRPO), the same RL algorithm used by DeepSeek-R1.
The core innovation is their semi-rule-based reward function. In retrieval, "correctness" is fuzzy compared to math or coding. The authors solve this by using a frozen, third-party embedding model (like bge-base-en) to calculate a reward based on the incremental relevance score. Essentially, the model is rewarded if its "reasoned" query is mathematically closer to the ground-truth document than the original user query was. This approach allows the model to explore different reasoning paths without needing expensive human-annotated "gold" reasoning chains for every training example.
Experimental Results and Efficiency
Evaluations were conducted on the BRIGHT benchmark, a dataset specifically designed to test reasoning-intensive retrieval across domains like biology, coding, and mathematics.
Performance Gains
On the BRIGHT benchmark using a standard BM25 retriever, TongSearch-QR-7B achieved an NDCG@10 of 27.9, surpassing GPT-4o (26.5) and performing comparably to much larger specialized models like QwQ-32B (28.9). When paired with ReasonIR (a retriever specifically trained for reasoning), TongSearch-QR-7B reached a state-of-the-art score of 31.9, showing that query reasoning and better embedding models are complementary.
Unprecedented Efficiency
The primary advantage of TongSearch-QR is its cost-effectiveness. As shown in the performance-cost analysis, the small-scale models occupy the "sweet spot" of the Pareto frontier.
The 7B model achieved an efficiency score (Performance/Cost) of 279.0, compared to GPT-4o’s 2.7. This 100x improvement in cost-effectiveness makes query reasoning viable for high-traffic applications. Even the tiny 1.5B version remained highly competitive, outperforming several "non-reasoning" LLM baselines while being nearly free to run.
Key Insights and Future Directions
- RL beats SFT for "Noisy" Data: Reinforcement Learning (RL) significantly outperformed Supervised Fine-Tuning (SFT) when training on human answers. SFT tries to force the model to mimic every token of a human answer, whereas RL only cares if the final output improves retrieval.
- The "Explicit Thinking" Paradox: In retrieval, the reasoning is the answer; the expanded context provided by the thoughts is exactly what the retriever needs to see. Thus, explicitly separating "thinking" from the "final answer" did not provide the same boost seen in mathematical reasoning tasks.
Future work involves extending these techniques to multi-modal reasoning, iterative agentic retrieval, and scaling reward models to further boost small-model performance.
Summary updated