From Conversation to Query Execution: Benchmarking User and Tool Interactions for EHR Database Agents

Gyubok Lee, Woosog Chay, Heeyoung Kwak, Yeong Hwa Kim, Haanju Yoo +3 more
9/27/2025
cs.AI

Official code: glee4810/EHR-ChatQA (8 stars, last commit 2026-03-16).

Abstract

Despite the impressive performance of LLM-powered agents, their adoption for Electronic Health Record (EHR) data access remains limited by the absence of benchmarks that adequately capture real-world clinical data access flows. In practice, two core challenges hinder deployment: query ambiguity from vague user questions and value mismatch between user terminology and database entries. To address this, we introduce EHR-ChatQA, an interactive database question answering benchmark that evaluates the end-to-end workflow of database agents: clarifying user questions, using tools to resolve value mismatches, and generating correct SQL to deliver accurate answers. To cover diverse patterns of query ambiguity and value mismatch, EHR-ChatQA assesses agents in a simulated environment with an LLM-based user across two interaction flows: Incremental Query Refinement (IncreQA), where users add constraints to existing queries, and Adaptive Query Refinement (AdaptQA), where users adjust their search goals mid-conversation. Experiments with state-of-the-art LLMs (e.g., o4-mini and Gemini-2.5-Flash) over five i.i.d. trials show that while the best-performing agents achieve Pass@5 of over 90% (at least one of five trials) on IncreQA and 60-70% on AdaptQA, their Pass^5 (consistent success across all five trials) is substantially lower, with gaps of up to about 60%. These results underscore the need to build agents that are not only performant but also robust for the safety-critical EHR domain. Finally, we provide diagnostic insights into common failure modes to guide future agent development. Our code and data are publicly available at https://github.com/glee4810/EHR-ChatQA.

View on arXivView PDF

Code Implementations(1)

Code and Data for EHR-ChatQA

81Shell, PythonFeb 7, 20257 months ago

Similar Papers

Cite this paper

@article{lee2025from,
  title  = {From Conversation to Query Execution: Benchmarking User and Tool Interactions for EHR Database Agents},
  author = {Gyubok Lee and Woosog Chay and Heeyoung Kwak and Yeong Hwa Kim and Haanju Yoo and Oksoon Jeong and Meong Hi Son and Edward Choi},
  year   = {2025},
  eprint = {2509.23415},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.23415v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.23415.svg)](https://codeofpaper.com/paper/2509.23415)

Discussion