Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generation
On the map: Retrieval-augmented generation → Medical and biomedical RAG
Abstract (arXiv)
Clinical cohort definition is crucial for patient recruitment and observational studies, yet translating inclusion/exclusion criteria into SQL queries remains challenging and manual. We present an automated system utilizing large language models that combines criteria parsing, two-level retrieval augmented generation with specialized knowledge bases, medical concept standardization, and SQL generation to retrieve patient cohorts with patient funnels. The system achieves 0.75 F1-score in cohort identification on EHR data, effectively capturing complex temporal and logical relationships. These results demonstrate the feasibility of automated cohort generation for epidemiological research.
Key facts. Cited by 4 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 19 of its 43 references that are in the map. First posted on arXiv 28 Feb 2025.
Builds on
19 of 43 references.
Closest ancestors · 1
Same direction, newest first
Other references · 18
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 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
- 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
- 2019Text-to-SQL Generation for Question Answering on Electronic Medical Recordscited by 77
- 2023ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thoughtcited by 65
- 2023A Multi-Task Embedder For Retrieval Augmented LLMscited by 64
- 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 58
- 2024A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQLcited by 46
- 2023EHRSQL: A Practical Text-to-SQL Benchmark for Electronic Health Recordscited by 45
- 2021Knowledge-Rich Self-Supervision for Biomedical Entity Linkingcited by 31
6 more
- 2023Scaling Clinical Trial Matching Using Large Language Models: A Case Study in Oncologycited by 24
- 2023Selective Demonstrations for Cross-domain Text-to-SQLcited by 21
- 2023Towards Understanding the Generalization of Medical Text-to-SQL Models and Datasetscited by 9
- 2023LeafAI: query generator for clinical cohort discovery rivaling a human programmercited by 9
- 2022Generalizing over Long Tail Concepts for Medical Term Normalizationcited by 8
- 2022Medical Coding with Biomedical Transformer Ensembles and Zero/Few-shot Learningcited by 6
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Disentangling Ambiguity from Instability in Large Language Models: A Clinical Text-to-SQL Case Studycited by 3
- 2026EHR-RAGp: Retrieval-Augmented Prototype-Guided Foundation Model for Electronic Health Recordscited by 0
- 2026ClinQueryAgent: A Conversational Agent for Population Health Managementcited 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
- 2026EHR-RAGp: Retrieval-Augmented Prototype-Guided Foundation Model for Electronic Health Records12 May 2026
- 2026ClinQueryAgent: A Conversational Agent for Population Health Management13 Apr 2026
- 2026Disentangling Ambiguity from Instability in Large Language Models: A Clinical Text-to-SQL Case Study12 Feb 2026
Similar, not cited
Close in wording, no citation either way
- 2026Patient-Similarity Cohort Reasoning in Clinical Text-to-SQL
- 2025EMR-AGENT: Automating Cohort and Feature Extraction from EMR Databases
- 2026Lightweight Retrieval-Augmented Generation and Large Language Model-Based Modeling for Scalable Patient-Trial Matching
- 2026CBR-to-SQL: Rethinking Retrieval-based Text-to-SQL using Case-based Reasoning in the Healthcare Domain
- 2023CohortGPT: An Enhanced GPT for Participant Recruitment in Clinical Study
- 2026Harnessing Large Language Models for Precision Querying and Retrieval-Augmented Knowledge Extraction in Clinical Data Science
- 2023Large Language Models with Retrieval-Augmented Generation for Zero-Shot Disease Phenotyping
- 2025LLM-Match: An Open-Sourced Patient Matching Model Based on Large Language Models and Retrieval-Augmented Generation