Learning to Route Queries Across Knowledge Bases for Step-wise Retrieval-Augmented Reasoning

Chunyi Peng, Zhipeng Xu, Zhenghao Liu, Yishan Li, Yukun Yan, Shuo Wang, Zhiyuan Liu, Yu Gu, Minghe Yu, Ge Yu, Maosong Sun · DOI

Abstract

Multimodal Retrieval-Augmented Generation (MRAG) systems often rely on static retrieval pipelines that fail to leverage the reasoning capabilities of Large Language Models (LLMs). We present R1-Router, a framework that enables models to dynamically decide when to search and which knowledge base—text, image, or table—to query during step-by-step reasoning. Trained with Step-wise Group Relative Policy Optimization (Step-GRPO), R1-Router achieves a 7% performance gain over existing static RAG models by adopting an iterative, agentic approach to knowledge acquisition.

Introduction

Retrieval-Augmented Generation (RAG) is a critical technique for grounding LLMs in external knowledge to mitigate hallucinations. However, as tasks grow in complexity, the required information often spans multiple modalities. Current MRAG systems are typically rigid, fetching data from a single predefined source. They lack the flexibility to decompose a complex query—such as identifying a bird species from an image and then retrieving its specific taxonomy from a text database. R1-Router addresses this by transforming retrieval into a dynamic, multi-step reasoning process.

Comparison of RAG architectures: (a) Vanilla RAG, (b) Search-o1, and (c) R1-Router. R1-Router uses an iterative "Think-Route-Query" loop to navigate multimodal knowledge bases.

Methodology: The R1-Router Framework

R1-Router, built on the Qwen2.5-VL-7B multimodal model, operates through an iterative agentic loop:

  1. Reasoning: The model evaluates its current knowledge state.
  2. Routing: It generates a sub-query and selects the optimal retriever (Text, Text-Image, or Table).
  3. Integration: It fetches data, answers the sub-query, and updates its context.
  4. Iteration: This process repeats (up to three times) until a final answer is reached.

Step-wise Group Relative Policy Optimization (Step-GRPO)

To train this behavior, the authors developed Step-GRPO. Unlike standard reinforcement learning (RL) that only rewards the final output, Step-GRPO provides fine-grained rewards for each step of the reasoning trajectory. The model is incentivized for generating relevant sub-queries, selecting the correct knowledge base, and producing accurate intermediate answers. This approach prevents the rigid memorization common in Supervised Fine-Tuning (SFT) and encourages generalized reasoning.

Experimental Evaluation

R1-Router was evaluated across six benchmarks covering Text QA (2WikiMultihopQA), Visual QA (InfoSeek, Dyn-VQA, WebQA), and Table QA (Open-WikiTable, TabFact).

Training dynamics and efficiency: Step-GRPO shows steady reward growth and optimizes the number of retrieval steps required for complex tasks.

Key Results

  • Superior Accuracy: R1-Router achieved an average F1-Recall of 55.93%, outperforming the IterRetGen baseline (48.29%) by over 7%.
  • RL vs. SFT: Step-GRPO yielded a >10% improvement over SFT, demonstrating that exploration-based learning is superior for complex routing tasks.
  • Efficiency Gains: By planning more effectively, R1-Router often requires fewer retrieval steps than baseline models, particularly in VQA and TableQA scenarios.

Discussion and Insights

A key finding is the necessity of cross-modal synergy. R1-Router frequently initiates a search in the image corpus to identify an object and then pivots to the text corpus for factual details. This behavior mimics human research patterns.

However, the framework faces challenges regarding inference latency due to its multi-step nature. Additionally, the reliance on synthetic "golden trajectories" for RL training presents a potential data bottleneck. Future work aims to scale this approach toward "universal RAG systems" capable of coordinating across massive, heterogeneous real-world databases.

Conclusion

R1-Router demonstrates that integrating dynamic routing into the reasoning process significantly enhances the performance of multimodal RAG systems. By training models to autonomously navigate diverse information sources, we move closer to truly agentic AI capable of sophisticated problem-solving.

Summary updated

BibTeX
@misc{peng2025learning,
  author = {Chunyi Peng and Zhipeng Xu and Zhenghao Liu and Yishan Li and Yukun Yan and Shuo Wang and Zhiyuan Liu and Yu Gu and Minghe Yu and Ge Yu and Maosong Sun},
  title = {{Learning to Route Queries Across Knowledge Bases for Step-wise Retrieval-Augmented Reasoning}},
  year = {2025},
  eprint = {2505.22095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.22095},
}
Figure