Assessing retrieval-augmented large language models for medical coding
Abstract
, Tenth Revision, Clinical Modification. A RAG system enhanced LLM predictions using data from over 1 million emergency department visits. We compared RAG-enhanced codes with provider-assigned codes. A masked review by four physicians and two LLMs determined which codes - LLM- or provider-assigned - were more accurate and specific. RAG-enhanced LLMs demonstrated superior accuracy and specificity compared with provider-assigned codes. Human reviewers favored RAG-enhanced Generative Pretrained Transformer 4 (GPT-4) for accuracy in 447 instances, versus 277 instances for provider-assigned codes (P<0.001). For specificity, RAG-enhanced GPT-4 was preferred in 509 cases, compared with 181 for provider-assigned codes (P<0.001). Smaller open-access models also showed significant improvement with RAG, demonstrating that integrating RAG with LLM medical coding may reduce errors and improve clinical documentation. (Funded by the National Center for Advancing Translational Sciences and the Office of Research Infrastructure Programs of the National Institutes of Health.).
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
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?
In complex medical coding tasks, a RAG-enhanced agentic system demonstrated superior performance to human providers; expert reviewers favored the AI's accuracy in 447 instances compared to 277 for provider-assigned codes (p < 0.001).
“For instance, in complex medical coding tasks where diagnostic specificity is tied to financial and legal outcomes, a RAG-enhanced agentic system demonstrated superior performance to human providers; expert reviewers favored the AI’s accuracy in 447 instances compared to 277 for provider-assigned codes (p < 0.001) [54].”
From A Review of Multi-Agent AI Systems for Biological and Clinical Data Analysis (2026) · cites this paper as [54]
The system was preferred for its specificity in 509 cases versus 181 for human providers (p < 0.001).
“Furthermore, the system was preferred for its specificity in 509 cases versus 181 for human providers (p < 0.001), illustrating that the high token expenditure of agentic loops is economically justified when the cost of diagnostic or administrative error exceeds the marginal cost of increased computing.”
From A Review of Multi-Agent AI Systems for Biological and Clinical Data Analysis (2026) · cites this paper as [54]
Recent evaluations indicate that structured agentic panels can reduce complex diagnostic expenditures from approximately $7850 to $2397 while significantly increasing specificity over human specialists.
“Recent evaluations indicate that structured agentic panels can reduce complex diagnostic expenditures from approximately $7850 to $2397 while significantly increasing specificity over human specialists [54,55].”
From A Review of Multi-Agent AI Systems for Biological and Clinical Data Analysis (2026) · cites this paper as [54]
Cites
Rajpurkar, P., Chen, E., Banerjee, O., & Topol, E. J. (2022) · Nature Medicine · doi:10.1038/s41591-021-01614-0 · Cited by 3,212 · see citing works
Measuring Diagnoses: ICD Code Accuracy
O’Malley, K. J., Cook, K. F., Price, M. D., Wildes, K. R., Hurdle, J. F., & Ashton, C. M. (2005) · Health Services Research · doi:10.1111/j.1475-6773.2005.00444.x · Cited by 1,123 · see citing works
Legal and Ethical Consideration in Artificial Intelligence in Healthcare: Who Takes Responsibility?
Naik, N., Hameed, B. M. Z., Shetty, D. K., Swain, D., Shah, M., Paul, R., Aggarwal, K., Ibrahim, S., Patil, V., Smriti, K., et al. (2022) · Frontiers in Surgery · doi:10.3389/fsurg.2022.862322 · Cited by 931 · see citing works
Almanac — Retrieval-Augmented Language Models for Clinical Medicine
Zakka, C., Shad, R., Chaurasia, A., Dalal, A. R., Kim, J. L., Moor, M., Fong, R., Phillips, C., Alexander, K., Ashley, E., et al. (2024) · NEJM AI · doi:10.1056/aioa2300068 · Cited by 424 · see citing works
Feng, J., Phillips, R. V., Malenica, I., Bishara, A., Hubbard, A. E., Celi, L. A., & Pirracchio, R. (2022) · npj Digital Medicine · doi:10.1038/s41746-022-00611-y · Cited by 423 · see citing works
Singh, R. P., Hom, G. L., Abramoff, M. D., Campbell, J. P., Chiang, M. F., & on behalf of the AAO Task Force on Artificial Intelligence (2020) · Translational Vision Science & Technology · doi:10.1167/tvst.9.2.45 · Cited by 259 · see citing works
Miao, J., Thongprayoon, C., Suppadungsuk, S., Valencia, O. A. G., & Cheungpasitporn, W. (2024) · Medicina · doi:10.3390/medicina60030445 · Cited by 176 · see citing works
Maleki, F., Ovens, K. L., Gupta, R., Reinhold, C., Spatz, A., & Forghani, R. (2022) · Radiology Artificial Intelligence · doi:10.1148/ryai.220028 · Cited by 162 · see citing works
Large Language Models Are Poor Medical Coders — Benchmarking of Medical Code Querying
Soroush, A., Glicksberg, B. S., Zimlichman, E., Barash, Y., Freeman, R., Charney, A. W., Nadkarni, G. N., & Klang, E. (2024) · NEJM AI · doi:10.1056/aidbp2300040 · Cited by 137 · see citing works
Self-citationAutomated clinical coding: what, why, and where we are?
Dong, H., Falis, M., Whiteley, W. N., Alex, B., Matterson, J., Ji, S., Chen, J., & Wu, H. (2022) · npj Digital Medicine · doi:10.1038/s41746-022-00705-7 · Cited by 129 · see citing works
Retrieval-Augmented Generation–Enabled GPT-4 for Clinical Trial Screening
Ünlü, O., Shin, J., Mailly, C. J., Oates, M., Tucci, M. R., Varugheese, M., Wagholikar, K. B., Wang, F., Scirica, B. M., Blood, A. J., et al. (2024) · NEJM AI · doi:10.1056/aioa2400181 · Cited by 119 · see citing works
Unlu, O., Shin, J., Mailly, C. J., Oates, M. F., Tucci, M. R., Varugheese, M., Wagholikar, K., Wang, F., Scirica, B. M., Blood, A. J., et al. (2024) · doi:10.1101/2024.02.08.24302376 · Cited by 117 · see citing works
The black box problem revisited. Real and imaginary challenges for automated legal decision making
Brożek, B., Furman, M., Jakubiec, M., & Kucharzyk, B. (2023) · Artificial Intelligence and Law · doi:10.1007/s10506-023-09356-9 · Cited by 116 · see citing works
Generalizability assessment of AI models across hospitals in a low-middle and high income country
Yang, J., Dung, N. T., Thạch, P. N., Phong, N. T., Phu, V. D., Dong, P. K., Yen, L. M., Thy, D. B. X., Soltan, A. A. S., Thwaites, L., et al. (2024) · Nature Communications · doi:10.1038/s41467-024-52618-6 · Cited by 110 · see citing works
MacIntyre, M. R., Cockerill, R. G., Mirza, O., & Appel, J. M. (2023) · Psychiatry Research · doi:10.1016/j.psychres.2023.115466 · Cited by 90 · see citing works
Glicksberg, B. S., Timsina, P., Patel, D., Sawant, A., Vaid, A., Raut, G., Charney, A. W., Apakama, D., Carr, B. G., Freeman, R., et al. (2024) · Journal of the American Medical Informatics Association · doi:10.1093/jamia/ocae103 · Cited by 82 · see citing works
Self-citationTowards automated clinical coding
Catling, F. J. R., Spithourakis, G., & Riedel, S. (2018) · International Journal of Medical Informatics · doi:10.1016/j.ijmedinf.2018.09.021 · Cited by 42 · see citing works
Machine Learning in Health Care
Byrne, M. D. (2018) · Journal of PeriAnesthesia Nursing · doi:10.1016/j.jopan.2018.07.001 · Cited by 25 · see citing works
Nawab, K., Fernbach, M., Atreya, S., Asfandiyar, S., Khan, G., Arora, R., Hussain, I., Hijjawi, S. B., & Schreiber, R. (2024) · Journal of Medical Artificial Intelligence · doi:10.21037/jmai-24-60 · Cited by 17 · see citing works
Riley, M. M., Lee, J., Richardson, S., Gjorgioski, S., & Robinson, K. M. (2023) · Health Information Management Journal · doi:10.1177/18333583231198592 · Cited by 15 · see citing works
Emergency department coding and billing
Edelberg, C. (2004) · Emergency Medicine Clinics of North America · doi:10.1016/s0733-8627(03)00098-1 · Cited by 12 · see citing works
Kreimeyer, K., Canzoniero, J. V., Fatteh, M., Anagnostou, V., & Botsis, T. (2024) · Studies in Health Technology and Informatics · doi:10.3233/shti240575 · Cited by 8 · see citing works
Flagged first, then by citations
Cited by
Sorted by citations
BRIDGE: benchmarking large language models for understanding real-world clinical practice texts
Wu, J., Gu, B., Zhou, R., Xie, K., Snyder, D., Jiang, Y., Carducci, V., Wyss, R., Desai, R. J., Alsentzer, E., et al. (2026) · Nature Biomedical Engineering · doi:10.1038/s41551-026-01719-2 · Cited by 14 · see citing works
A Review of Multi-Agent AI Systems for Biological and Clinical Data Analysis
Spieser, J., Balapour, A., Meller, J., Patra, K. C., & Shamsaei, B. (2026) · Methods and Protocols · doi:10.3390/mps9020033 · Cited by 1 · see citing works
“Recent evaluations indicate that structured agentic panels can reduce complex diagnostic expenditures from approximately $7850 to $2397 while significantly increasing specificity over human specialists [54,55].”
InfluentialLarge Language Model Beats Doctors in Accuracy of Diagnostic Coding
Hurley, D. (2025) · Neurology Today · doi:10.1097/01.wnt.0001176572.09870.a4
SCRIPT: Stratified clinical risk prediction from pathology reports using large language models
Loeffler, C. M. L., Reitsam, N. G., Wolf, F., Stueker, E. H., Muti, H. S., Wiest, I. C., & Kather, J. N. (2026) · Journal of Pathology Informatics · doi:10.1016/j.jpi.2026.100673
Ren, L., Fang, F., Zhang, Y., & Ma, Y. (2026) · International Journal of Medical Informatics · doi:10.1016/j.ijmedinf.2026.106598
Alves, R., Costa, B., Martins, H., & Faria, N. (2025) · Journal of Health Informatics and Digital Systems · doi:10.68159/u510882856
Design and implementation of an intelligent ICD coding system using large language modelPreprint
Zhou, L., Cheng, C., Luo, X., Tan, X., & Hu, Y. (2026) · Research Square · doi:10.21203/rs.3.rs-10911760/v1
- Authors
- Klang, E., Tessler, I., Apakama, D. U., Abbott, E., Glicksberg, B. S., Arnold, M., Moses, A., Sakhuja, A., Soroush, A., Charney, A. W., Reich, D. L., McGreevy, J., Gavin, N., Carr, B., Freeman, R., & Nadkarni, G. N.
- Affiliations
- Mount Sinai Health System (US)
- Tel Aviv University (IL)
- Icahn School of Medicine at Mount Sinai (US)
- ORCID
- Venue
- NEJM AI
- Publisher
- Massachusetts Medical Society
- Published
- 2025-09-25
- Volume
- 2
- Issue
- 10
- Pages
- AIcs2401161-AIcs2401161
- ISSN
- 2836-9386 (ISSN-L)
- OpenAlex
- W4414531167
- Cited by
- 6
- References
- 21
- Citations by year
- 2026: 4 · 2025: 2
- FWCI
- 4.72
- Type
- journal article
- Language
- en
- Open access
- closed
- Locations
- NEJM AI (publishedVersion)
- PubMed (publishedVersion)
- Topics
- Health Sciences › Health Professions › Health Information Management › Medical Coding and Health Information
- Physical Sciences › Computer Science › Artificial Intelligence › Machine Learning in Healthcare
- Health Sciences › Medicine › Health Informatics › Artificial Intelligence in Healthcare and Education
- Keywords
- retrieval-augmented generation, large language models, medical coding, ICD-10-CM, model evaluation, clinical documentation
- MeSH terms
- Large Language Models, Generative Artificial Intelligence, Emergency Service, Hospital, Humans, International Classification of Diseases, Clinical Coding
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