arrow
Return

SEA-SQL: semantic-enhanced text-to-SQL with adaptive refinement

delete2025-10-28
delete0
PRE
AI
C
Chaofan Li
Y
Yingxia Shao *
Y
Yawen Li
DOI:10.1007/s11704-025-41136-3delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Recent advancements in large language models (LLMs) have significantly contributed to the progress of the Text-to-SQL task. A common requirement in many of these works is the post-correction of SQL queries. However, the majority of this process entails analyzing error cases to develop prompts with rules that eliminate model bias. And there is a weakness of execution verification for SQL queries. In addition, the prevalent techniques primarily depend on GPT-4 and few-shot prompts, resulting in expensive costs. To investigate the effective methods for SQL refinement in a cost-efficient manner, we introduce Semantic-Enhanced Text-to-SQL with Adaptive Refinement (SEA-SQL), which includes Adaptive Bias Elimination and Dynamic Execution Adjustment, aims to improve performance while minimizing resource expenditure with zero-shot prompts. Specifically, SEA-SQL employs a semantic-enhanced schema to augment database information and optimize SQL queries. During the SQL query generation, a fine-tuned adaptive bias eliminator is applied to mitigate inherent biases caused by the LLM. The dynamic execution adjustment is utilized to guarantee the executability of the bias eliminated SQL query. We conduct experiments on the Spider and BIRD datasets to demonstrate the effectiveness of this framework. The results demonstrate that SEA-SQL achieves state-of-the-art performance in the GPT-3.5 scenario with 9%–58% of the generation cost. Furthermore, SEA-SQL is comparable to GPT-4 with only 0.9%–5.3% of the generation cost. Our code is available at the website of github.com/545999961/SEA-SQL .
Keywords:
Text-to-SQL
adaptive bias elimination
dynamic execution adjustment
economize

Journal

Frontiers of Computer Science cover
Frontiers of Computer Science
IF:
4.6
Papers:
1.6K
Citations:
2.8K

Organization

S
School of Economics and Management
Scholars:
769
Papers: 424
Citations: 2
S
school of computer science
Scholars:
462
Papers: 187
Citations: 0
Cited Papers

Cited Papers

A sampling method based on forecasting and combinatorial optimization for high performance A/B testing
err2023-12-04
err1
PREAI
errLi, Fan; Zhang, Tiancheng; Cui, Shengjia; Liu, Hengyu; Ren, Zhibin; Di, Donglin; Wang, Xiao; Zhang, Po; Yu, Ge
errShare
errSave
Graph-decomposed k-NN searching algorithm on road network
err2024-02-08
err2
PREAI
errJiang, Wei; Ning, Bo; Li, Guanyu; Bai, Mei; Jia, Xiao; Wei, Fangliang
errShare
errSave
Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
err2024-05-02
err0
errOAAI
errDawei Gao; Haibin Wang; Yaliang Li; Xiuyu Sun; Yichen Qian; Bolin Ding; Jingren Zhou
errShare
errSave
DB-GPT: Large Language Model Meets Database
err2024-01-19
err11
errOAAI
errZhou, Xuanhe; Sun, Zhaoyan; Li, Guoliang
errShare
errSave
CodeS: Towards Building Open-source Language Models for Text-to-SQL
err2024-05-30
err0
errOAAI
errHaoyang Li; Jing Zhang; Hanbing Liu; Ju Fan; Xiaokang Zhang; Jun Zhu; Renjie Wei; Hongyan Pan; Cuiping Li; Hong Chen
errShare
errSave
Optimizing B+-tree for hybrid memory with in-node hotspot cache and eADR awareness
err2023-12-23
err2
PREAI
errJin, Peiquan; Chu, Zhaole; Liu, Gaocong; Luo, Yongping; Wan, Shouhong
errShare
errSave
A novel dense retrieval framework for long document retrieval
err2022-11-07
err6
PREAI
errWang, Jiajia; Zhao, Weizhong; Tu, Xinhui; He, Tingting
errShare
errSave
no more