KG-RAG4SM: Knowledge Graph-based Retrieval-Augmented Generation for Schema Matching
Research code for a knowledge-graph-based RAG method that retrieves relevant subgraphs from large external knowledge graphs to augment LLM prompts for the schema-matching and data-integration task.
KG-RAG4SM is the accompanying source code and data for a research paper on using knowledge-graph-based retrieval-augmented generation for schema matching. It introduces vector-based, graph-traversal-based, and query-based graph retrieval methods, plus a hybrid approach and ranking schemes, to identify the most relevant subgraphs from large external knowledge graphs such as Wikidata, then uses the retrieved subgraphs to augment LLM prompts for producing schema-matching results.
It supports mainstream LLMs including GPT, Mistral, Llama, Gemma, and Jellyfish as the backbone model. The repository includes preprocessed data to reproduce experiments across datasets such as cms, mimic, synthea, and emed, plus scripts to run schema matching with or without retrieved subgraphs, and instructions to preprocess raw data and retrieve subgraphs from Wikidata directly.