atlas

Research map / Large language models / Retrieval and knowledge

SM3-Text-to-Query: Synthetic Multi-Model Medical Text-to-Query Benchmark

NeurIPS 2024 · Large language models › Retrieval and knowledge · approach: Domain-specific QA datasets · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces SM3-Text-to-Query, a synthetic (Synthea/SNOMED-CT) medical text-to-query benchmark spanning PostgreSQL, MongoDB, Neo4j and GraphDB with 10K questions per query language, and evaluates in-context learning for four LLMs.

Problem

Text-to-Query systems have been evaluated only on single database models and query languages, so the effect of database model (relational, document, graph) and query language (SQL, MQL, Cypher, SPARQL) on LLM query generation for EHR data is unknown.

Approach

A template-based benchmark built from one synthetic SNOMED-CT-aligned patient dataset, loaded into four database systems with aligned content, so the same questions are paired with gold queries in SQL, MQL, Cypher and SPARQL, enabling cross-model comparison of ICL methods.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Select 5 few-shot examples per question using BM25 similarity instead of fixed examples (ablation)GPT-3.5 with schema information · SQL (PostgreSQL)execution accuracy: +32.25Helped
Select 5 few-shot examples per question using BM25 similarity instead of fixed examples (ablation)GPT-3.5 with schema information · SPARQL (GraphDB)execution accuracy: +52.17Helped
Select 5 few-shot examples per question using BM25 similarity instead of fixed examples (ablation)GPT-3.5 with schema information · Cypher (Neo4j)execution accuracy: +37.18Helped
Select 5 few-shot examples per question using BM25 similarity instead of fixed examples (ablation)GPT-3.5 with schema information · MQL (MongoDB)execution accuracy: +43.64Helped
Add 5 few-shot examples to schema information (ablation)Llama3-70b · SQL (PostgreSQL) testexecution accuracy: 47.05 -> 57.50Helped
Add 5 few-shot examples to schema information (ablation)Llama3-70b · SPARQL (GraphDB) testexecution accuracy: 1.00 -> 30.49Helped
Add 5 few-shot examples to schema information (ablation)Llama3-70b · Cypher (Neo4j) testexecution accuracy: 34.45 -> 57.07Helped
Add 5 few-shot examples to schema information (ablation)Llama3-70b · MQL (MongoDB) testexecution accuracy: 21.55 -> 40.35Helped
Include database schema information in the prompt (ablation)LLMs across SQL, Cypher, MQL, and SPARQL · SM3-Text-to-Query testexecution accuracyMixed

Surprising findings

Limitations

Experimental setup

Datasets: Synthea synthetic patient data (default config, 100 living and 10 deceased patients)

Benchmarks: SM3-Text-to-Query test set SM3-Text-to-Query dev set

Metrics: execution accuracy valid efficiency score

Baselines: Llama3-8b Llama3-70b Gemini 1.0 Pro GPT-3.5-turbo-0125

Builds on: EHRSQL MIMICSQL Synthea SNOMED CT BM25

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy