Cited by 56Machine Learning in HealthcareArtificial Intelligence in Healthcare and EducationElectronic Health Records Systems

EHRAgent: Code Empowers Large Language Models for Few-shot Complex Tabular Reasoning on Electronic Health Records

Open access
Shi, Wenqi, Xu, Ran, Zhuang, Yuchen, Yu, Yue, Zhang, Jieyu, Wu, Hang, Zhu, Yuanda, Ho, Joyce C. +2 more·2024·Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing

Abstract

Clinicians often rely on data engineers to retrieve complex patient information from electronic health record (EHR) systems, a process that is both inefficient and time-consuming. We propose EHRAgent, a large language model (LLM) agent empowered with accumulative domain knowledge and robust coding capability. EHRAgent enables autonomous code generation and execution to facilitate clinicians in directly interacting with EHRs using natural language. Specifically, we formulate a multi-tabular reasoning task based on EHRs as a tool-use planning process, efficiently decomposing a complex task into a sequence of manageable actions with external toolsets. We first inject relevant medical information to enable EHRAgent to effectively reason about the given query, identifying and extracting the required records from the appropriate tables. By integrating interactive coding and execution feedback, EHRAgent then effectively learns from error messages and iteratively improves its originally generated code. Experiments on three real-world EHR datasets show that EHRAgent outperforms the strongest baseline by up to 29.6% in success rate, verifying its strong capacity to tackle complex clinical tasks with minimal demonstrations.

Verifying this paper

8 of 9 steps done · this page updates itself — you can leave and come back

  1. Registry recordVerified
  2. Full textRead the full text
  3. Reference list66 references found
  4. Reference checkChecking each cited work — 69 of 69
  5. StatisticsNeeds the full text
  6. ClaimsNeeds the full text
  7. Cited sourcesNeeds claims to check
  8. Self-checkNeeds the full text
  9. VerificationFindings verified

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.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.18653/v1/2024.emnlp-main.1245

Cites

69 of 69 references verified0 citation errors · 0 not checkable

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.

A few free checks a day · papers already verified open instantly · results are public

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?

  • Similarity-based memory retrieval is a scalable and widely adopted strategy across LLM-based agents.

    “we first clarify that similarity-based memory retrieval is a scalable and widely adopted strategy across LLM-based agents (e.g., RAP [20], EHR Agent [29]).”

    From Memory Injection Attacks on LLM Agents via Query-Only Interaction (2025) · cites this paper as [29]

    The “Demonstration Optimization through Long-Term Memory” section describes EHRAgent retrieving the most relevant past examples using question similarity, so the paper supports EHR Agent as an example of similarity-based memory retrieval. It does not establish that this strategy is scalable or widely adopted across LLM-based agents; no page number is available in our copy. (LLM, conf=0.86)

    Experimental — accuracy not yet measured
  • Structured EHR data can be summarized using general-purpose LLMs like Llama-3.

    “while structured EHR data can be summarized using general-purpose LLMs78 like Llama-379.”

    From MoMA: a mixture-of-multimodal-agents architecture for enhancing clinical prediction modelling (2025) · cites this paper as [78]

    The Experiment Setup and Conclusion describe an LLM-based agent that answers questions using structured EHR tables. They do not establish that general-purpose LLMs summarize structured EHR data; the paper studies multi-table question answering with code execution instead. Llama-3 has a separate citation in the citing sentence. (LLM, conf=0.78)

    Experimental — accuracy not yet measured
  • Coding agents have been applied to offensive security, theorem proving, and clinical tasks.

    “Coding agents have also been applied to offensive security [11, 37, 60], theorem proving [44], and clinical tasks [38, 43, 52].”

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

Flagged first, then by citations

Research works printed but not linked: 4

  1. Bae Seongsu, Kyung Daeun, Ryu Jaehee, Cho Eunbyeol, Lee Gyubok, Kweon Sunjun, Oh Jungwoo, Ji Lei, Eric I-Chao Chang Tackeun Kim, and Choi Edward. 2023. EHRXQA: A multi-modal question answering dataset for electronic health records with chest x-ray images. In Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track.
  2. Kirk James R, Wray Robert E, Lindes Peter, and Laird John E. 2024. Improving knowledge extraction from llms for task learning through agent analysis. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pages 18390– 18398.
  3. OpenAI. 2023. Gpt-4 technical report. arXiv.
  4. Qin Yujia, Liang Shihao, Ye Yining, Zhu Kunlun, Yan Lan, Lu Yaxi, Lin Yankai, Cong Xin, Tang Xiangru, Qian Bill, Zhao Sihan, Hong Lauren, Tian Runchu, Xie Ruobing, Zhou Jie, Gerstein Mark, dahai li, Zhiyuan Liu, and Sun Maosong. 2024. ToolLLM: Facilitating large language models to master 16000+ real-world APIs. In The Twelfth International Conference on Learning Representations.

Cited by

Sorted by citations

Authors
Shi, W., Xu, R., Zhuang, Y., Yu, Y., Zhang, J., Wu, H., Zhu, Y., Ho, J. C., Yang, C., & Wang, M. D.
Affiliations
  • Georgia Institute of Technology (US)
  • Emory University (US)
  • University of Washington (US)
Venue
Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing
Published
2024
Volume
2024
Pages
22315-22339
OpenAlex
W4404781813
Cited by
54
References
66
Citations by year
2026: 27 · 2025: 23 · 2024: 4
FWCI
15.91
Type
conference paper
Language
en
Open access
Licence
cc-by
Locations
  • Conference on Empirical Methods in Natural Language Processing (EMNLP) (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • PubMed Central (acceptedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • National Science Foundation (2319449, 2312502)
  • Microsoft Research
  • Emory University
  • National Institutes of Health
  • National Institute of Diabetes and Digestive and Kidney Diseases (K25DK135913)
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
LLM agents, electronic health records, tabular reasoning, few-shot learning, code generation, natural language querying, clinical information extraction

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