BiomedSQL: Text-to-SQL voor Wetenschappelijk Redeneren op Biomedische Kennisbanken
BiomedSQL: Text-to-SQL for Scientific Reasoning on Biomedical Knowledge Bases
May 23, 2025
Auteurs: Mathew J. Koretsky, Maya Willey, Adi Asija, Owen Bianchi, Chelsea X. Alvarado, Tanay Nayak, Nicole Kuznetsov, Sungwon Kim, Mike A. Nalls, Daniel Khashabi, Faraz Faghri
cs.AI
Samenvatting
Biomedische onderzoekers vertrouwen steeds meer op grootschalige gestructureerde databases voor complexe analytische taken. Huidige tekst-naar-SQL-systemen hebben echter vaak moeite om kwalitatieve wetenschappelijke vragen om te zetten in uitvoerbare SQL, vooral wanneer impliciet domeinspecifiek redeneren vereist is. Wij introduceren BiomedSQL, de eerste benchmark die expliciet is ontworpen om wetenschappelijk redeneren te evalueren in tekst-naar-SQL-generatie over een real-world biomedische kennisbank. BiomedSQL bestaat uit 68.000 vraag/SQL-query/antwoord-triples, gebaseerd op een geharmoniseerde BigQuery-kennisbank die gen-ziekte-associaties, causale inferentie uit omics-data en goedkeuringsgegevens van medicijnen integreert. Elke vraag vereist dat modellen domeinspecifieke criteria afleiden, zoals genome-wide significantiedrempels, effectrichting of trial-fasefiltering, in plaats van alleen te vertrouwen op syntactische vertaling. We evalueren een reeks open- en closed-source LLM's over verschillende promptstrategieën en interactieparadigma's. Onze resultaten tonen een aanzienlijk prestatiegat: GPT-o3-mini behaalt 59,0% uitvoeringsnauwkeurigheid, terwijl onze aangepaste multi-step agent, BMSQL, 62,6% bereikt, beide ver onder de expertbaseline van 90,0%. BiomedSQL biedt een nieuwe basis voor het bevorderen van tekst-naar-SQL-systemen die wetenschappelijke ontdekking kunnen ondersteunen door robuust redeneren over gestructureerde biomedische kennisbanken. Onze dataset is publiekelijk beschikbaar op https://huggingface.co/datasets/NIH-CARD/BiomedSQL, en onze code is open-source op https://github.com/NIH-CARD/biomedsql.
English
Biomedical researchers increasingly rely on large-scale structured databases
for complex analytical tasks. However, current text-to-SQL systems often
struggle to map qualitative scientific questions into executable SQL,
particularly when implicit domain reasoning is required. We introduce
BiomedSQL, the first benchmark explicitly designed to evaluate scientific
reasoning in text-to-SQL generation over a real-world biomedical knowledge
base. BiomedSQL comprises 68,000 question/SQL query/answer triples grounded in
a harmonized BigQuery knowledge base that integrates gene-disease associations,
causal inference from omics data, and drug approval records. Each question
requires models to infer domain-specific criteria, such as genome-wide
significance thresholds, effect directionality, or trial phase filtering,
rather than rely on syntactic translation alone. We evaluate a range of open-
and closed-source LLMs across prompting strategies and interaction paradigms.
Our results reveal a substantial performance gap: GPT-o3-mini achieves 59.0%
execution accuracy, while our custom multi-step agent, BMSQL, reaches 62.6%,
both well below the expert baseline of 90.0%. BiomedSQL provides a new
foundation for advancing text-to-SQL systems capable of supporting scientific
discovery through robust reasoning over structured biomedical knowledge bases.
Our dataset is publicly available at
https://huggingface.co/datasets/NIH-CARD/BiomedSQL, and our code is open-source
at https://github.com/NIH-CARD/biomedsql.