CBR-to-SQL: Rethinking Retrieval-based Text-to-SQL using Case-based Reasoning in the Healthcare Domain
On the map: LLM reasoning → Clinical and biomedical applications
also in 1 more
Abstract (arXiv)
Extracting insights from Electronic Health Record (EHR) databases often requires SQL expertise, creating a barrier for clinical decision-making and research. A promising approach is to use Large Language Models (LLMs) to translate natural language questions into SQL through Retrieval-Augmented Generation (RAG), where relevant question-SQL examples are retrieved to generate new queries via few-shot learning. However, adapting this method to the medical domain is non-trivial, as effective retrieval requires examples that align with both the logical structure of the question and its referenced entities (e.g., drug names, procedure titles). Standard single-step RAG struggles to optimize both aspects simultaneously and often relies on near-exact matches to generalize effectively. This issue is especially severe in healthcare, as questions often contain noisy and inconsistent medical jargon. To address this, we present CBR-to-SQL, a framework inspired by Case-based Reasoning theory that decomposes RAG's single-step retrieval into two explicit stages: one that focuses on retrieving structurally relevant examples, and one that aligns entities with the target database schema. Evaluated on two clinical benchmarks, CBR-to-SQL achieves competitive accuracies compared to fine-tuned methods. More importantly, it demonstrates considerably higher sample efficiency and robustness than the standard RAG approach, particularly under data scarcity and retrieval perturbations.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Clinical and biomedical applications, one of 17 directions in LLM reasoning. Builds on 24 of its 49 references that are in the map. First posted on arXiv 5 Mar 2026.
Builds on
24 of 49 references.
References · 24
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2019Text-to-SQL Generation for Question Answering on Electronic Medical Recordscited by 76
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systemscited by 15
- 2021Coarse2Fine: Fine-grained Text Classification on Coarsely-grained Annotated Datacited by 13
12 more
- 2024Dubo-SQL: Diverse Retrieval-Augmented Generation and Fine Tuning for Text-to-SQLcited by 12
- 2021Question Answering for Complex Electronic Health Records Database using Unified Encoder-Decoder Architecturecited by 9
- 2024Overview of the EHRSQL 2024 Shared Task on Reliable Text-to-SQL Modeling on Electronic Health Recordscited by 9
- 2024Retrieval augmented text-to-SQL generation for epidemiological question answering using electronic health recordscited by 8
- 2024LG AI Research & KAIST at EHRSQL 2024: Self-Training Large Language Models with Pseudo-Labeled Unanswerable Questions for a Reliable Text-to-SQL System on EHRscited by 7
- 2022CBR-iKB: A Case-Based Reasoning Approach for Question Answering over Incomplete Knowledge Basescited by 6
- 2024ProbGate at EHRSQL 2024: Enhancing SQL Query Generation Accuracy through Probabilistic Threshold Filtering and Error Handlingcited by 6
- 2023Structured Case-based Reasoning for Inference-time Adaptation of Text-to-SQL parserscited by 3
- 2024KU-DMIS at EHRSQL 2024:Generating SQL query via question templatization in EHRcited by 3
- 2024PromptMind Team at EHRSQL-2024: Improving Reliability of SQL Generation using Ensemble LLMscited by 2
- 2025MageSQL: Enhancing In-context Learning for Text-to-SQL Applications with Large Language Modelscited by 2
- 2018Translating Natural Language to SQL using Pointer-Generator Networks and How Decoding Order Matterscited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Evaluating Retrieval-Augmented Generation vs. Long-Context Input for Clinical Reasoning over EHRs
- 2025MedCoT-RAG: Causal Chain-of-Thought RAG for Medical Question Answering
- 2026A Systematic Study of Retrieval Pipeline Design for Retrieval-Augmented Medical Question Answering
- 2024The Geometry of Queries: Query-Based Innovations in Retrieval-Augmented Generation for Healthcare QA
- 2024Comprehensive and Practical Evaluation of Retrieval-Augmented Generation Systems for Medical Question Answering
- 2026Harnessing Large Language Models for Precision Querying and Retrieval-Augmented Knowledge Extraction in Clinical Data Science
- 2025Retrieval-Augmented Generation in Medicine: A Scoping Review of Technical Implementations, Clinical Applications, and Ethical Considerations
- 2023MKRAG: Medical Knowledge Retrieval Augmented Generation for Medical Question Answering