Patient-Similarity Cohort Reasoning in Clinical Text-to-SQL
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.
6969a43732f0333869ff93b5
Yifei Shen
claimed_verified
2026-01-16T10:29:53.419Z
673ba2b141d69ace67cf289f
https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/hiC2TM2y2oz5X-slJdMy9.png
YIFEI SHEN
yifeis02
user
yifeis02
6969a43732f0333869ff93b6
Yilun Zhao
admin_assigned
2026-01-16T15:40:43.185Z
62f662bcc58915315c4eccea
https://cdn-avatars.huggingface.co/v1/production/uploads/62f662bcc58915315c4eccea/zOAQLONfMP88zr70sxHK-.jpeg
Yilun Zhao
yilunzhao
user
yilunzhao
6969a43732f0333869ff93b7
Justice Ou
admin_assigned
2026-01-16T15:40:49.836Z
66cb9e6e8347e21e8a62bdae
/avatars/8bb855a7e2728bcd441dbf3ee03e41db.svg
Justice Ou
JusticeOu
user
JusticeOu
6969a43732f0333869ff93b8
Tinglin Huang
6969a43732f0333869ff93b9
Arman Cohan
admin_assigned
2026-01-16T15:41:04.821Z
5f5ba21188f57f65f951f255
https://cdn-avatars.huggingface.co/v1/production/uploads/1599840760465-noauth.png
Arman Cohan
armanc
user
armanc
Patient-Similarity Cohort Reasoning in Clinical Text-to-SQL
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.
CLINSQL benchmark evaluates text-to-SQL models on complex clinical tasks requiring multi-table joins, temporal reasoning, and patient similarity analysis from real-world EHR data.
text-to-SQL EHR tables clinical reasoning multi-table joins temporal windows patient-similarity cohorts schema metadata clinical coding systems long contexts multi-step queries Chain-of-Thought self-refinement rubric-based SQL analysis execution checks clinical reliability