Saved in:
Bibliographic Details
Main Authors: Xiong, Raymond M., Chen, Panyu, Dong, Tianze, Lu, Jian, Hu, Louis, Yu, Nathan, Goldstein, Benjamin, Zhuo, Danyang, Zhang, Anru R.
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2511.00772
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912899889364992
author Xiong, Raymond M.
Chen, Panyu
Dong, Tianze
Lu, Jian
Hu, Louis
Yu, Nathan
Goldstein, Benjamin
Zhuo, Danyang
Zhang, Anru R.
author_facet Xiong, Raymond M.
Chen, Panyu
Dong, Tianze
Lu, Jian
Hu, Louis
Yu, Nathan
Goldstein, Benjamin
Zhuo, Danyang
Zhang, Anru R.
contents Electronic health records (EHRs) are central to modern healthcare delivery and research; yet, many researchers lack the database expertise necessary to write complex SQL queries or generate effective visualizations, limiting efficient data use and scientific discovery. To address this barrier, we introduce CELEC, a large language model (LLM)-powered framework for automated EHR data extraction and analytics. CELEC translates natural language queries into SQL using a prompting strategy that integrates schema information, few-shot demonstrations, and chain-of-thought reasoning, which together improve accuracy and robustness. CELEC also adheres to strict privacy protocols: the LLM accesses only database metadata (e.g., table and column names), while all query execution occurs securely within the institutional environment, ensuring that no patient-level data is ever transmitted to or shared with the LLM. On a subset of the EHRSQL benchmark, CELEC achieves execution accuracy comparable to prior systems while maintaining low latency, cost efficiency, and strict privacy by exposing only database metadata to the LLM. Ablation studies confirm that each component of the SQL generation pipeline, particularly the few-shot demonstrations, plays a critical role in performance. By lowering technical barriers and enabling medical researchers to query EHR databases directly, CELEC streamlines research workflows and accelerates biomedical discovery.
format Preprint
id arxiv_https___arxiv_org_abs_2511_00772
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Reliable Curation of EHR Dataset via Large Language Models under Environmental Constraints
Xiong, Raymond M.
Chen, Panyu
Dong, Tianze
Lu, Jian
Hu, Louis
Yu, Nathan
Goldstein, Benjamin
Zhuo, Danyang
Zhang, Anru R.
Databases
Machine Learning
Applications
Electronic health records (EHRs) are central to modern healthcare delivery and research; yet, many researchers lack the database expertise necessary to write complex SQL queries or generate effective visualizations, limiting efficient data use and scientific discovery. To address this barrier, we introduce CELEC, a large language model (LLM)-powered framework for automated EHR data extraction and analytics. CELEC translates natural language queries into SQL using a prompting strategy that integrates schema information, few-shot demonstrations, and chain-of-thought reasoning, which together improve accuracy and robustness. CELEC also adheres to strict privacy protocols: the LLM accesses only database metadata (e.g., table and column names), while all query execution occurs securely within the institutional environment, ensuring that no patient-level data is ever transmitted to or shared with the LLM. On a subset of the EHRSQL benchmark, CELEC achieves execution accuracy comparable to prior systems while maintaining low latency, cost efficiency, and strict privacy by exposing only database metadata to the LLM. Ablation studies confirm that each component of the SQL generation pipeline, particularly the few-shot demonstrations, plays a critical role in performance. By lowering technical barriers and enabling medical researchers to query EHR databases directly, CELEC streamlines research workflows and accelerates biomedical discovery.
title Reliable Curation of EHR Dataset via Large Language Models under Environmental Constraints
topic Databases
Machine Learning
Applications
url https://arxiv.org/abs/2511.00772