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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Shi, Wenqi, Xu, Ran, Zhuang, Yuchen, Yu, Yue, Zhang, Jieyu, Wu, Hang, Zhu, Yuanda, Ho, Joyce, Yang, Carl, Wang, May D.
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913529689276416
author Shi, Wenqi
Xu, Ran
Zhuang, Yuchen
Yu, Yue
Zhang, Jieyu
Wu, Hang
Zhu, Yuanda
Ho, Joyce
Yang, Carl
Wang, May D.
author_facet Shi, Wenqi
Xu, Ran
Zhuang, Yuchen
Yu, Yue
Zhang, Jieyu
Wu, Hang
Zhu, Yuanda
Ho, Joyce
Yang, Carl
Wang, May D.
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2401_07128
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle EHRAgent: Code Empowers Large Language Models for Few-shot Complex Tabular Reasoning on Electronic Health Records
Shi, Wenqi
Xu, Ran
Zhuang, Yuchen
Yu, Yue
Zhang, Jieyu
Wu, Hang
Zhu, Yuanda
Ho, Joyce
Yang, Carl
Wang, May D.
Computation and Language
Artificial Intelligence
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.
title EHRAgent: Code Empowers Large Language Models for Few-shot Complex Tabular Reasoning on Electronic Health Records
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2401.07128