基于知识图谱的检索增强生成用于模式匹配

·

研究论文 · 2026/11/10

传统基于相似度的模式匹配方法由于缺乏常识和领域知识,无法解决复杂领域特定映射中的语义歧义和冲突。同时,缺乏足够背景知识的大语言模型(LLM)容易产生幻觉,进一步复杂化模式匹配。为此,我们提出KG-RAG4SM,一种基于知识图谱的检索增强生成模式匹配方法。该方法集成了新颖的检索机制,包括基于LLM、基于向量、基于图遍历和混合技术,并结合先进的重排序方案,从大型外部知识图谱中提取最相关的子图。我们的方法无需重新训练即可取得优越结果:在MIMIC数据集上,精确率和F1分数分别比基于LLM的SOTA方法(如Jellyfish-8B)提高39.79%和30.56%;在Synthea数据集上,精确率和F1分数分别比基于预训练语言模型(PLM)的SOTA方法(如SMAT)提高69.20%和21.99%。此外,KG-RAG4SM可有效扩展至从常识知识图谱到领域特定知识图谱,其指令调优知识排除组件确保了在端到端模式匹配任务中即使知识图谱上下文相关性次优也能保持真实性能。我们的实证分析和真实场景案例研究表明,该解决方案很好地缓解了LLM在模式匹配中的幻觉问题。

该研究针对模式匹配中语义歧义和LLM幻觉问题,提出了一种无需重新训练的知识图谱增强方法,在多个数据集上显著提升性能,并验证了其缓解幻觉的有效性,对相关领域有重要参考价值。

Traditional similarity-based schema matching methods fail to resolve semantic ambiguities and conflicts in complex, domain-specific mappings due to a lack of commonsense and domain-specific knowledge. In parallel, large language models (LLMs) without sufficient background knowledge tend to hallucinate, further complicating schema matching. To overcome these limitations, we introduce KG-RAG4SM, a Knowledge Graph-based Retrieval-Augmented Generation for Schema Matching. This method integrates novel retrieval mechanisms, including LLM-based, vector-based, graph traversal-based, and hybrid techniques with advanced reranking schemes to extract the most relevant subgraphs from large external KGs. Our approach achieves superior results without requiring re-training, as evidenced by improvements of 39.79% in precision and 30.56% in F1 score over LLM-based state-of-the-art (SOTA) methods (e.g., Jellyfish-8B) on the MIMIC dataset, and enhancements of 69.20% in precision and 21.99% in F1 score over pre-trained language model (PLM)-based SOTA methods (e.g., SMAT) on the Synthea dataset. Additionally, KG-RAG4SM scales effectively across KGs from commonsense KGs to domain-specific ones, while its instruction-tuning knowledge exclusion component ensures truthful performance in end-to-end schema matching tasks despite the suboptimal relevance of KG context. Our empirical analysis and case studies from real-world scenarios show that the hallucination problem in LLMs for schema matching is well mitigated by our solution.

阅读原文

参与讨论