mlsanityData to 14 Oct 2026

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

arXiv 2401.07128 ↗First posted 13 Jan 2024cs.CL cs.AIcited by 78

On the map: LLM reasoning → Clinical and biomedical applications

Abstract (arXiv)

Large language models (LLMs) have demonstrated exceptional capabilities in planning and tool utilization as autonomous agents, but few have been developed for medical problem-solving. We propose EHRAgent, an LLM agent empowered with a code interface, to autonomously generate and execute code for multi-tabular reasoning within electronic health records (EHRs). First, we formulate an EHR question-answering task into a tool-use planning process, efficiently decomposing a complicated task into a sequence of manageable actions. By integrating interactive coding and execution feedback, EHRAgent learns from error messages and improves the originally generated code through iterations. Furthermore, we enhance the LLM agent by incorporating long-term memory, which allows EHRAgent to effectively select and build upon the most relevant successful cases from past experiences. Experiments on three real-world multi-tabular EHR datasets show that EHRAgent outperforms the strongest baseline by up to 29.6% in success rate. EHRAgent leverages the emerging few-shot learning capabilities of LLMs, enabling autonomous code generation and execution to tackle complex clinical tasks with minimal demonstrations.

Key facts. Cited by 78 papers in the map (data through 14 Oct 2026). Placed in Clinical and biomedical applications, one of 17 directions in LLM reasoning. Builds on 51 of its 86 references that are in the map. First posted on arXiv 13 Jan 2024.

Builds on

51 of 86 references.

Closest ancestors · 1

Same direction, newest first

  1. 2023MedAgents: Large Language Models as Collaborators for Zero-shot Medical Reasoning16 Nov

Other references · 50

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  5. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
  6. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
  7. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
  8. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
  9. 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,988
  10. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,947
  11. 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,745
  12. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,439
38 more
  1. 2022Least-to-Most Prompting Enables Complex Reasoning in Large Language Modelscited by 1,407
  2. 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,395
  3. 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,356
  4. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,332
  5. 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,210
  6. 2023HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Facecited by 1,190
  7. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  8. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  9. 2022Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agentscited by 1,035
  10. 2023Teaching Large Language Models to Self-Debugcited by 988
  11. 2023ExpeL: LLM Agents Are Experiential Learnerscited by 876
  12. 2023Reasoning with Language Model is Planning with World Modelcited by 861
  13. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  14. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
  15. 2022PAL: Program-aided Language Modelscited by 652
  16. 2023ChemCrow: Augmenting large-language models with chemistry toolscited by 631
  17. 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMscited by 591
  18. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  19. 2023Chameleon: Plug-and-Play Compositional Reasoning with Large Language Modelscited by 356
  20. 2023Tool Learning with Foundation Modelscited by 302
  21. 2023MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedbackcited by 297
  22. 2023ToolQA: A Dataset for LLM Question Answering with External Toolscited by 274
  23. 2022GatorTron: A Large Clinical Language Model to Unlock Patient Information from Unstructured Electronic Health Recordscited by 238
  24. 2023InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedbackcited by 238
  25. 2022TALM: Tool Augmented Language Modelscited by 197
  26. 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 196
  27. 2023Augmenting Language Models with Long-Term Memorycited by 189
  28. 2024EASYTOOL: Enhancing LLM-based Agents with Concise Tool Instructioncited by 154
  29. 2023CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsetscited by 129
  30. 2023GeneGPT: Augmenting Large Language Models with Domain Tools for Improved Access to Biomedical Informationcited by 117
  31. 2023ToolChain*: Efficient Action Space Navigation in Large Language Models with A* Searchcited by 105
  32. 2023Conversational Health Agents: A Personalized LLM-Powered Agent Frameworkcited by 92
  33. 2019Text-to-SQL Generation for Question Answering on Electronic Medical Recordscited by 77
  34. 2023Making Language Models Better Tool Learners with Execution Feedbackcited by 70
  35. 2023EcoAssistant: Using LLM Assistant More Affordably and Accuratelycited by 49
  36. 2023EHRSQL: A Practical Text-to-SQL Benchmark for Electronic Health Recordscited by 45
  37. 2023PolyIE: A Dataset of Information Extraction from Polymer Material Scientific Literaturecited by 13
  38. 2023On Evaluating the Integration of Reasoning and Action in LLM Agents with Database Question Answeringcited by 10

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2024: 12; 2025: 29; 2026: 37.

78 papers.

Sort:

By area:

  1. 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 429
  2. 2025AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agentscited by 223
  3. 2024MDAgents: An Adaptive Collaboration of LLMs for Medical Decision-Makingcited by 163
  4. 2025Memory Injection Attacks on LLM Agents via Query-Only Interactioncited by 144
  5. 2025AgentRxiv: Towards Collaborative Autonomous Researchcited by 72
  6. 2025A-MemGuard: A Proactive Defense Framework for LLM-Based Agent Memorycited by 67
  7. 2024HYDRA: Model Factorization Framework for Black-Box LLM Personalizationcited by 60
  8. 2026A Survey of Agentic Reasoning for Large Language Models: Towards Recursively Self-Improving and Collective Agentscited by 50
  9. 2024Reasoning-Enhanced Healthcare Predictions with Knowledge Graph Community Retrievalcited by 45
  10. 2024A Survey of Table Reasoning with Large Language Modelscited by 29
  11. 2024Securing Large Language Models: Addressing Bias, Misinformation, and Prompt Attackscited by 26
  12. 2025MedAgentGym: A Scalable Agentic Training Environment for Code-Centric Reasoning in Biomedical Data Sciencecited by 23
