An OMOP-Based Open-Source Text-to-SQL Benchmark Dataset

Paul Legrand, Kawsar Noor, Satyam Bhagwanani, Richard J. Dobson


Abstract
Access to electronic health record (EHR) warehouses is limited by SQL expertise and complex clinical schemas. We present an open-source OMOP Common Data Model text-to-SQL benchmark (CDM v5.4) with a safety contract: output one executable SQL statement or the abstention token (<NO_SQL>) for unanswerable requests. Inputs are concept-normalized (entities as OMOP concept IDs) to decouple SQL generation from entity linking. We evaluate by executing predicted and reference queries on a synthetic OMOP PostgreSQL database, reporting Execution Accuracy (result equivalence) and a reliability score that rewards correct abstention and penalizes unsafe attempts. The dataset includes 6,690 paraphrases from 75 OMOP-adapted templates with leakage-resistant template/SQL-variation splits. LoRA-tuned Llama-3-8B-Instruct achieves 93.55% execution accuracy with improved abstention reliability, while schema-injected baselines fail the contract. We release the dataset, splits, database dump, and a reproducible evaluation pipeline to support reliable clinical analytics assistants.
Anthology ID:
2026.clinicalnlp-1.40
Volume:
Proceedings of the 8th Workshop on Clinical Natural Language Processing (Clinical NLP) @ LREC 2026
Month:
May
Year:
2026
Address:
Palma, Mallorca (Spain)
Editors:
Asma Ben Abacha, Steven Bethard, Danielle Bitterman, Tristan Naumann, Kirk Roberts
Venues:
ClinicalNLP | WS
SIG:
Publisher:
ELRA Language Resources Association (ELRA)
Note:
Pages:
381–393
Language:
External URL:
https://lrec.elra.info/lrec2026-ws-clinicalnlp-40
DOI:
10.63317/3hfefjmhhymh
Bibkey:
Cite (ACL):
Paul Legrand, Kawsar Noor, Satyam Bhagwanani, and Richard J. Dobson. 2026. An OMOP-Based Open-Source Text-to-SQL Benchmark Dataset. In Proceedings of the 8th Workshop on Clinical Natural Language Processing (Clinical NLP) @ LREC 2026, pages 381–393, Palma, Mallorca (Spain). ELRA Language Resources Association (ELRA).
Cite (Informal):
An OMOP-Based Open-Source Text-to-SQL Benchmark Dataset (Legrand et al., ClinicalNLP 2026)
Copy Citation: