Ontology-aware knowledge graph retrieval-augmented generation for clinical decision support
Abstract
Effectively retrieving and interpreting the vast, diverse, and largely unstructured data contained within electronic health records (EHRs) present significant challenges for clinical decision support systems. Large language models (LLMs), when applied to complex healthcare datasets, frequently exhibit hallucinations, limited explainability, and inadequate semantic grounding. To overcome these drawbacks, an ontology-aware knowledge-graph-enhanced retrieval-augmented generation (RAG) architecture based on the MIMIC-IV clinical dataset is proposed in this paper. Structured EHR tables, such as patient demographics, hospital admissions, laboratory events, and medication records, can be integrated in a semantically principled manner using the proposed framework’s healthcare ontology, which explicitly encodes fundamental clinical concepts and their relationships. Neo4j’s Neosemantics (n10s) plugin was used to implement the ontology-aware knowledge graph, which facilitates interpretable clinical reasoning, improved data consistency, and expressive Cypher-based querying. Ontological constraints ensure that only clinically valid entities and relationships are considered during query execution, thereby significantly improving retrieval precision. A hybrid RAG pipeline that combines structured graph-based retrieval with vector-based semantic search was also integrated with the knowledge graph, supplying context-aware LLMs with precise clinical evidence. Experimental evaluation on the MIMIC-IV dataset demonstrated that the proposed hybrid framework achieved the highest area under the receiver operating characteristic curve (0.88), outperforming the tabular EHR baseline (0.71), vector-only RAG (0.81), and knowledge-graph-only retrieval (0.81). The proposed hybrid KG-RAG framework demonstrates strong potential for clinical decision support, achieving superior discriminative performance over the evaluated baseline retrieval approaches on MIMIC-IV.