Paper
28 October 2024 PCEM-SQL: enhancing text-to-SQL capabilities by large language models and prompt engineering with self-consistency and self-evaluation mechanism
Xiuling Zhu, Lianggui Tang, Xuan Lai, Liyong Xiao, Jiajun Yang, Zhuo Chen
Author Affiliations +
Proceedings Volume 13404, Fifth International Conference on Control, Robotics, and Intelligent System (CCRIS 2024); 134040H (2024) https://doi.org/10.1117/12.3050108
Event: Fifth International Conference on Control, Robotics, and Intelligent System (2024), 2024, Macau, China
Abstract
In recent years, natural language processing has experienced rapid development, especially in utilizing natural language statements to quickly query target data in databases. Transforming user’s natural language into computer executable SQL statements has become an important research direction for improving user database interaction. However, with the rise of large language models, enhancing their performance in Text-to-SQL tasks through prompt engineering has become a feasible research direction. This article proposes the PCEM-SQL method, which enables a large language model to generate high-quality SQL statements through clear prompt template and carefully constructed prompt words. By introducing self-consistency and self-evaluation Mechanism of the large language model, the accuracy of Text-to-SQL is significantly improved on the open-source large language model Qwen. To verify the effectiveness of the method, we construct a small dataset (Spider-SM) and conducted experiments on GPT3.5 and Qwen, once again proving that our method has a significant improvement (13%) in Qwen’s Text-to-SQL performance, and can achieve similar results as GPT3.5.
(2024) Published by SPIE. Downloading of the abstract is permitted for personal use only.
Xiuling Zhu, Lianggui Tang, Xuan Lai, Liyong Xiao, Jiajun Yang, and Zhuo Chen "PCEM-SQL: enhancing text-to-SQL capabilities by large language models and prompt engineering with self-consistency and self-evaluation mechanism", Proc. SPIE 13404, Fifth International Conference on Control, Robotics, and Intelligent System (CCRIS 2024), 134040H (28 October 2024); https://doi.org/10.1117/12.3050108
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Databases

Data modeling

Engineering

Performance modeling

Design

Machine learning

Semantics

Back to Top