EHR-RAG: Bridging Long-Horizon Structured Electronic Health Records and Large Language Models via Enhanced Retrieval-Augmented Generation
Open accessAbstract
Electronic Health Records (EHRs) provide rich longitudinal clinical evidence that is central to medical decision-making, motivating the use of retrieval-augmented generation (RAG) to ground large language model (LLM) predictions. However, long-horizon EHRs often exceed LLM context limits, and existing approaches commonly rely on truncation or vanilla retrieval strategies that discard clinically relevant events and temporal dependencies. To address these challenges, we propose EHR-RAG, a retrieval-augmented framework designed for accurate interpretation of long-horizon structured EHR data. EHR-RAG introduces three components tailored to longitudinal clinical prediction tasks: Event- and Time-Aware Hybrid EHR Retrieval to preserve clinical structure and temporal dynamics, Adaptive Iterative Retrieval to progressively refine queries in order to expand broad evidence coverage, and Dual-Path Evidence Retrieval and Reasoning to jointly retrieves and reasons over both factual and counterfactual evidence. Experiments across four long-horizon EHR prediction tasks show that EHR-RAG consistently outperforms the strongest LLM-based baselines, achieving an average Macro-F1 improvement of 10.76%. Overall, our work highlights the potential of retrieval-augmented LLMs to advance clinical prediction on structured EHR data in practice.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
EHR-RAG evaluations demonstrate that flat, vector-search RAG often induces information dropping and incomplete evidence coverage.
“This aligns with recent longitudinal EHR evaluations (e.g., EHR-RAG), which demonstrate that flat, vector-search RAG often induces information dropping and incomplete evidence coverage.[13]”
From Multi-Agent Dynamic Refinement Outperforms Static RAG in Clinical Reasoning for Complex Nephrology Cases (2026) · cites this paper as [13]
Section 4.3 (page unavailable) reports that vanilla RAG can underperform direct generation in some cases and suggests that similarity-only retrieval may omit clinically critical recent evidence. The case study also shows vanilla RAG failing to incorporate countervailing indicators. These passages support the concern about incomplete evidence coverage, but the paper frames omission as a possibility observed in some cases, not as something flat vector-search RAG often induces. (LLM, conf=0.86)
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
No references could be resolved yet.
Research works printed but not linked: 55
- Abdallah, A., Piryani, B., Wallat, J., Anand, A., and Ja- towt, A. Extending dense passage retrieval with temporal information. arXiv e-prints, pp. arXiv-2502, 2025.
- Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., Almeida, D., Altenschmidt, J., Altman, S., Anadkat, S., et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023. · arXiv
- Asai, A., Wu, Z., Wang, Y., Sil, A., and Hajishirzi, H. Self- rag: Learning to retrieve, generate, and critique through self-reflection. arXiv preprint arXiv:2310.11511, 2023. · arXiv
- Ashfaq, A., Sant'Anna, A., Lingman, M., and Nowaczyk, S. Readmission prediction using deep learning on electronic health records. Journal of biomedical informatics, 97: 103256, 2019.
- Bedi, S., Liu, Y., Orr-Ewing, L., Dash, D., Koyejo, S., Callahan, A., Fries, J. A., Wornow, M., Swaminathan, A., Lehmann, L. S., et al. Testing and evaluation of health care applications of large language models: a systematic review. Jama, 2025.
- Bhoi, S., Lee, M. L., Hsu, W., Fang, H. S. A., and Tan, N. C. Personalizing medication recommendation with a graph-based approach. ACM Transactions on Information Systems (TOIS), 40(3):1-23, 2021.
- Cai, X., Perez-Concha, O., Coiera, E., Martin-Sanchez, F., Day, R., Roffe, D., and Gallego, B. Real-time predic- tion of mortality, readmission, and length of stay using electronic health record data. Journal of the American Medical Informatics Association, 23(3):553-561, 2016.
- Cao, L., Sun, J., and Cross, A. Autord: An automatic and end-to-end system for rare disease knowledge graph con- struction based on ontologies-enhanced large language models. arXiv preprint arXiv:2403.00953, 2024a. · arXiv
- Cao, L., Wang, Z., Xiao, C., and Sun, J. PILOT: Le- gal case outcome prediction with case law. In Duh, K., Gomez, H., and Bethard, S. (eds.), Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 609-621, Mexico City, Mexico, June 2024b. Associa- tion for Computational Linguistics. doi: 10.18653/v1/ 2024.naacl-long.34. URL https://aclanthology. org/2024.naacl-long.34/. · DOI
- Chen, C., Yu, J., Chen, S., Liu, C., Wan, Z., Bitterman, D., Wang, F., and Shu, K. Clinicalbench: Can llms beat traditional ml models in clinical prediction? arXiv preprint arXiv:2411.06469, 2024. · arXiv
- Choi, E., Bahadori, M. T., Sun, J., Kulas, J., Schuetz, A., and Stewart, W. Retain: An interpretable predictive model for healthcare using reverse time attention mechanism. Advances in neural information processing systems, 29, 2016.
- Choi, E., Bahadori, M. T., Song, L., Stewart, W. F., and Sun, J. Gram: graph-based attention model for health- care representation learning. In Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, pp. 787-795, 2017.
- Cowie, M. R., Blomster, J. I., Curtis, L. H., Duclaux, S., Ford, I., Fritz, F., Goldman, S., Janmohamed, S., Kreuzer, J., Leenay, M., et al. Electronic health records to facilitate clinical research. Clinical Research in Cardiology, 106 (1):1-9, 2017.
- Croskerry, P. The importance of cognitive errors in diagnosis and strategies to minimize them. Academic medicine, 78 (8):775-780, 2003.
- Cui, H., Shen, Z., Zhang, J., Shao, H., Qin, L., Ho, J. C., and Yang, C. Llms-based few-shot disease predictions using ehr: A novel approach combining predictive agent reasoning and critical agent instruction. In AMIA Annual Symposium Proceedings, volume 2024, pp. 319, 2025.
- Ebbers, T., Kool, R. B., Smeele, L. E., Dirven, R., den Besten, C. A., Karssemakers, L. H., Verhoeven, T., Her- ruer, J. M., van den Broek, G. B., and Takes, R. P. The impact of structured and standardized documentation on documentation quality; a multicenter, retrospective study. Journal of Medical Systems, 46(7):46, 2022.
- Elstein, A. S., Shulman, L. S., and Sprafka, S. A. Medi- cal problem solving: An analysis of clinical reasoning. Harvard University Press, 1978.
- Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y., Sun, J., Wang, H., and Wang, H. Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997, 2(1), 2023. · arXiv
- Graber, M. L., Franklin, N., and Gordon, R. Diagnostic error in internal medicine. Archives of internal medicine, 165(13):1493-1499, 2005.
- Hegselmann, S., von Arnim, G., Rheude, T., Kronenberg, N., Sontag, D., Hindricks, G., Eils, R., and Wild, B. Large language models are powerful electronic health record encoders. arXiv preprint arXiv:2502.17403, 2025. · arXiv
- Jiang, P., Xiao, C., Cross, A., and Sun, J. Graphcare: En- hancing healthcare predictions with personalized knowl- edge graphs. arXiv preprint arXiv:2305.12788, 2023. · arXiv
- Jiang, P., Xiao, C., Jiang, M., Bhatia, P., Kass-Hout, T., Sun, J., and Han, J. Reasoning-enhanced healthcare predic- tions with knowledge graph community retrieval. arXiv preprint arXiv:2410.04585, 2024. · arXiv
- Jiang, P., Cao, L., Zhu, R., Jiang, M., Zhang, Y., Sun, J., and Han, J. Ras: Retrieval-and-structuring for knowledge-intensive llm generation. arXiv preprint arXiv:2502.10996, 2025a. · arXiv
- Jiang, P., Lin, J., Cao, L., Tian, R., Kang, S., Wang, Z., Sun, J., and Han, J. Deepretrieval: Hacking real search engines and retrievers with large language models via re- inforcement learning. arXiv preprint arXiv: 2503.00223, 2025b. · arXiv
- Johnson, A. E., Pollard, T. J., Shen, L., Lehman, L.-w. H., Feng, M., Ghassemi, M., Moody, B., Szolovits, P., An- thony Celi, L., and Mark, R. G. Mimic-iii, a freely ac- cessible critical care database. Scientific data, 3(1):1-9, 2016.
- Johnson, A. E., Bulgarelli, L., Shen, L., Gayles, A., Sham- mout, A., Horng, S., Pollard, T. J., Hao, S., Moody, B., Gow, B., et al. Mimic-iv, a freely accessible electronic health record dataset. Scientific data, 10(1):1, 2023.
- Kim, H., Sohn, J., Gilson, A., Cochran-Caggiano, N., Ap- plebaum, S., Jin, H., Park, S., Park, Y., Park, J., Choi, S., et al. Rethinking retrieval-augmented generation for medicine: A large-scale, systematic expert evaluation and practical insights. arXiv preprint arXiv:2511.06738, 2025. · arXiv
- Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., and Iwasawa, Y. Large language models are zero-shot reasoners. Ad- vances in neural information processing systems, 35: 22199-22213, 2022.
- Kruse, M., Hu, S., Derby, N., Wu, Y., Stonbraker, S., Yao, B., Wang, D., Goldberg, E., and Gao, Y. Large language models with temporal reasoning for longitudinal clinical summarization and prediction. In Findings of the Associ- ation for Computational Linguistics: EMNLP 2025, pp. 20715-20735, 2025.
- Levin, S., Barnes, S., Toerper, M., Debraine, A., DeAn- gelo, A., Hamrock, E., Hinson, J., Hoyer, E., Dungarani, T., and Howell, E. Machine-learning-based hospital dis- charge predictions can support multidisciplinary rounds and decrease hospital length-of-stay. BMJ Innovations, 7 (2), 2021.
- Li, H., Deng, B., Xu, C., Feng, Z., Schlegel, V., Huang, Y.- H., Sun, Y., Sun, J., Yang, K., Yu, Y., et al. Mira: Medical time series foundation model for real-world health data. arXiv preprint arXiv:2506.07584, 2025a. · arXiv
- Li, Z., Yu, H., Guo, G., Zhou, N., and Zhang, J. Muisqa: Multi-intent retrieval-augmented generation for scientific question answering. arXiv preprint arXiv:2511.16283, 2025b. · arXiv
- Liao, Y., Wu, C., Liu, J., Jiang, S., Qiu, P., Wang, H., Yue, Y., Zhen, S., Wang, J., Fan, Q., et al. Ehr-r1: A reasoning- enhanced foundational language model for electronic health record analysis. arXiv preprint arXiv:2510.25628, 2025. · arXiv
- Lin, J., Wu, Z., and Sun, J. Training llms for ehr-based reasoning tasks via reinforcement learning. arXiv preprint arXiv:2505.24105, 2025. · arXiv
- Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., and Liang, P. Lost in the middle: How language models use long contexts. Transactions of the association for computational linguistics, 12:157-173, 2024.
- Lovon-Melgarejo, J., Ben-Haddi, T., Di Scala, J., Moreno, J. G., and Tamine, L. Revisiting the mimic-iv benchmark: Experiments using language models for electronic health records. In Proceedings of the First Workshop on Patient- Oriented Language Processing (CL4Health)@ LREC- COLING 2024, pp. 189-196, 2024.
- Menachemi, N. and Collum, T. H. Benefits and drawbacks of electronic health record systems. Risk management and healthcare policy, pp. 47-55, 2011.
- Neha, F., Bhati, D., and Shukla, D. K. Retrieval-augmented generation (rag) in healthcare: A comprehensive review. AI, 6(9):226, 2025.
- Perçin, S., Su, X., Syed, Q. S., Howard, P., Kuvshinov, A., Schwinn, L., and Scholl, K.-U. Investigating the robust- ness of retrieval-augmented generation at the query level. In Proceedings of the Fourth Workshop on Generation, Evaluation and Metrics (GEM 2 ), pp. 439-457, 2025.
- Rosenbloom, S. T., Denny, J. C., Xu, H., Lorenzi, N., Stead, W. W., and Johnson, K. B. Data from clinical notes: a perspective on the tension between structure and flexi- ble documentation. Journal of the American Medical Informatics Association, 18(2):181-186, 2011.
- Shang, J., Xiao, C., Ma, T., Li, H., and Sun, J. Gamenet: Graph augmented memory networks for recommending medication combination. In proceedings of the AAAI Con- ference on Artificial Intelligence, volume 33, pp. 1126- 1133, 2019.
- Shi, W., Xu, R., Zhuang, Y., Yu, Y., Zhang, J., Wu, H., Zhu, Y., Ho, J. C., Yang, C., and Wang, M. D. Ehragent: Code empowers large language models for few-shot complex tabular reasoning on electronic health records. In Pro- ceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 22315-22339, 2024.
- Sox, H. C., Higgins, M. C., Owens, D. K., and Schmidler, G. S. Medical decision making. John Wiley & Sons, 2024.
- Steinberg, E., Jung, K., Fries, J. A., Corbin, C. K., Pfohl, S. R., and Shah, N. H. Language models are an effective representation learning technique for electronic health record data. Journal of biomedical informatics, 113: 103637, 2021.
- Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.-A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., et al. Llama: Open and efficient foundation lan- guage models. arXiv preprint arXiv:2302.13971, 2023. · arXiv
- Vorontsov, E., Bozkurt, A., Casson, A., Shaikovski, G., Zelechowski, M., Severson, K., Zimmermann, E., Hall, J., Tenenholtz, N., Fusi, N., et al. A foundation model for clinical-grade computational pathology and rare cancers detection. Nature medicine, 30(10):2924-2935, 2024.
- Wallace, E., Wang, Y., Li, S., Singh, S., and Gardner, M. Do nlp models know numbers? probing numeracy in embeddings. arXiv preprint arXiv:1909.07940, 2019. · arXiv
- Wornow, M., Thapa, R., Steinberg, E., Fries, J., and Shah, N. Ehrshot: An ehr benchmark for few-shot evaluation of foundation models. Advances in Neural Information Processing Systems, 36:67125-67137, 2023.
- Xiao, C., Ma, T., Dieng, A. B., Blei, D. M., and Wang, F. Readmission prediction via deep contextual embedding of clinical concepts. PloS one, 13(4):e0195024, 2018.
- Yang, K., Xu, Y., Zou, P., Ding, H., Zhao, J., Wang, Y., and Xie, B. Kerprint: local-global knowledge graph enhanced diagnosis prediction for retrospective and prospective interpretations. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 5357-5365, 2023.
- Yang, X., Chen, A., PourNejatian, N., Shin, H. C., Smith, K. E., Parisien, C., Compas, C., Martin, C., Costa, A. B., Flores, M. G., et al. A large language model for electronic health records. NPJ digital medicine, 5(1):194, 2022.
- Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K. R., and Cao, Y. React: Synergizing reasoning and acting in language models. In The eleventh international conference on learning representations, 2022.
- Zhang, X., Ramachandran, D., Tenney, I., Elazar, Y., and Roth, D. Do language embeddings capture scales? arXiv preprint arXiv:2010.05345, 2020. · arXiv
- Zhu, Y., Ren, C., Wang, Z., Zheng, X., Xie, S., Feng, J., Zhu, X., Li, Z., Ma, L., and Pan, C. Emerge: Enhancing multimodal electronic health records predictive modeling with retrieval-augmented generation. In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management, pp. 3549-3559, 2024a.
- Zhu, Y., Ren, C., Xie, S., Liu, S., Ji, H., Wang, Z., Sun, T., He, L., Li, Z., Zhu, X., et al. Realm: Rag-driven enhance- ment of multimodal electronic health records analysis via large language models. arXiv preprint arXiv:2402.07016, 2024b. · arXiv
Cited by
Sorted by citations
Yano, Y., Kakizaki, H., Nagasu, H., Kishi, S., Koshida, T., Nihei, Y., Hirano, A., Sugawara, Y., Imaizumi, T., Osakabe, Y., et al. (2026) · doi:10.64898/2026.07.15.26358121
- Authors
- Cao, L., Chen, Q., & Guo, Y.
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2026
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2601.21340
- OpenAlex
- W7126158642
- Cited by
- 0
- References
- 0
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- Locations
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
- Health Sciences › Medicine › Health Informatics › Artificial Intelligence in Healthcare and Education
- Health Sciences › Health Professions › Health Information Management › Electronic Health Records Systems
- Keywords
- retrieval-augmented generation, large language models, clinical reasoning
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review