PCEM-SQL: enhancing text-to-SQL capabilities by large language models and prompt engineering with self-consistency and self-evaluation mechanism

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.

Authors

Institutions

Publication Details

Published
2024-10-28
DOI
https://doi.org/10.1117/12.3050108
Primary Topic
Distributed and Parallel Computing Systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

PCEM-SQL: enhancing text-to-SQL capabilities by large language models and prompt engineering with self-consistency and self-evaluation mechanism

Xide Lai, Liang Xiao, Zhuo Chen, Lianggui Tang et al.
Distributed and Parallel Computing Systems
article

PCEM-SQL: enhancing text-to-SQL capabilities by large language models and prompt engineering with self-consistency and self-evaluation mechanism

Xide Lai, Liang Xiao, Zhuo Chen, Lianggui Tang, Jiajun Yang, Xiyu Zhu
article en

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.

Chongqing Technology and Business University (CN)
Openalex Percentile: Top 79%
Distributed and Parallel Computing Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

PCEM-SQL: enhancing text-to-SQL capabilities by large language models and prompt engineering with self-consistency and self-evaluation mechanism — Xide Lai, Liang Xiao, et al. · (2024) | TGRS Research Map | TGRS