Retrieval augmented text-to-SQL generation for epidemiological question answering using electronic health records

Angelo Ziletti, Leonardo DAmbrosi


Abstract
Electronic health records (EHR) and claims data are rich sources of real-world data that reflect patient health status and healthcare utilization. Querying these databases to answer epidemiological questions is challenging due to the intricacy of medical terminology and the need for complex SQL queries. Here, we introduce an end-to-end methodology that combines text-to-SQL generation with retrieval augmented generation (RAG) to answer epidemiological questions using EHR and claims data. We show that our approach, which integrates a medical coding step into the text-to-SQL process, significantly improves the performance over simple prompting. Our findings indicate that although current language models are not yet sufficiently accurate for unsupervised use, RAG offers a promising direction for improving their capabilities, as shown in a realistic industry setting.
Anthology ID:
2024.clinicalnlp-1.4
Volume:
Proceedings of the 6th Clinical Natural Language Processing Workshop
Month:
June
Year:
2024
Address:
Mexico City, Mexico
Editors:
Tristan Naumann, Asma Ben Abacha, Steven Bethard, Kirk Roberts, Danielle Bitterman
Venues:
ClinicalNLP | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
47–53
Language:
URL:
https://aclanthology.org/2024.clinicalnlp-1.4
DOI:
10.18653/v1/2024.clinicalnlp-1.4
Bibkey:
Cite (ACL):
Angelo Ziletti and Leonardo DAmbrosi. 2024. Retrieval augmented text-to-SQL generation for epidemiological question answering using electronic health records. In Proceedings of the 6th Clinical Natural Language Processing Workshop, pages 47–53, Mexico City, Mexico. Association for Computational Linguistics.
Cite (Informal):
Retrieval augmented text-to-SQL generation for epidemiological question answering using electronic health records (Ziletti & DAmbrosi, ClinicalNLP-WS 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.clinicalnlp-1.4.pdf