ChatPaper.aiChatPaper

临床文本到SQL中的患者相似性队列推理

Patient-Similarity Cohort Reasoning in Clinical Text-to-SQL

January 14, 2026
作者: Yifei Shen, Yilun Zhao, Justice Ou, Tinglin Huang, Arman Cohan
cs.AI

摘要

真实世界的临床文本转SQL任务需要基于异构电子健康档案表、时间窗口及患者相似性队列进行推理,以生成可执行查询。我们推出CLINSQL基准测试集,基于MIMIC-IV v3.1数据库包含633项专家标注任务,要求实现多表连接、临床意义筛选及可执行SQL生成。解决CLINSQL挑战需驾驭模式元数据与临床编码系统、处理长上下文语境,并构建超越传统文本转SQL的多步骤查询。我们在思维链自优化框架下评估22个专有与开源模型,采用基于量规的SQL分析与执行校验机制,优先保障关键临床需求。尽管技术持续进步,模型表现距临床可靠性仍有差距:测试集中GPT-5-mini执行准确率达74.7%,DeepSeek-R1以69.2%领跑开源模型,Gemini-2.5-Pro从简单任务的85.5%骤降至困难任务的67.2%。CLINSQL的进展标志着面向真实世界电子健康档案分析的临床可靠文本转SQL技术取得实质性突破。
English
Real-world clinical text-to-SQL requires reasoning over heterogeneous EHR tables, temporal windows, and patient-similarity cohorts to produce executable queries. We introduce CLINSQL, a benchmark of 633 expert-annotated tasks on MIMIC-IV v3.1 that demands multi-table joins, clinically meaningful filters, and executable SQL. Solving CLINSQL entails navigating schema metadata and clinical coding systems, handling long contexts, and composing multi-step queries beyond traditional text-to-SQL. We evaluate 22 proprietary and open-source models under Chain-of-Thought self-refinement and use rubric-based SQL analysis with execution checks that prioritize critical clinical requirements. Despite recent advances, performance remains far from clinical reliability: on the test set, GPT-5-mini attains 74.7% execution score, DeepSeek-R1 leads open-source at 69.2% and Gemini-2.5-Pro drops from 85.5% on Easy to 67.2% on Hard. Progress on CLINSQL marks tangible advances toward clinically reliable text-to-SQL for real-world EHR analytics.
PDF41January 17, 2026