Text-to-SQL Domain Adaptation via Human-LLM Collaborative Data Annotation
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/magic-YuanTian/SQLsynth.
Authors
- Fei Wu (ORCID: https://orcid.org/0000-0003-2139-8807)
- Tung Mai (ORCID: https://orcid.org/0009-0006-1081-5627)
- Kun Qian (ORCID: https://orcid.org/0000-0002-1918-6453)
- Yuan Tian (ORCID: https://orcid.org/0000-0002-2200-5713)
- Daniel Lee (ORCID: https://orcid.org/0000-0001-7724-8539)
- Tianyi Zhang (ORCID: https://orcid.org/0000-0002-2833-3363)
- Yunyao Li (ORCID: https://orcid.org/0009-0002-0814-4634)
- Siddhartha Sahai
Institutions
- Adobe Systems (United States) (US)
- Purdue University West Lafayette (US)
Publication Details
- Published
- 2025-03-19
- DOI
- https://doi.org/10.1145/3708359.3712083
- Citations
- 2
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 4.96