ETM: Modern Insights into Perspective on Text-to-SQL Evaluation in the Age of Large Language Models
Open Access
- 23 July 2025
- journal article
- research article
- Published by MDPI AG in Future Internet
- Vol. 17 (8) , 325
Abstract
The task of Text-to-SQL enables anyone to retrieve information from SQL databases using natural language. While this task has made substantial progress, the two primary evaluation metrics—Execution Accuracy (EXE) and Exact Set Matching Accuracy (ESM)—suffer from inherent limitations that can misrepresent performance. Specifically, ESM’s rigid matching overlooks semantically correct but stylistically different queries, whereas EXE can overestimate correctness by ignoring structural errors that yield correct outputs. These shortcomings become especially problematic when assessing outputs from large language model (LLM)-based approaches without fine-tuning, which vary more in style and structure compared with their fine-tuned counterparts. Thus, we introduce a new metric, Enhanced Tree Matching (ETM), which mitigates these issues by comparing queries using both syntactic and semantic elements. Through evaluating nine LLM-based models, we show that EXE and ESM can produce false positive and negative rates as high as 23.0% and 28.9%, while ETM reduces these rates to 0.3% and 2.7%, respectively. We release our ETM script as open-source, offering the community a more robust and reliable approach to evaluating Text-to-SQL.Keywords
All Related Versions
This publication has 14 references indexed in Scilit:
- The Dawn of Natural Language to SQL: Are We Fully Ready?Proceedings of the VLDB Endowment, 2024
- CodeS: Towards Building Open-source Language Models for Text-to-SQLProceedings of the ACM on Management of Data, 2024
- Enhancing Text-to-SQL Translation for Financial System Design2024
- StatBot.Swiss: Bilingual Open Data Exploration in Natural Language2024
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationProceedings of the VLDB Endowment, 2024
- Graphix-T5: Mixing Pre-trained Transformers with Graph-Aware Layers for Text-to-SQL ParsingProceedings of the AAAI Conference on Artificial Intelligence, 2023
- RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLProceedings of the AAAI Conference on Artificial Intelligence, 2023
- PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language ModelsarXiv, 2021
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites2020
- Automated verification of query equivalence using satisfiability modulo theoriesProceedings of the VLDB Endowment, 2019