Experimental study of bidirectional and decoder-only embeddings in text-to-SQL parser
Schema linking is a critical step in existing large language model (LLM)-powered Text-to-SQL methods and can significantly enhance their performance. Embedding models assist schema linking methods in selecting question-relevant schemas from complex problems, further improving Text-to-SQL performance. However, there has been a lack of systematic research on embedding models for Text-to-SQL tasks, making the selection and optimization of embedding models a challenge for researchers. To address this, this paper systematically analyzes the characteristics of two current embedding models—bidirectional embedding models and decoder-only models—in the context of Text-to-SQL tasks through experiments. Experimental results on three real-world datasets demonstrate that when rich database descriptions are provided, the bidirectional embedding model significantly improves the execution accuracy of complex queries due to its deep ability to capture contextual information and its advantages in semantic understanding. However, in scenarios where only the schema is available, the decoder-only model exhibits stronger robustness and generalization, leveraging its language knowledge and reasoning abilities acquired during generative pre-training. This paper experimentally reveals the adaptability of different embedding models in response to variations in task complexity and information completeness, offering a new perspective on the selection and optimization of embedding models for Text-to-SQL tasks.
Authors
- Yingwei Liang
- Yufei Yang (ORCID: https://orcid.org/0000-0002-1746-8027)
- Ye Liu (ORCID: https://orcid.org/0000-0003-2511-5413)
- Yue Chen (ORCID: https://orcid.org/0000-0001-5811-6936)
Institutions
- China Southern Power Grid (China) (CN)
Publication Details
- Published
- 2025-04-25
- DOI
- https://doi.org/10.1117/12.3061810
- Primary Topic
- Advanced Database Systems and Queries
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Guangdong Power Grid Company