38 more
  1. 2024Emergency Department Decision Support using Clinical Pseudo-notescited by 22
  2. 2026PhysicianBench: Evaluating LLM Agents in Real-World EHR Environmentscited by 21
  3. 2024ReflecTool: Towards Reflection-Aware Tool-Augmented Clinical Agentscited by 20
  4. 2025Collab-RAG: Boosting Retrieval-Augmented Generation for Complex Question Answering via White-Box and Black-Box LLM Collaborationcited by 20
  5. 2024Transforming Wearable Data into Personal Health Insights using Large Language Model Agentscited by 19
  6. 2025Benchmarking Poisoning Attacks against Retrieval-Augmented Generationcited by 18
  7. 2026Building Effective AI Coding Agents for the Terminal: Scaffolding, Harness, Context Engineering, and Lessons Learnedcited by 18
  8. 2025RAS-Eval: A Comprehensive Benchmark for Security Evaluation of LLM Agents in Real-World Environmentscited by 17
  9. 2026BackdoorAgent: A Unified Framework for Backdoor Attacks on LLM-based Agentscited by 16
  10. 2025Multimodal Tabular Reasoning with Privileged Structured Informationcited by 15
  11. 2025Think Twice Before You Act: Enhancing Agent Behavioral Safety with Thought Correctioncited by 14
  12. 2026OEP: Poisoning Self-Evolving LLM Agents via Locally Correct but Non-Transferable Experiencescited by 14
  13. 2024ArgMed-Agents: Explainable Clinical Decision Reasoning with LLM Disscusion via Argumentation Schemescited by 13
  14. 2025PSG-Agent: Personality-Aware Safety Guardrail for LLM-based Agentscited by 12
  15. 2025A Scalable Framework for Evaluating Health Language Modelscited by 11
  16. 2025HealthFlow: A Self-Evolving AI Agent with Meta Planning for Autonomous Healthcare Researchcited by 11
  17. 2026AgenTRIM: Tool Risk Mitigation for Agentic AIcited by 11
  18. 2026Evolving Medical Imaging Agents via Experience-driven Self-skill Discoverycited by 11
  19. 2024Almanac Copilot: Towards Autonomous Electronic Health Record Navigationcited by 9
  20. 2024A Perspective for Adapting Generalist AI to Specialized Medical AI Applications and Their Challengescited by 8
  21. 2026Your Agent's Memories Are Not Its Own: Forged Reasoning Attacks on LLM Agent Memory and Defensescited by 8
  22. 2025MoMA: A Mixture-of-Multimodal-Agents Architecture for Enhancing Clinical Prediction Modellingcited by 7
  23. 2026EHR-RAG: Bridging Long-Horizon Structured Electronic Health Records and Large Language Models via Enhanced Retrieval-Augmented Generationcited by 6
  24. 2026No Attacker Needed: Unintentional Cross-User Contamination in Shared-State LLM Agentscited by 6
  25. 2026Evo-MedAgent: Beyond One-Shot Diagnosis with Agents That Remember, Reflect, and Improvecited by 6
  26. 2025A Survey of Foundation Models for IoT: Taxonomy and Criteria-Based Analysiscited by 5
  27. 2025EHR-MCP: Real-world Evaluation of Clinical Information Retrieval by Large Language Models via Model Context Protocolcited by 5
  28. 2025Transfer Learning of Tabular Data by Finetuning Large Language Modelscited by 4
  29. 2025QuadSentinel: Sequent Safety for Machine-Checkable Control in Multi-agent Systemscited by 4
  30. 2026AutoMedBench: Towards Medical AutoResearch with Agentic AI Modelscited by 4
  31. 2026FragFuse: Bypassing Access Control of Large Language Model Agents via Memory-Based Query Fragmentation and Fusioncited by 4
  32. 2026RubricsTree: Scalable and Evolving Open-Ended Evaluation of Personal Health Agents across Health Memory and Medical Skillscited by 4
  33. 2026InjecMEM: Memory Injection Attack on LLM Agent Memory Systemscited by 4
  34. 2025TableDART: Dynamic Adaptive Multi-Modal Routing for Table Understandingcited by 3
  35. 2026AgentLens: Interpretable Safety Steering via Mechanistic Subspaces for Multi-Turn Coding Agentcited by 3
  36. 2026MediSkill-Evo: Process-Constrained Self-Evolution for Evidence-Grounded Clinical Interactioncited by 3
  37. 2025CDR-Agent: Intelligent Selection and Execution of Clinical Decision Rules Using Large Language Model Agentscited by 2
  38. 2025Toward Real-World Table Agents: Capabilities, Workflows, and Design Principles for LLM-based Table Intelligencecited by 2

50 most cited of 78 All 78 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2024LLMs-based Few-Shot Disease Predictions using EHR: A Novel Approach Combining Predictive Agent Reasoning and Critical Agent Instruction
  2. 2025Training LLMs for EHR-Based Reasoning Tasks via Reinforcement Learning
  3. 2025Toward Better EHR Reasoning in LLMs: Reinforcement Learning with Expert Attention Guidance
  4. 2025EHR-R1: A Reasoning-Enhanced Foundational Language Model for Electronic Health Record Analysis
  5. 2025Medical Reasoning in the Era of LLMs: A Systematic Review of Enhancement Techniques and Applications
  6. 2026MedZERO: Self-Evolving Agents for Open-Ended Medical Reasoning Through Controlled Knowledge Accumulation
  7. 2026From Conflict to Consensus: Boosting Medical Reasoning via Multi-Round Agentic RAG
  8. 2026EMR: Self-Evolving Medical Multi-Agent System via Experience Mining and Reuse