V-SQL: A View-based Two-stage Text-to-SQL Framework

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: You, Zeshun, Yao, Jiebin, Cheng, Dong, Wen, Zhiwei, Lu, Zhiliang, Shen, Xianyi
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929728513900544
author You, Zeshun
Yao, Jiebin
Cheng, Dong
Wen, Zhiwei
Lu, Zhiliang
Shen, Xianyi
author_facet You, Zeshun
Yao, Jiebin
Cheng, Dong
Wen, Zhiwei
Lu, Zhiliang
Shen, Xianyi
contents The text-to-SQL task aims to convert natural language into Structured Query Language (SQL) without bias. Recently, text-to-SQL methods based on large language models (LLMs) have garnered significant attention. The core of mainstream text-to-SQL frameworks is schema linking, which aligns user queries with relevant tables and columns in the database. Previous methods focused on schema linking while neglecting to enhance LLMs' understanding of database schema. The complex coupling relationships between tables in the database constrain the SQL generation capabilities of LLMs. To tackle this issue, this paper proposes a simple yet effective strategy called view-based schema. This strategy aids LLMs in understanding the database schema by decoupling tightly coupled tables into low-coupling views. We then introduce V-SQL, a view-based two-stage text-to-SQL framework. V-SQL involves the view-based schema strategy to enhance LLMs' understanding of database schema. Results on the authoritative datasets Bird indicate that V-SQL achieves competitive performance compared to existing state-of-the-art methods.
format Preprint
id arxiv_https___arxiv_org_abs_2502_15686
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle V-SQL: A View-based Two-stage Text-to-SQL Framework
You, Zeshun
Yao, Jiebin
Cheng, Dong
Wen, Zhiwei
Lu, Zhiliang
Shen, Xianyi
Databases
Computation and Language
The text-to-SQL task aims to convert natural language into Structured Query Language (SQL) without bias. Recently, text-to-SQL methods based on large language models (LLMs) have garnered significant attention. The core of mainstream text-to-SQL frameworks is schema linking, which aligns user queries with relevant tables and columns in the database. Previous methods focused on schema linking while neglecting to enhance LLMs' understanding of database schema. The complex coupling relationships between tables in the database constrain the SQL generation capabilities of LLMs. To tackle this issue, this paper proposes a simple yet effective strategy called view-based schema. This strategy aids LLMs in understanding the database schema by decoupling tightly coupled tables into low-coupling views. We then introduce V-SQL, a view-based two-stage text-to-SQL framework. V-SQL involves the view-based schema strategy to enhance LLMs' understanding of database schema. Results on the authoritative datasets Bird indicate that V-SQL achieves competitive performance compared to existing state-of-the-art methods.
title V-SQL: A View-based Two-stage Text-to-SQL Framework
topic Databases
Computation and Language
url https://arxiv.org/abs/2502.15686