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

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

8 Nov 2024arXiv:2411.05521archive 2025-07-28

Sithursan Sivasubramaniam, Cedric Osei-Akoto, Yi Zhang, Kurt Stockinger, Jonathan Fuerst

Electronic health records (EHRs) are stored in various database systems with different database models on heterogeneous storage architectures, such as relational databases, document stores, or graph databases. These different database models have a big impact on query complexity and performance. While this has been a known fact in database research, its implications for the growing number of Text-to-Query systems have surprisingly not been investigated so far. In this paper, we present SM3-Text-to-Query, the first multi-model medical Text-to-Query benchmark based on synthetic patient data from Synthea, following the SNOMED-CT taxonomy -- a widely used knowledge graph ontology covering medical terminology. SM3-Text-to-Query provides data representations for relational databases (PostgreSQL), document stores (MongoDB), and graph databases (Neo4j and GraphDB (RDF)), allowing the evaluation across four popular query languages, namely SQL, MQL, Cypher, and SPARQL. We systematically and manually develop 408 template questions, which we augment to construct a benchmark of 10K diverse natural language question/query pairs for these four query languages (40K pairs overall). On our dataset, we evaluate several common in-context-learning (ICL) approaches for a set of representative closed and open-source LLMs. Our evaluation sheds light on the trade-offs between database models and query languages for different ICL strategies and LLMs. Last, SM3-Text-to-Query is easily extendable to additional query languages or real, standard-based patient databases.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2411.05521")

Code

Syntology Ran 1 of 10 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · fixture could not drive it.

By repository: official repository: 10 samples from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jf87/sm3-text-to-query officialmentioned in papermentioned on GitHubApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 1 ran; 0 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · fixture could not drive it
9unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from jf87/SM3-Text-to-Query. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

calculate_execution_accuracy jf87/SM3-Text-to-Query/src/evaluation/Evaluation.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 612cf9d2741f4f7d · report
add_mql_results_columns jf87/sm3-text-to-query/src/evaluation/Dataframe_query_processing/mql_df_query_processor.py official repository unverified Apache-2.0 (permissive) · d10e47a1627631b4 · report
add_mql_results_columns2 jf87/sm3-text-to-query/src/evaluation/Dataframe_query_processing/mql_df_query_processor.py official repository unverified Apache-2.0 (permissive) · 31e8de058c523def · report
add_sql_results_columns jf87/sm3-text-to-query/src/evaluation/Dataframe_query_processing/sql_df_query_processor.py official repository unverified Apache-2.0 (permissive) · ed410c0b7bc4f6e6 · report
execute_mongo_query jf87/sm3-text-to-query/src/evaluation/Dataframe_query_processing/mql_df_query_processor.py official repository unverified Apache-2.0 (permissive) · 91878b0f862874a9 · report
execute_sql_query jf87/sm3-text-to-query/src/evaluation/Dataframe_query_processing/sql_df_query_processor.py official repository unverified Apache-2.0 (permissive) · b9ed7812760c3aab · report
extract_cypher_query jf87/sm3-text-to-query/src/evaluation/DB_query.py official repository unverified Apache-2.0 (permissive) · 756670ebe35be9ad · report
extract_sparql_query jf87/sm3-text-to-query/src/evaluation/DB_query.py official repository unverified Apache-2.0 (permissive) · 1734446e20b25669 · report
extract_sql_queries jf87/sm3-text-to-query/src/evaluation/DB_query.py official repository unverified Apache-2.0 (permissive) · f1c3a7d5764d6c05 · report
generate_statement_gpt jf87/sm3-text-to-query/src/run_experiments/run_llm_common.py official repository unverified Apache-2.0 (permissive) · 4194a3376043180b · report

Tasks

In-Context Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

OntologySET

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections