arrow
返回

GRAY: Enhancing Few-Shot NL2SQL Translation Through Incremental SQL Log-Based Demonstration Expansion

delete2026-01-01
delete0
PRE
AI
C
Chen, Zhuo
W
Wu, Kun
L
Li, Zhen
H
Hou, Yaxi
Y
Yu, Wenhu
L
Liu, Zhongju
L
Li, Hangxuan
L
Liang, Zihang
Q
Qin, Haoyu
R
Ren, Tonghui
H
He, Zhenying *
DOI:10.1007/978-981-95-5716-5_5delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
The Natural Language to SQL (NL2SQL) task enables non-technical users to access databases. Recently, advancements in Large Language Models (LLMs) have driven progress in NL2SQL. However, existing methods still face challenges when dealing with domain-specific data due to limited domain knowledge and database adaptability. Numerous methods leverage schema information and query data to enhance performance, yet they remain inadequate for effective domain adaptation. To address the challenge of limited domain-specific knowledge, this paper proposes GRAY, a method that employs SQL logs to provide domain-specific knowledge. SQL logs capture domain-specific knowledge by reflecting the unique structure and semantics of each database, but their limited quantity restricts this knowledge, making incremental expansion necessary. GRAY proposes a two-phase incremental expansion method, utilizing LLM-driven query generation to enrich the domain-specific knowledge in SQL logs, enabling the LLM to understand the semantics of the specific database. To provide more relevant domain knowledge in the limited context window of LLMs, GRAY designs a high-quality demonstration selection algorithm. Through experiments on multiple real-world databases, GRAY improves the performance of the NL2SQL tasks. The experimental results show that GRAY performs effectively on complex databases and has broad application potential.
Keyword:
Natural Language Interface to DataBases
Natural Language to SQL
Large Language Model

期刊

W
WEB AND BIG DATA, APWEB-WAIM 2025, PT II
IF:
0
论文数:
35
被引数:
0

机构

F
fudan university
学者数:
11.8W
论文数: 7.7W
被引数: 121
引用论文

引用论文

Logos
err2012-05-20
err0
PREAI
errAndreas Kokkalis; Panagiotis Vagenas; Alexandros Zervakis; Alkis Simitsis; Georgia Koutrika; Yannis Ioannidis
err分享
err收藏
err分享
err收藏
Natural language interfaces to databases – an introduction
err2008-09-12
err0
errOAAI
errI. Androutsopoulos; G.D. Ritchie; P. Thanisch
err分享
err收藏
err分享
err收藏
CodeS: Towards Building Open-source Language Models for Text-to-SQLCodeS: 构建用于文本到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
err分享
err收藏
学者 查看更多内容