EUVIMEDOtkrijte EUVIMED
Open access

Leveraging Medical Knowledge Graphs Into Large Language Models for Diagnosis Prediction: Design and Application Study

Yanjun Gao iD, Ruizhe Li iD, Emma Croxford iD, John Caskey iD, Brian W Patterson iD, Matthew Churpek iD, Timothy Miller iD, Dmitriy Dligach iD, Majid Afshar iD

JMIR AI · 2025-02-24 · 4 · e58670

DOI: 10.2196/58670 ↗

At a glance

Journal article in JMIR AI, published online on 2025-02-24. Written by Yanjun Gao and 8 co-authors. Institution: Department of Biomedical Informatics, University of Colorado Anschutz Medical Campus, Denver, CO, United States. Cited 114 times so far (Crossref); 49 references. The full text is freely available in PubMed Central. Funded by: NLM NIH HHS, NIDA NIH HHS.

SažetakSubjectsBibliografski podaciCiteRelated studies

Abstract (original language)

Background

Electronic health records (EHRs) and routine documentation practices play a vital role in patients’ daily care, providing a holistic record of health, diagnoses, and treatment. However, complex and verbose EHR narratives can overwhelm health care providers, increasing the risk of diagnostic inaccuracies. While large language models (LLMs) have showcased their potential in diverse language tasks, their application in health care must prioritize the minimization of diagnostic errors and the prevention of patient harm. Integrating knowledge graphs (KGs) into LLMs offers a promising approach because structured knowledge from KGs could enhance LLMs’ diagnostic reasoning by providing contextually relevant medical information.

Objective

This study introduces DR.KNOWS (Diagnostic Reasoning Knowledge Graph System), a model that integrates Unified Medical Language System–based KGs with LLMs to improve diagnostic predictions from EHR data by retrieving contextually relevant paths aligned with patient-specific information.

Methods

DR.KNOWS combines a stack graph isomorphism network for node embedding with an attention-based path ranker to identify and rank knowledge paths relevant to a patient’s clinical context. We evaluated DR.KNOWS on 2 real-world EHR datasets from different geographic locations, comparing its performance to baseline models, including QuickUMLS and standard LLMs (Text-to-Text Transfer Transformer and ChatGPT). To assess diagnostic reasoning quality, we designed and implemented a human evaluation framework grounded in clinical safety metrics.

Results

DR.KNOWS demonstrated notable improvements over baseline models, showing higher accuracy in extracting diagnostic concepts and enhanced diagnostic prediction metrics. Prompt-based fine-tuning of Text-to-Text Transfer Transformer with DR.KNOWS knowledge paths achieved the highest ROUGE-L (Recall-Oriented Understudy for Gisting Evaluation–Longest Common Subsequence) and concept unique identifier F1-scores, highlighting the benefits of KG integration. Human evaluators found the diagnostic rationales of DR.KNOWS to be aligned strongly with correct clinical reasoning, indicating improved abstraction and reasoning. Recognized limitations include potential biases within the KG data, which we addressed by emphasizing case-specific path selection and proposing future bias-mitigation strategies.

Conclusions

DR.KNOWS offers a robust approach for enhancing diagnostic accuracy and reasoning by integrating structured KG knowledge into LLM-based clinical workflows. Although further work is required to address KG biases and extend generalizability, DR.KNOWS represents progress toward trustworthy artificial intelligence–driven clinical decision support, with a human evaluation framework focused on diagnostic safety and alignment with clinical standards.

Subjects

Author keywords

artificial intelligencediagnosis predictionelectronic health recordgraph modelknowledge graphlarge language modelmachine learningnatural language processing

Authors and institutions

  • Department of Biomedical Informatics, University of Colorado Anschutz Medical Campus, Denver, CO, United States.
  • Department of Medicine, University of Wisconsin-Madison, Madison, WI, United States.
  • University of Aberdeen, Aberdeen, United Kingdom.
  • Boston Children's Hospital, Harvard Medical School, Boston, MA, United States.
  • Loyola University Chicago, Chicago, IL, United States.

ORCID profiles: Yanjun Gao, Ruizhe Li, Emma Croxford, John Caskey, Brian W Patterson, Matthew Churpek, Timothy Miller, Dmitriy Dligach, Majid Afshar

Funding

  • NLM NIH HHS
  • NIDA NIH HHS

Cite

APA

Gao, Y., Li, R., Croxford, E., Caskey, J., Patterson, B. W., Churpek, M., Miller, T., Dligach, D., & Afshar, M. (2025). Leveraging Medical Knowledge Graphs Into Large Language Models for Diagnosis Prediction: Design and Application Study. JMIR AI, 4, e58670. https://doi.org/10.2196/58670

Vancouver

Gao Y, Li R, Croxford E, Caskey J, Patterson BW, Churpek M, et al. Leveraging Medical Knowledge Graphs Into Large Language Models for Diagnosis Prediction: Design and Application Study. JMIR AI. 2025;4:e58670. doi:10.2196/58670

BibTeX
@article{Gao2025,
  author = {Gao, Yanjun and Li, Ruizhe and Croxford, Emma and Caskey, John and Patterson, Brian W and Churpek, Matthew and Miller, Timothy and Dligach, Dmitriy and Afshar, Majid},
  title = {Leveraging Medical Knowledge Graphs Into Large Language Models for Diagnosis Prediction: Design and Application Study},
  journal = {JMIR AI},
  year = {2025},
  volume = {4},
  pages = {e58670},
  doi = {10.2196/58670}
}
Start for free →