用大模型让医生轻松查病历数据,还保证隐私安全。
Reliable Curation of EHR Dataset via Large Language Models under Environmental Constraints
- 用自然语言转SQL,结合提示词与思维链提升准确率。
- 在EHRSQL上达到同类系统水平,延迟低、成本小。
- 适合没编程基础的医研人员快速分析病历数据。
电子健康记录(EHR)是现代医疗和研究的核心;然而,许多研究人员缺乏编写复杂SQL查询或生成有效可视化的能力,限制了数据的有效利用和科学发现。为解决这一障碍,我们提出CELEC,一个基于大语言模型(LLM)的自动化EHR数据提取与分析框架。CELEC采用融合模式信息、少样本示例和链式思维推理的提示策略,将自然语言查询转化为SQL,显著提升准确性和鲁棒性。该框架严格遵守隐私协议:LLM仅访问数据库元数据(如表名、列名),所有查询执行均在机构内安全完成,患者级数据从不传输至或共享给LLM。在EHRSQL基准的一个子集上,CELEC实现了与现有系统相当的执行准确率,同时保持低延迟、低成本和严格隐私保护。消融实验表明,每个组件——尤其是少样本示例——对性能至关重要。通过降低技术门槛,使医学研究者可直接查询EHR数据库,CELEC优化了研究流程,加速了生物医学发现。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。