Ontology-aware knowledge graph retrieval-augmented generation for clinical decision support
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.

- Amugongo LM, Mascheroni P, Brooks S, Doering S, Seidel J. Retrieval augmented generation for large language models in healthcare: a systematic review. PLoS Digit Health. 2025;4(6):e0000877. doi: 10.1371/journal.pdig.0000877
- Jiang X, Zhang R, Xu Y, et al. HyKGE: A Hypothesis Knowledge Graph Enhanced RAG Framework for Accurate and Reliable Medical LLMs Responses. In: Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Vienna, Austria: Association for Computational Linguistics; 2025:11836-11856. doi: 10.18653/v1/2025.acl-long.580
- Liu F, Li L, Wang X, et al. MHGRL: An Effective Representation Learning Model for Electronic Health Records. In: Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024). Torino, Italia: European Language Resources Association (ELRA) and ICCL; 2024:11272-11282. doi: 10.63317/2r6kymh9964i
- Wang C, Liu X, Yue Y, et al. Survey on factuality in large language models. ACM Comput Surv. 2025;58(1):1-37. doi: 10.1145/3742420
- Wang Z. Retrieval-augmented question answering system based on large language models and knowledge graphs. Appl Comput Eng. 2025;178(1):122-131. doi: 10.54254/2755-2721/2025.po25800
- Wang H, Shi Y. Knowledge graph combined with retrieval-augmented generation for enhancing language model reasoning: A survey. Acad J Sci Technol. 2025;14(1):227-235. doi: 10.54097/h21fky45
- Chen J, Mashkova O, Zhapa-Camacho F, Hoehndorf R, He Y, Horrocks I. Ontology embedding: a survey of methods, applications and resources. IEEE Trans Knowl Data Eng. 2025;37(7):4193-4212. doi: 10.1109/TKDE.2025.3559023
- Huang T, Rizvi SA, Thakur RK, et al. HEART: learning better representation of EHR data with a heterogeneous relation-aware transformer. J Biomed Inform. 2024;159:104741. doi: 10.1016/j.jbi.2024.104741
- Lewis P, Perez E, Piktus A, et al. Retrieval-augmented generation for knowledge-intensive NLP tasks. In: NIPS’20: Proceedings of the 34th International Conference on Neural Information Processing Systems. Red Hook, NY, USA: Curran Associates Inc; 2020:9459-9474. Accessed August 13, 2026. https://dl.acm.org/doi/10.5555/3495724.3496517
- Upadhyay R, Viviani M. Enhancing health information retrieval with RAG by prioritizing topical relevance and factual accuracy. Discov Comput. 2025;28(1):27. doi: 10.1007/s10791-025-09505-5
- Hogan A, Blomqvist E, Cochez M, et al. Knowledge graphs. ACM Comput Surv. 2021;54(4):1-37. doi: 10.1145/3447772
- Wang S, Yang H, Liu W. Research on the construction and application of retrieval enhanced generation (RAG) model based on knowledge graph. Sci Rep. 2025;15(1):40425. doi: 10.1038/s41598-025-21222-z
- Nori H, King N, McKinney SM, Carignan D, Horvitz E. Capabilities of GPT-4 on Medical Challenge Problems. arXiv. Preprint posted online 2023. doi: 10.48550/arXiv.2303.13375
- Ong CS, Obey NT, Zheng Y, Cohan A, Schneider EB. SurgeryLLM: a retrieval-augmented generation large language model framework for surgical decision support and workflow enhancement. npj Digit Med. 2024;7:364. doi: 10.1038/s41746-024-01391-3
- Amann J, Vetter D, Blomberg SN, et al. To explain or not to explain? Artificial intelligence explainability in clinical decision support systems. PLoS Digit Health. 2022;1(2):e0000016. doi: 10.1371/journal.pdig.0000016
- Hager P, Jungmann F, Holland R, et al. Evaluation and mitigation of the limitations of large language models in clinical decision-making. Nat Med. 2024;30(9):2613-2622. doi: 10.1038/s41591-024-03097-1
- Sutton RT, Pincock D, Baumgart DC, Sadowski DC, Fedorak RN, Kroeker KI. An overview of clinical decision support systems: benefits, risks, and strategies for success. npj Digit Med. 2020;3:17. doi: 10.1038/s41746-020-0221-y
- Lee J, Yoon W, Kim S, et al. BioBERT: a pre-trained biomedical language representation model for biomedical text mining. Bioinformatics. 2020;36(4):1234-1240. doi: 10.1093/bioinformatics/btz682
- Boutouhami K, Zhang J, Qi G, Gao H. Uncertain ontology-aware knowledge graph embeddings. In: Wang X, Lisi FA, Xiao G, Botoeva E, eds. Semantic Technology. JIST 2019. Communications in Computer and Information Science, vol 1157. Singapore: Springer; 2020:129-136. doi: 10.1007/978-981-15-3412-6_13
- Johnson AEW, Bulgarelli L, Shen L, et al. MIMIC-IV, a freely accessible electronic health record dataset. Sci Data. 2023;10(1):1. doi: 10.1038/s41597-022-01899-x
- Centers for Medicare & Medicaid Services. ICD-10-CM Official Guidelines for Coding and Reporting: FY 2023 (October 1, 2022–September 30, 2023). Published 2023. Accessed August 13, 2026. https://www.cms.gov/files/document/fy-2023-icd-10-cm-coding-guidelines-updated-01/11/2023.pdf
- Johnson J, Douze M, Jégou H. Billion-scale similarity search with GPUs. IEEE Trans Big Data. 2021;7(3):535-547. doi: 10.1109/TBDATA.2019.2921572
- Singer M, Deutschman CS, Seymour CW, et al. The Third International Consensus Definitions for Sepsis and Septic Shock (Sepsis-3). JAMA. 2016;315(8):801-810. doi: 10.1001/jama.2016.0287
- Shang Y, Tian Y, Zhou M, et al. EHR-oriented knowledge graph system: toward efficient utilization of non-used information buried in routine clinical practice. IEEE J Biomed Health Inform. 2021;25(7):2463-2475. doi: 10.1109/JBHI.2021.3085003
- Izacard G, Lewis P, Lomeli M, et al. ATLAS: few-shot learning with retrieval augmented language models. J Mach Learn Res. 2023;24(251):1-43. Accessed August 13, 2026. https://jmlr.org/papers/v24/23-0037.html
