用语义键值对索引提升大模型问答的检索效率与准确性。
M-RAG: Semantic Key-Value Indexing for Retrieval-Augmented Generation
- 将文档拆分为带语义键和信息值的记录,分离检索与生成需求。
- 在有限上下文长度下,准确率优于或持平主流分块方法。
- 适合需要高效检索且对上下文长度敏感的问答系统使用。
检索增强生成(RAG)将外部文档作为大语言模型的证据。实际中,这本质上是数据访问问题:系统需决定索引内容、检索内容,并在令牌预算内选择上下文中的证据。现有RAG流程普遍使用文本块进行查询与生成,这耦合了两种不同目标:检索需要紧凑且具有区分性的记录,而生成则需要具备上下文连贯性和忠实性的证据。过小的块会割裂答案信息,过大的块则引入噪声并浪费上下文空间。本文提出M-RAG,一种面向资源受限的RAG查询处理的语义键值索引层。M-RAG从完整文档中提取元标记,每个记录包含检索键、信息值和来源指针。在线检索基于键字段,支持密集向量或稀疏词法检索;对应的值作为生成内容返回,并在令牌预算内组装。来源指针支持覆盖验证与位置感知的上下文排序。该设计将物理索引条目与证据载荷解耦,不改变底层检索器或生成器。LongBench QA子任务实验表明,M-RAG在紧约束令牌预算下达到竞争性或更优的准确率。进一步分析显示其具备高文档覆盖率、在扩展候选语料库时更强鲁棒性,以及更低的在线检索延迟。结果表明,语义键值索引是RAG工作负载的一种实用数据访问方式。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) turns external documents into evidence for large language models. In practice, this is also a data access problem: a system must decide what to index, what to retrieve, and what evidence to place in the context under a token budget. Most RAG pipelines use text chunks for both lookup and generation. This couples two different objectives. Retrieval benefits from compact and discriminative records, while generation needs contextual and faithful evidence. As a result, small chunks may fragment answer-bearing information, whereas large chunks may introduce noise and waste the context budget. We propose M-RAG, a semantic key-value indexing layer for budget-constrained RAG query processing. M-RAG extracts meta-markers from complete documents, where each record contains a retrieval key, an information value, and provenance pointers. Online retrieval operates over the key field, which can be searched by dense vector retrieval or sparse lexical retrieval; the paired values are returned as generation payloads and assembled under the token budget. Provenance pointers further support coverage validation and position-aware context ordering. This design separates the physical index entry from the evidence payload without changing the underlying retriever or generator. Experiments on LongBench QA subtasks show that M-RAG achieves competitive or better accuracy than representative chunk-based baselines, especially under tight token budgets. Further analyses show high document coverage, stronger robustness under expanding candidate corpora, and lower online retrieval latency. These results suggest that semantic key-value indexing is a practical access method for RAG workloads.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。