arXiv:2601.11863cs.IRcs.AI2026-01被引 1

用元数据提升检索增强生成的准确性,让模型更懂文档结构。

Utilizing Metadata for Better Retrieval-Augmented Generation

  • 将元数据嵌入检索向量,增强文档区分能力。
  • 统一嵌入法在多项指标上超越纯文本基线,效果更稳定。
  • 适合处理法规、合同等结构化文本的RAG系统开发者参考。

检索增强生成系统依赖于检索语义相关的文档片段以支持大语言模型生成准确且有依据的输出。在如监管文件这类结构化且重复性强的语料中,仅靠片段相似性常无法区分语言重叠的文档。从业者通常将元数据扁平化为输入文本作为启发式方法,但该做法的影响与权衡尚不明确。我们系统研究了元数据感知的检索策略,对比了纯文本基线与直接嵌入元数据的方法。评估涵盖元数据作为文本(前缀和后缀)、融合元数据与内容的双编码器统一嵌入、双编码器后期融合检索以及元数据感知查询重构。在多个检索指标和问题类型下,前缀法和统一嵌入法均持续优于纯文本基线,其中统一嵌入法有时表现更优且维护更简便。除实证比较外,我们分析了嵌入空间,发现元数据集成通过增强文档内一致性、减少文档间混淆、扩大相关与无关片段的分离度提升了效果。字段级消融实验表明,结构化线索提供了强区分信号。代码、评估框架及RAGMATE-10K数据集已公开。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation systems depend on retrieving semantically relevant document chunks to support accurate, grounded outputs from large language models. In structured and repetitive corpora such as regulatory filings, chunk similarity alone often fails to distinguish between documents with overlapping language. Practitioners often flatten metadata into input text as a heuristic, but the impact and trade-offs of this practice remain poorly understood. We present a systematic study of metadata-aware retrieval strategies, comparing plain-text baselines with approaches that embed metadata directly. Our evaluation spans metadata-as-text (prefix and suffix), a dual-encoder unified embedding that fuses metadata and content in a single index, dual-encoder late-fusion retrieval, and metadata-aware query reformulation. Across multiple retrieval metrics and question types, we find that prefixing and unified embeddings consistently outperform plain-text baselines, with the unified at times exceeding prefixing while being easier to maintain. Beyond empirical comparisons, we analyze embedding space, showing that metadata integration improves effectiveness by increasing intra-document cohesion, reducing inter-document confusion, and widening the separation between relevant and irrelevant chunks. Field-level ablations show that structural cues provide strong disambiguating signals. Our code, evaluation framework, and the RAGMATE-10K dataset are publicly hosted.

RAG元数据检索增强嵌入

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。