Learning to Route: A Rule-Driven Agent Framework for Hybrid-Source Retrieval-Augmented Generation
Haoyue Bai, Haoyu Wang, Shengyu Chen, Zhengzhang Chen, Lu-An Tang, Wei Cheng, Yanjie Fu, Haifeng Chen
Abstract
Large Language Models (LLMs) have shown remarkable performance on general Question Answering (QA), yet they often struggle in domain-specific scenarios where accurate and up-to-date information is required. Retrieval-Augmented Generation (RAG) addresses this limitation by enriching LLMs with external knowledge, but existing systems primarily rely on unstructured documents, while largely overlooking relational databases, which provide precise, timely, and efficiently queryable factual information, serving as indispensable infrastructure in domains such as finance, healthcare, and scientific research. Motivated by this gap, we conduct a systematic analysis that reveals three central observations: (i) databases and documents offer complementary strengths across queries, (ii) naively combining both sources introduces noise and cost without consistent accuracy gains, and (iii) selecting the most suitable source for each query is crucial to balance effectiveness and efficiency. We further observe that query types show consistent regularities in their alignment with retrieval paths, suggesting that routing decisions can be effectively guided by systematic rules that capture these patterns. Building on these insights, we propose a rule-driven routing framework designed specifically for hybrid-source RAG. A routing agent scores candidate augmentation paths based on explicit rules and selects the most suitable one; a rule-making expert agent refines the rules using QA feedback to produce more comprehensive and reliable decision criteria; and a path-level meta-cache reuses past routing decisions for semantically similar queries to reduce latency and cost. Experiments on three QA datasets demonstrate that our framework consistently outperforms static strategies and learned routing baselines, achieving higher accuracy while maintaining moderate computational cost.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
- Improving Language Models by Retrieving from Trillions of Tokens cites Dense Passage Retrieval for Open-Domain Question Answering
- Improving Language Models by Retrieving from Trillions of Tokens cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Dense Passage Retrieval for Open-Domain Question Answering cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks cites Dense Passage Retrieval for Open-Domain Question Answering
- Chain-of-Knowledge: Grounding Large Language Models via Dynamic Knowledge Adapting over Heterogeneous Sources cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions cites Improving Language Models by Retrieving from Trillions of Tokens
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions cites Dense Passage Retrieval for Open-Domain Question Answering
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
Builds on15
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Improving Language Models by Retrieving from Trillions of TokensSebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai et al.ICML 2022 · 1,629 citations
- Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step QuestionsHarsh Trivedi, Niranjan Balasubramanian, Tushar Khot, Ashish SabharwalACL 2023 · 187 citations
- Chain-of-Knowledge: Grounding Large Language Models via Dynamic Knowledge Adapting over Heterogeneous SourcesXingxuan Li, Ruochen Zhao, Yew Ken Chia, Bosheng Ding et al.ICLR 2024 · 165 citations
- Dense Passage Retrieval for Open-Domain Question AnsweringVladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis et al.EMNLP 2020 · 142 citations
Related papers
- Retrieval-Augmented Generation with Estimation of Source ReliabilityJeongyeon Hwang, Junyoung Park, Hyejin Park, Dongwoo Kim et al.EMNLP 2025 · 6 citations
- CoRAG: Enhancing Hybrid Retrieval-Augmented Generation through a Cooperative Retriever ArchitectureZaiyi Zheng, Song Wang, Zihan Chen, Yaochen Zhu et al.EMNLP Findings 2025 · 1 citation
- HybGRAG: Hybrid Retrieval-Augmented Generation on Textual and Relational Knowledge BasesMeng-Chieh Lee, Qi Zhu, Costas Mavromatis, Zhen Han et al.ACL 2025
- Query-Aware Knowledge Retrieval via Hyperbolic StructuringChuang Zhou, Junnan Dong, Yilin Xiao, Shengyuan Chen et al.ACL 2026
- RouteRAG: Efficient Retrieval-Augmented Generation from Text and Graph via Reinforcement LearningYucan Guo, Miao Su, Saiping Guan, Zihao Sun et al.ACL Findings 2026 · 2 citations
