Single LLM, Multiple Roles: A Unified Retrieval-Augmented Generation Framework Using Role-Specific Token Optimization
Yutao Zhu, Jiajie Jin, Hongjin Qian, Zheng Liu, Zhicheng Dou, Ji-Rong Wen
Abstract
Existing studies have optimized retrievalaugmented generation (RAG) across various sub-tasks, such as query understanding and retrieval refinement, but integrating these optimizations into a unified framework remains challenging. To tackle this problem, this work proposes RoleRAG, a unified RAG framework that achieves efficient multi-task processing through role-specific token optimization. RoleRAG comprises six modules, each handling a specific sub-task within the RAG process. Additionally, we introduce a query graph to represent the decomposition of the query, which can be dynamically resolved according to the decomposing state. All modules are driven by the same underlying LLM, distinguished by task-specific role tokens that are individually optimized. This design allows RoleRAG to dynamically activate different modules within a single LLM instance, thereby streamlining deployment and reducing resource consumption. Experimental results on five open-domain question-answering datasets demonstrate the effectiveness, generalizability, and flexibility of our framework. * Corresponding author. (c) RoleRAG, a unified RAG framework LLM Role token 1 Query Graph Builder Role token 2 Retrieval Judge Role token n Answer Reasoner … Query (a) Optimizing individual modules (e.g., query rewriter) LLM Query rewrite reflect Retriever Answer generation reflect (b) Learning all modules jointly via self-reflection (e.g., Self-RAG)
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 64ebb072-bcf2-4e21-801a-e5e60ced66a1Cited by top-tier papers1
Ask how each one uses itBuilds on9
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Active Retrieval Augmented GenerationZhengbao Jiang, Frank F. Xu, Luyu Gao, Zhiqing Sun et al.EMNLP 2023 · 315 citations
- RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective AugmentationFangyuan Xu, Weijia Shi, Eunsol ChoiICLR 2024 · 260 citations
- When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric MemoriesAlex Mallen, Akari Asai, Victor Zhong, Rajarshi Das et al.ACL 2023 · 233 citations
- Query Rewriting in Retrieval-Augmented Large Language ModelsXinbei Ma, Yeyun Gong, Pengcheng He, Hai Zhao et al.EMNLP 2023 · 191 citations
Related papers
- UniRAG: Unified Query Understanding Method for Retrieval Augmented GenerationRui Li, Liyang He, Qi Liu, Zheng Zhang et al.ACL 2025
- Optimizing Question Semantic Space for Dynamic Retrieval-Augmented Multi-hop Question AnsweringLinhao Ye, Lang Yu, Zhikai Lei, Qin Chen et al.ACL 2025 · 4 citations
- Improving Retrieval-Augmented Generation through Multi-Agent Reinforcement LearningYiqun Chen, Lingyong Yan, Weiwei Sun, Xinyu Ma et al.NeurIPS 2025 · 47 citations
- Q-RAG: Long Context Multi‑Step Retrieval via Value‑Based Embedder TrainingArtyom Y. Sorokin, Nazar Buzun, Alexander Anokhin, Egor Vedernikov et al.ICLR 2026 · 4 citations
- ArchRAG: Attributed Community-based Hierarchical Retrieval-Augmented GenerationShu Wang, Yixiang Fang, Yingli Zhou, Xilin Liu et al.AAAI 2026 · 23 citations
