Shi Wenqi, Xu Ran, Zhuang Yuchen, Yu Yue, Zhang Jieyu, Wu Hang, Zhu Yuanda, Ho Joyce, Yang Carl, Wang May D
Georgia Institute of Technology.
Emory University.
Proc Conf Empir Methods Nat Lang Process. 2024 Nov;2024:22315-22339. doi: 10.18653/v1/2024.emnlp-main.1245.
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.
临床医生常常依赖数据工程师从电子健康记录(EHR)系统中检索复杂的患者信息,这一过程既低效又耗时。我们提出了EHRAgent,这是一个具备累积领域知识和强大编码能力的大语言模型(LLM)智能体。EHRAgent能够自主生成并执行代码,以便临床医生使用自然语言直接与电子健康记录进行交互。具体而言,我们将基于电子健康记录的多表推理任务制定为一个工具使用规划过程,有效地将复杂任务分解为一系列可通过外部工具集管理的操作。我们首先注入相关医学信息,使EHRAgent能够有效地对给定查询进行推理,从适当的表格中识别并提取所需记录。通过整合交互式编码和执行反馈,EHRAgent随后从错误消息中有效学习,并迭代改进其最初生成的代码。在三个真实世界的电子健康记录数据集上进行的实验表明,EHRAgent在成功率方面比最强基线高出29.6%,验证了其以最少演示解决复杂临床任务的强大能力。