Introduction
Data integration is a cornerstone of modern data management, relying heavily on two tasks: Schema Matching (SM) and Entity Matching (EM). SM involves identifying semantically equivalent columns across different databases, while EM focuses on determining if distinct records refer to the same real-world entity.
While Large Language Models (LLMs) possess impressive natural language capabilities, they often fail in structured data matching scenarios. Specifically, they fall into three common traps: hallucination (generating incorrect connections), under-matching (applying overly strict criteria that miss valid matches), and over-matching (identifying matches based on broad semantic relations, such as matching "patient-id" and "drug-id" simply because both are medical identifiers).
Traditional solutions often rely on Supervised Fine-Tuning (SFT), which is computationally expensive, requires vast amounts of labeled data, and lacks cross-domain generalizability.
The KcMF Framework
To address these challenges, the authors propose the Knowledge-Compliant Matching Framework (KcMF). KcMF is a fine-tuning-free approach that enhances LLM reasoning through structured guidance and external knowledge retrieval.
The framework operates in four distinct stages:
- Pseudo-code-based Task Decomposition: Instead of a simple binary question, KcMF provides the LLM with a logic flow defined in natural language pseudo-code (e.g., "IF columns are not the same data type, THEN they are not matched"). This aligns the model's internal reasoning with the technical requirements of the matching task.
- Knowledge Retrieval and Construction: To compensate for the LLM's potential lack of domain-specific knowledge, KcMF utilizes two retrieval mechanisms: Dataset as Knowledge (DaK), which extracts metadata and structural context from databases, and Example as Knowledge (EaK), which retrieves definitions from external knowledge bases (e.g., SNOMED-CT, Wikidata) to clarify technical terms.
- Prompt Construction: The retrieved knowledge and pseudo-code are combined into structured prompts that guide the model's reasoning process.
- Inconsistency-tolerant Generation Ensemble (IntGE): Recognizing that LLMs can produce inconsistent or poorly formatted outputs, KcMF employs a majority-voting ensemble strategy across multiple prompts to ensure robustness and accuracy.
Experimental Evaluation
The framework was evaluated on several benchmarks, including healthcare-specific datasets (Synthea, MIMIC, CMS) and standard entity matching sets (Amazon-Google, Walmart-Amazon). Additionally, a new biomedical entity matching benchmark, MedMentions Matching (MMM), was introduced to test performance on highly specialized terminology.
Key Results
KcMF demonstrated substantial improvements over both standard LLM prompting and specialized non-LLM models:
- Performance Gains: KcMF outperformed state-of-the-art non-LLM models (e.g., SMAT, SUDOWOODO) by an average F1-score of 17.93%.
- Domain Adaptability: In the medical domain (MIMIC dataset), KcMF boosted GPT-3.5’s F1-score from a baseline of 7.45% to 62.07%.
- Model Agnostic: The framework consistently improved performance across various backbones, including GPT-4o, Llama-3, and Mistral-7B.
Discussion and Conclusion
A critical insight from this work is that LLMs often suffer from "information flooding" when too much context is provided in a single prompt. The success of the IntGE strategy suggests that ensembling multiple "clean" prompts is superior to using one "noisy" prompt. Furthermore, the use of pseudo-code acts as a logic anchor, bridging the gap between linguistic understanding and technical data matching rules.
While KcMF significantly reduces the need for fine-tuning, it currently requires human input for pseudo-code design and knowledge base selection. Future research will focus on automating these components and scaling the framework to handle large-scale "discovery" tasks across entire databases.
Summary updated