Vietnamese Text-to-SQL with Large Language Models: A Comprehensive Approach

Authors: Phu Nguyen Dac Hoang, Cuong Le Phuoc, Tri Doan Tran Cao, Nguyễn Minh Quang
Primary area: unsupervised, self-supervised, semi-supervised, and supervised representation learning
Keywords: text-to-sql, large language models, few-shot, chain-of-thought, mini schema, vitext2sql, sql

Abstract:
In the current era of Artificial Intelligence (AI), the realm of database querying is experiencing a profound evolution. With the recent emergence of Large Language Models (LLMs), with a particular emphasis on Vietnamese in this study, a promising opportunity arises to bridge the gap between human language and database interactions. In this paper, we embark on realizing this vision through a three-pronged approach. Firstly, we introduce a few-shot learning method designed to enhance the database schema comprehension of Vietnamese LLMs. Secondly, we employ a chain-of-thought technique to systematically guide LLMs in capturing complex natural language expressions for SQL generation. Thirdly, we introduce a novel method to streamline the input schema by removing redundant parts and retaining only the parts that are truly relevant to enhance the efficiency and accuracy of the SQL generation process. Finally, we experimented with a combination of few-shot, chain-of-thought learning, and schema-enhancing methods. Through experimentation with augmented datasets, we observe encouraging initial results. Our approach outperforms the current state-of-the-art model by 23% in exact matching on the Vietnamese ViText2SQL dataset. We achieved this result with a single pretraining step and one epoch of retraining, compared to the SoTA model's 10 epochs. These findings demonstrate the effectiveness of our method and its potential for Vietnamese text-to-SQL applications.

Decision: desk rejected
Reviewer scores: 0

Reviews and discussion:

Metareview: