Retrieval augmented text-to-SQL generation for epidemiological question answering using electronic health records
On the map: Retrieval-augmented generation → Medical and biomedical RAG
Abstract (arXiv)
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.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Placed in Medical and biomedical RAG, one of 15 directions in Retrieval-augmented generation. Builds on 13 of its 31 references that are in the map. First posted on arXiv 14 Mar 2024.
Builds on
13 of 31 references.
References · 13
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2020Self-Alignment Pretraining for Biomedical Entity Representationscited by 237
- 2019Text-to-SQL Generation for Question Answering on Electronic Medical Recordscited by 77
- 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 58
- 2021Knowledge-Rich Self-Supervision for Biomedical Entity Linkingcited by 31
- 2023Selective Demonstrations for Cross-domain Text-to-SQLcited by 21
- 2022Multi-label Few-shot ICD Coding as Autoregressive Generation with Promptcited by 17
- 2023Towards Understanding the Generalization of Medical Text-to-SQL Models and Datasetscited by 9
1 more
Built on by
Citing papers per year: 2024: 1; 2025: 3; 2026: 4.
8 papers.
- 2024A Collaborative Multi-Agent Approach to Retrieval-Augmented Generation Across Diverse Datacited by 10
- 2025Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generationcited by 4
- 2025BiomedSQL: Text-to-SQL for Scientific Reasoning on Biomedical Knowledge Basescited by 4
- 2025Timing Analysis Agent: Autonomous Multi-Corner Multi-Mode (MCMM) Timing Debugging with Timing Debug Relation Graphcited by 3
- 2026Disentangling Ambiguity from Instability in Large Language Models: A Clinical Text-to-SQL Case Studycited by 3
- 2026EHRNavigator: A Multi-Agent System for Patient-Level Clinical Question Answering over Heterogeneous Electronic Health Recordscited by 1
- 2026CBR-to-SQL: Rethinking Retrieval-based Text-to-SQL using Case-based Reasoning in the Healthcare Domaincited by 0
- 2026Ascent: An Agentic System over the Model Context Protocol for Real-World Clinical Data Analysiscited by 0
- 2026Ascent: An Agentic System over the Model Context Protocol for Real-World Clinical Data Analysis21 Sep 2026
- 2026CBR-to-SQL: Rethinking Retrieval-based Text-to-SQL using Case-based Reasoning in the Healthcare Domain5 Mar 2026
- 2026Disentangling Ambiguity from Instability in Large Language Models: A Clinical Text-to-SQL Case Study12 Feb 2026
- 2026EHRNavigator: A Multi-Agent System for Patient-Level Clinical Question Answering over Heterogeneous Electronic Health Records15 Jan 2026
- 2025BiomedSQL: Text-to-SQL for Scientific Reasoning on Biomedical Knowledge Bases23 May 2025
- 2025Timing Analysis Agent: Autonomous Multi-Corner Multi-Mode (MCMM) Timing Debugging with Timing Debug Relation Graph15 Apr 2025
- 2025Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generation28 Feb 2025
- 2024A Collaborative Multi-Agent Approach to Retrieval-Augmented Generation Across Diverse Data8 Dec 2024
Similar, not cited
Close in wording, no citation either way
- 2024The Geometry of Queries: Query-Based Innovations in Retrieval-Augmented Generation for Healthcare QA
- 2025Retrieval-Augmented Generation in Medicine: A Scoping Review of Technical Implementations, Clinical Applications, and Ethical Considerations
- 2025heiDS at ArchEHR-QA 2025: From Fixed-k to Query-dependent-k for Retrieval Augmented Generation
- 2024Comprehensive and Practical Evaluation of Retrieval-Augmented Generation Systems for Medical Question Answering
- 2025PICOs-RAG: PICO-supported Query Rewriting for Retrieval-Augmented Generation in Evidence-Based Medicine
- 2024Development and Testing of Retrieval Augmented Generation in Large Language Models -- A Case Study Report
- 2023MKRAG: Medical Knowledge Retrieval Augmented Generation for Medical Question Answering
- 2025Evaluating Retrieval-Augmented Generation vs. Long-Context Input for Clinical Reasoning over EHRs