Application of a Large Language Model Incorporating Semantic Information of Data in the SQL Generation Task
Nianlong Zhang · Applied and Computational Engineering · 2025
In the era of big data, data analysis is crucial to enterprise decision-making, but the traditional SQL query writing poses a challenge for non-professionals. With the rapid development of NLP technology, large language models (LLM) such as BERT and GPT have shown strong capabilities. In this paper, the template filling method is used to study the NI2SQL task in the single table scenario and design query templates containing multiple slot bits. The experimental results show that the constructed model achieves high logical form accuracy (LX) and execution accuracy (EX) in both the validation set and the test set, and improves the fault tolerance through fuzzy matching. In addition, the model also performs well in each sub-task, and the introduction of word and table field similarity (sim) further improves the accuracy of conditional value prediction.