English

Retrieval-Augmented Generation of Ontologies from Relational Databases

Databases 2025-06-03 v1 Artificial Intelligence

Abstract

Transforming relational databases into knowledge graphs with enriched ontologies enhances semantic interoperability and unlocks advanced graph-based learning and reasoning over data. However, previous approaches either demand significant manual effort to derive an ontology from a database schema or produce only a basic ontology. We present RIGOR, Retrieval-augmented Iterative Generation of RDB Ontologies, an LLM-driven approach that turns relational schemas into rich OWL ontologies with minimal human effort. RIGOR combines three sources via RAG, the database schema and its documentation, a repository of domain ontologies, and a growing core ontology, to prompt a generative LLM for producing successive, provenance-tagged delta ontology fragments. Each fragment is refined by a judge-LLM before being merged into the core ontology, and the process iterates table-by-table following foreign key constraints until coverage is complete. Applied to real-world databases, our approach outputs ontologies that score highly on standard quality dimensions such as accuracy, completeness, conciseness, adaptability, clarity, and consistency, while substantially reducing manual effort.

Keywords

Cite

@article{arxiv.2506.01232,
  title  = {Retrieval-Augmented Generation of Ontologies from Relational Databases},
  author = {Mojtaba Nayyeri and Athish A Yogi and Nadeen Fathallah and Ratan Bahadur Thapa and Hans-Michael Tautenhahn and Anton Schnurpel and Steffen Staab},
  journal= {arXiv preprint arXiv:2506.01232},
  year   = {2025}
}

Comments

Under review

R2 v1 2026-07-01T02:53:35.240Z