An Actor-Critic Approach to Boosting Text-to-SQL Large Language Model

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zheng, Ziyang, Jing, Haipeng, Rui, Canyu, Hamdulla, Askar, Wang, Dong
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909370605895680
author Zheng, Ziyang
Jing, Haipeng
Rui, Canyu
Hamdulla, Askar
Wang, Dong
author_facet Zheng, Ziyang
Jing, Haipeng
Rui, Canyu
Hamdulla, Askar
Wang, Dong
contents Text-To-SQL (T2S) conversion based on large language models (LLMs) has found a wide range of applications, by leveraging the capabilities of LLMs in interpreting the query intent expressed in natural language. Existing research focuses on suitable representations for data schema and/or questions, task-specific instructions and representative examples, and complicated inference pipelines. All these methods are empirical and task specific, without a theoretical bound on performance. In this paper, we propose a simple, general, and performance guaranteed T2S enhancement approach called Actor-Critic (AC). Specifically, we design two roles using the same LLM: an Actor to produce SQL queries and a Critic to evaluate the produced SQL. If the Critic believes the produced SQL is wrong, it notifies the Actor to reproduce the SQL and perform evaluation again. By this simple iterative process, expected performance can be derived in theory. We conducted extensive experiments on the Spider and related datasets with eleven LLMs, and demonstrated that the Actor-Critic method consistently improves the performance of T2S, thus serving as a general enhancement approach for T2S conversion.
format Preprint
id arxiv_https___arxiv_org_abs_2410_22082
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle An Actor-Critic Approach to Boosting Text-to-SQL Large Language Model
Zheng, Ziyang
Jing, Haipeng
Rui, Canyu
Hamdulla, Askar
Wang, Dong
Databases
Computation and Language
Human-Computer Interaction
Text-To-SQL (T2S) conversion based on large language models (LLMs) has found a wide range of applications, by leveraging the capabilities of LLMs in interpreting the query intent expressed in natural language. Existing research focuses on suitable representations for data schema and/or questions, task-specific instructions and representative examples, and complicated inference pipelines. All these methods are empirical and task specific, without a theoretical bound on performance. In this paper, we propose a simple, general, and performance guaranteed T2S enhancement approach called Actor-Critic (AC). Specifically, we design two roles using the same LLM: an Actor to produce SQL queries and a Critic to evaluate the produced SQL. If the Critic believes the produced SQL is wrong, it notifies the Actor to reproduce the SQL and perform evaluation again. By this simple iterative process, expected performance can be derived in theory. We conducted extensive experiments on the Spider and related datasets with eleven LLMs, and demonstrated that the Actor-Critic method consistently improves the performance of T2S, thus serving as a general enhancement approach for T2S conversion.
title An Actor-Critic Approach to Boosting Text-to-SQL Large Language Model
topic Databases
Computation and Language
Human-Computer Interaction
url https://arxiv.org/abs/2410.22082