Case study
Vietnamese Text-to-SQL with Large Language Models
Research into adapting large language models to translate Vietnamese questions into executable SQL using fine-tuning and in-context learning.
Research question
Can a large language model reliably translate a Vietnamese natural-language question into SQL, despite the smaller amount of language-specific training data and the structural precision required by database queries?
This work explored the question through a Vietnamese Text-to-SQL system and an AI-generated dataset designed for the task.
Approach
The research adapted CodeLlama with LoRA and compared several ways of teaching the model the task:
- Fine-tuning on Vietnamese question and SQL pairs.
- Few-shot learning with representative examples in context.
- Chain-of-thought learning for more explicit intermediate reasoning.
- Few-shot chain-of-thought, combining examples with structured reasoning.
The work sat at the intersection of dataset design, model adaptation, prompting, and evaluation. Correct-looking output was not enough; the generated query had to preserve the meaning of the question and follow executable SQL structure.
My role
I worked on the project as an AI researcher through my HCMUT thesis and science research program, focusing on the Vietnamese language adaptation and the training and prompting strategies described above.
Outcome
The research was documented in Vietnamese Text-to-SQL with Large Language Models: A Comprehensive Approach and submitted to ICLR 2025. The paper is available on OpenReview.
Content to add: dataset size and construction process, evaluation datasets, exact-match or execution accuracy, baseline comparison, experiment table, and a concrete Vietnamese question-to-SQL example.
Reflection
The project reinforced that language adaptation is not just translation. Schema grounding, database context, evaluation quality, and the structure of examples all shape whether a model can produce a useful query.
Continue exploring
See all case studies ↗