← Latest papers
💬 NLP

BiomedSQL: Text-to-SQL for Scientific Reasoning on Biomedical Knowledge Bases

The paper introduces BiomedSQL, the first benchmark designed to evaluate scientific reasoning in text-to-SQL generation over a real-world biomedical knowledge base, revealing significant performance gaps between current large language models and expert baselines in handling complex domain-specific criteria.

Original authors: Mathew J. Koretsky, Maya Willey, Owen Bianchi, Chelsea X. Alvarado, Tanay Nayak, Nicole Kuznetsov, Sungwon Kim, Mike A. Nalls, Daniel Khashabi, Faraz Faghri

Published 2026-03-18
📖 5 min read🧠 Deep dive

Original authors: Mathew J. Koretsky, Maya Willey, Owen Bianchi, Chelsea X. Alvarado, Tanay Nayak, Nicole Kuznetsov, Sungwon Kim, Mike A. Nalls, Daniel Khashabi, Faraz Faghri

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Idea: Asking a Librarian a Very Specific Question

Imagine you walk into the world's largest library. This library doesn't just have books; it has billions of pages of medical data: gene maps, drug trial results, and patient records.

You want to find a specific answer, like: "Which genetic mutations make Parkinson's disease worse?"

In the old days, you'd have to hire a team of expert librarians (biomedical scientists) to manually search through the stacks, cross-reference tables, and do the math for you. It's slow, expensive, and hard to scale.

Now, we have AI (Large Language Models). We want to teach the AI to be that librarian. You type your question in plain English, and the AI instantly writes a computer command (called SQL) to fetch the answer from the database.

The Problem: Current AI is great at writing simple commands like "Show me all books by Shakespeare." But when you ask it complex medical questions, it often fails. It doesn't understand the hidden rules of science. It might forget to check if a drug is actually approved, or it might miss the strict statistical rules scientists use to decide if a result is real or just a fluke.

Enter BiomedSQL: The "Final Exam" for Medical AI

The authors of this paper created BiomedSQL, which is essentially a massive, super-hard final exam designed specifically to test how well AI can do medical research.

Here is what makes it special:

  1. It's Not Just Translation: Most AI tests just check if the AI can translate English into computer code. BiomedSQL checks if the AI can think like a scientist.

    • Analogy: Imagine a test where you ask a student, "Who is the tallest person in the room?" A basic AI just looks for the word "tallest." A smart AI knows it needs to measure everyone, ignore people standing on chairs, and only count adults. BiomedSQL forces the AI to know that "significant" in science means a specific math number (like a p-value less than 0.00000005), not just "important."
  2. The Dataset: They built a giant, real-world database using Google's BigQuery. It contains:

    • Gene-Disease links: How genes connect to diseases like Alzheimer's.
    • Drug info: Which drugs target which genes and if they are approved by the FDA.
    • Clinical Trials: The status of drug testing.
    • They generated 68,000 questions based on real scientific queries.
  3. The "Gold Standard" Baseline: Before testing the AI, they had real human experts answer these questions. The experts got it right 90% of the time. This sets the bar high.

The Results: The AI is Trying Hard, But Still Stumbling

The researchers tested many of the smartest AI models available (like GPT-4, Gemini, and Claude) on this exam. Here is what happened:

  • The Score: The best AI model (Gemini-3-Pro) only got 58% of the answers right.
  • The Gap: There is a huge gap between the AI (58%) and the human experts (90%).
  • The Custom Agent: The authors built their own specialized AI assistant called BMSQL. It acts like a detective that doesn't just guess once; it checks its work, fixes errors, and asks for clarification. This boosted the score to 62.6%, but it still couldn't catch up to the human experts.

Why did the AI struggle?
The paper found that the AI made three main types of mistakes:

  1. Wrong Bookshelf: It looked in the wrong database table (e.g., looking for drug info in a gene table).
  2. Missing the Fine Print: It forgot the strict scientific rules (like "only show results with a p-value under 5e-8").
  3. Bad Math: It messed up the complex filtering logic needed to combine different pieces of data.

Why This Matters

Think of BiomedSQL as a stress test for the future of medical AI.

  • Current State: If we let AI run medical research today, it might give us answers that look right but are scientifically wrong. It's like a GPS that takes you to the right city but drops you off in the middle of a lake because it didn't understand the road rules.
  • The Goal: This benchmark helps researchers see exactly where AI is failing so they can build better tools.
  • The Future: The ultimate goal is to create an AI that acts as a "super-assistant" for scientists. Imagine a researcher asking, "Find me a drug that targets this specific gene and has passed Phase 3 trials," and getting a perfect, verified answer in seconds. That would accelerate cures for diseases like Alzheimer's and Parkinson's.

The Takeaway

The paper concludes that while AI is amazing at writing code, it still lacks the deep scientific intuition required to navigate the complex, rule-heavy world of biomedical research. BiomedSQL is the tool we need to bridge that gap, ensuring that when AI helps us discover new cures, it does so with the same rigor and safety as a human expert.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →