CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editions

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Zhang, Hanchong, Cao, Ruisheng, Xu, Hongshen, Chen, Lu, Yu, Kai
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866929335535927296
author Zhang, Hanchong
Cao, Ruisheng
Xu, Hongshen
Chen, Lu
Yu, Kai
author_facet Zhang, Hanchong
Cao, Ruisheng
Xu, Hongshen
Chen, Lu
Yu, Kai
contents Recently, Large Language Models (LLMs) have been demonstrated to possess impressive capabilities in a variety of domains and tasks. We investigate the issue of prompt design in the multi-turn text-to-SQL task and attempt to enhance the LLMs' reasoning capacity when generating SQL queries. In the conversational context, the current SQL query can be modified from the preceding SQL query with only a few operations due to the context dependency. We introduce our method called CoE-SQL which can prompt LLMs to generate the SQL query based on the previously generated SQL query with an edition chain. We also conduct extensive ablation studies to determine the optimal configuration of our approach. Our approach outperforms different in-context learning baselines stably and achieves state-of-the-art performances on two benchmarks SParC and CoSQL using LLMs, which is also competitive to the SOTA fine-tuned models.
format Preprint
id arxiv_https___arxiv_org_abs_2405_02712
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editions
Zhang, Hanchong
Cao, Ruisheng
Xu, Hongshen
Chen, Lu
Yu, Kai
Computation and Language
Recently, Large Language Models (LLMs) have been demonstrated to possess impressive capabilities in a variety of domains and tasks. We investigate the issue of prompt design in the multi-turn text-to-SQL task and attempt to enhance the LLMs' reasoning capacity when generating SQL queries. In the conversational context, the current SQL query can be modified from the preceding SQL query with only a few operations due to the context dependency. We introduce our method called CoE-SQL which can prompt LLMs to generate the SQL query based on the previously generated SQL query with an edition chain. We also conduct extensive ablation studies to determine the optimal configuration of our approach. Our approach outperforms different in-context learning baselines stably and achieves state-of-the-art performances on two benchmarks SParC and CoSQL using LLMs, which is also competitive to the SOTA fine-tuned models.
title CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editions
topic Computation and Language
url https://arxiv.org/abs/2405.02712