W-RAG: Source-Aware Retrieval for Enterprise Document Generation from Heterogeneous Knowledge Bases
Organizations: The University of Texas at Dallas · DIGITAL MANAGEMENT, LLC (DMI) · Massachusetts Institute of Technology
Abstract
Retrieval-Augmented Generation (RAG) enables large language models to incorporate external knowledge during generation, improving factual grounding and domain adaptability. However, existing RAG pipelines assume that evidence retrieved from multiple repositories can be ranked globally using a single similarity function. While suitable for open-domain retrieval, this assumption breaks down in enterprise document generation, where heterogeneous knowledge bases (such as policies, regulations, technical documentation, and departmental guidelines) serve distinct roles and must be jointly represented in the generated document. As a result, global ranking often produces unbalanced context dominated by a subset of sources, leading to incomplete enterprise drafts. To address this limitation, we propose W-RAG, a source-aware retrieval framework that performs ontology-guided retrieval, local ranking within each knowledge base, and source-level weighting to regulate evidence composition. We further introduce a new dataset for retrieval-grounded enterprise document generation spanning multiple document types and industry domains. Experiments show that standard RAG pipelines struggle on this task, while W-RAG significantly improves document coverage and generation quality.
Figures & tables
| AI Technology & Digital Media | Climate & Sustainability | Healthcare & Telehealth | Finance | ||||||
| Document Type | RAG Algorithm | Requirement Satisfaction (%) | Context Relevancy(%) | Requirement Satisfaction(%) | Context Relevancy(%) | Requirement Satisfaction(%) | Context Relevancy(%) | Requirement Satisfaction(%) | Context Relevancy(%) |
| Policies | Vanilla RAG | 25 | 57 | 38 | 32 | 25 | 30 | 34 | 41 |
| OG-RAG | 34 | 73 | 68 | 72 | 35 | 40 | 51 | 48 | |
| W-RAG | 78 | 76 | 76 | 70 | 55 | 70 | 60 | 79 | |
| Product Launch | Vanilla RAG | 34 | 45 | 35 | 40 | 22 | 28 | 37 | 40 |
| OG-RAG | 38 | 74 | 56 | 50 | 33 | 45 | 5 | 52 | |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Essential Item | Max Points |
|---|---|
| Scope clearly defined | 3 |
| Governance structure identified | 3 |
| Roles & responsibilities assigned | 3 |
| Clinical/legal standards specified | 3 |
| Risk controls / escalation paths | 2 |
| Quality metrics defined | 2 |