The knowledge base in a retrieval-augmented generation (RAG) system is typically assembled once and never revised, even though the facts a query requires are often fragmented across documents and buried in irrelevant content. We argue that the knowledge base should be treated as a trainable component and propose WriteBack-RAG, a framework that uses labeled examples to identify where retrieval succeeds, isolate the relevant documents, and distill them into compact knowledge units that are indexed alongside the original corpus. Because the method modifies only the corpus, it can be applied once as an offline preprocessing step and combined with any RAG pipeline. Across four RAG methods, six benchmarks, and two LLM backbones, WriteBack-RAG improves every evaluated setting, with gains averaging +2.14%. Cross-method transfer experiments further show that the distilled knowledge benefits RAG pipelines other than the one used to produce it, confirming that the improvement resides in the corpus itself.
翻译:检索增强生成(RAG)系统中的知识库通常一次性构建后永不修改,尽管查询所需的事实往往分散在多个文档中且被无关内容掩盖。我们主张应将知识库视为可训练组件,并提出WriteBack-RAG框架——通过标注样本识别检索成功区域,分离相关文档并将其蒸馏为紧凑知识单元,与原始语料库共同建立索引。由于该方法仅修改语料库,可作为离线预处理步骤一次性应用,并与任意RAG流水线兼容。在四种RAG方法、六个基准测试和两个大语言模型骨干上的实验表明,WriteBack-RAG在全部评估场景中均实现性能提升,平均增益达+2.14%。跨方法迁移实验进一步证明,蒸馏知识能惠及除生产该知识的RAG流水线以外的其他管道,证实改进效果根植于语料库本身。