Schema matching is a crucial task in data integration, involving the alignment of a source database schema with a target schema to establish correspondence between their elements. This task is challenging due to textual and semantic heterogeneity, as well as differences in schema sizes. Although machine-learning-based solutions have been explored in numerous studies, they often suffer from low accuracy, require manual mapping of the schemas for model training, or need access to source schema data which might be unavailable due to privacy concerns. In this paper we present a novel method, named ReMatch, for matching schemas using retrieval-enhanced Large Language Models (LLMs). Our method avoids the need for predefined mapping, any model training, or access to data in the source database. In the ReMatch method the tables of the target schema and the attributes of the source schema are first represented as structured passage-based documents. For each source attribute document, we retrieve $J$ documents, representing target schema tables, according to their semantic relevance. Subsequently, we create a prompt for every source table, comprising all its attributes and their descriptions, alongside all attributes from the set of top $J$ target tables retrieved previously. We employ LLMs using this prompt for the matching task, yielding a ranked list of $K$ potential matches for each source attribute. Our experimental results on large real-world schemas demonstrate that ReMatch significantly improves matching capabilities and outperforms other machine learning approaches. By eliminating the requirement for training data, ReMatch becomes a viable solution for real-world scenarios.
翻译:模式匹配是数据集成中的关键任务,涉及将源数据库模式与目标模式对齐,以建立其元素之间的对应关系。由于文本和语义异构性以及模式大小的差异,该任务具有挑战性。尽管已有众多研究探索了基于机器学习的方法,但这些方法通常存在准确率低、需要手动映射模式以训练模型、或因隐私问题无法访问源模式数据等缺陷。本文提出了一种名为ReMatch的新方法,利用检索增强的大型语言模型进行模式匹配。该方法无需预定义映射、无需模型训练、也无需访问源数据库中的任何数据。在ReMatch方法中,首先将目标模式的表与源模式的属性表示为基于结构化文本段落的文档。针对每个源属性文档,根据语义相关性检索J个代表目标模式表的文档。随后,为每个源表构建提示词,包含其所有属性及描述,以及先前检索到的前J个目标表的全部属性。我们利用此提示词驱动大语言模型执行匹配任务,为每个源属性生成包含K个潜在匹配项的排序列表。基于大规模真实模式数据的实验结果表明,ReMatch显著提升了匹配能力,并优于其他机器学习方法。由于消除了对训练数据的需求,ReMatch成为现实场景中可行的解决方案。