Text-to-SQL Domain Adaptation via Human-LLM Collaborative Data Annotation
Abstract
Text-to-SQL models, which parse natural language (NL) questions to executable SQL queries, are increasingly adopted in real-world applications. However, deploying such models in the real world often requires adapting them to the highly specialized database schemas used in specific applications. We find that existing text-to-SQL models experience significant performance drops when applied to new schemas, primarily due to the lack of domain-specific data for fine-tuning. This data scarcity also limits the ability to effectively evaluate model performance in new domains. Continuously obtaining high-quality text-to-SQL data for evolving schemas is prohibitively expensive in real-world scenarios. To bridge this gap, we propose SQLsynth, a human-in-the-loop text-to-SQL data annotation system. SQLsynth streamlines the creation of high-quality text-to-SQL datasets through human-LLM collaboration in a structured workflow. A within-subjects user study comparing SQLsynth with manual annotation and ChatGPT shows that SQLsynth significantly accelerates text-to-SQL data annotation, reduces cognitive load, and produces datasets that are more accurate, natural, and diverse. Our code is available at https://github.com/adobe/nl_sql_analyzer.
- Venue
- IUI 2025
- Volume
- Proceedings of the 30th International Conference on Intelligent User Interfaces
- DOI
- 10.1145/3708359.3712083
- https://dl.acm.org/doi/pdf/10.1145/3708359.3712083
- Anthology ID
2025.iui.14
Cite
@inproceedings{tian-etal-2025-texttosql,
title = {{Text-to-SQL Domain Adaptation via Human-LLM Collaborative Data Annotation}},
author = {Yuan Tian and Daniel Lee and Fei Wu and Tung Mai and Kun Qian and Siddhartha Sahai and Tianyi Zhang and Yunyao Li},
booktitle = {Proceedings of the 30th International Conference on Intelligent User Interfaces},
isbn = {9798400713064},
year = {2025},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
doi = {10.1145/3708359.3712083},
url = {https://doi.org/10.1145/3708359.3712083},
abstract = {Text-to-SQL models, which parse natural language (NL) questions to executable SQL queries, are increasingly adopted in real-world applications. However, deploying such models in the real world often requires adapting them to the highly specialized database schemas used in specific applications. We find that existing text-to-SQL models experience significant performance drops when applied to new schemas, primarily due to the lack of domain-specific data for fine-tuning. This data scarcity also limits the ability to effectively evaluate model performance in new domains. Continuously obtaining high-quality text-to-SQL data for evolving schemas is prohibitively expensive in real-world scenarios. To bridge this gap, we propose SQLsynth, a human-in-the-loop text-to-SQL data annotation system. SQLsynth streamlines the creation of high-quality text-to-SQL datasets through human-LLM collaboration in a structured workflow. A within-subjects user study comparing SQLsynth with manual annotation and ChatGPT shows that SQLsynth significantly accelerates text-to-SQL data annotation, reduces cognitive load, and produces datasets that are more accurate, natural, and diverse. Our code is available at https://github.com/adobe/nl\_sql\_analyzer.}
}