Rethinking Text-to-SQL: Dynamic Multi-turn SQL Interaction for Real-world Database Exploration

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Sun, Linzhuang, Guo, Tianyu, Liang, Hao, Li, Yuying, Cai, Qifeng, Wei, Jingxuan, Yu, Bihui, Zhang, Wentao, Cui, Bin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918200063557632
author Sun, Linzhuang
Guo, Tianyu
Liang, Hao
Li, Yuying
Cai, Qifeng
Wei, Jingxuan
Yu, Bihui
Zhang, Wentao
Cui, Bin
author_facet Sun, Linzhuang
Guo, Tianyu
Liang, Hao
Li, Yuying
Cai, Qifeng
Wei, Jingxuan
Yu, Bihui
Zhang, Wentao
Cui, Bin
contents Recent advances in Text-to-SQL have achieved strong results in static, single-turn tasks, where models generate SQL queries from natural language questions. However, these systems fall short in real-world interactive scenarios, where user intents evolve and queries must be refined over multiple turns. In applications such as finance and business analytics, users iteratively adjust query constraints or dimensions based on intermediate results. To evaluate such dynamic capabilities, we introduce DySQL-Bench, a benchmark assessing model performance under evolving user interactions. Unlike previous manually curated datasets, DySQL-Bench is built through an automated two-stage pipeline of task synthesis and verification. Structured tree representations derived from raw database tables guide LLM-based task generation, followed by interaction-oriented filtering and expert validation. Human evaluation confirms 100% correctness of the synthesized data. We further propose a multi-turn evaluation framework simulating realistic interactions among an LLM-simulated user, the model under test, and an executable database. The model must adapt its reasoning and SQL generation as user intents change. DySQL-Bench covers 13 domains across BIRD and Spider 2 databases, totaling 1,072 tasks. Even GPT-4o attains only 58.34% overall accuracy and 23.81% on the Pass@5 metric, underscoring the benchmark's difficulty. All code and data are released at https://github.com/Aurora-slz/Real-World-SQL-Bench .
format Preprint
id arxiv_https___arxiv_org_abs_2510_26495
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Rethinking Text-to-SQL: Dynamic Multi-turn SQL Interaction for Real-world Database Exploration
Sun, Linzhuang
Guo, Tianyu
Liang, Hao
Li, Yuying
Cai, Qifeng
Wei, Jingxuan
Yu, Bihui
Zhang, Wentao
Cui, Bin
Databases
Computation and Language
Recent advances in Text-to-SQL have achieved strong results in static, single-turn tasks, where models generate SQL queries from natural language questions. However, these systems fall short in real-world interactive scenarios, where user intents evolve and queries must be refined over multiple turns. In applications such as finance and business analytics, users iteratively adjust query constraints or dimensions based on intermediate results. To evaluate such dynamic capabilities, we introduce DySQL-Bench, a benchmark assessing model performance under evolving user interactions. Unlike previous manually curated datasets, DySQL-Bench is built through an automated two-stage pipeline of task synthesis and verification. Structured tree representations derived from raw database tables guide LLM-based task generation, followed by interaction-oriented filtering and expert validation. Human evaluation confirms 100% correctness of the synthesized data. We further propose a multi-turn evaluation framework simulating realistic interactions among an LLM-simulated user, the model under test, and an executable database. The model must adapt its reasoning and SQL generation as user intents change. DySQL-Bench covers 13 domains across BIRD and Spider 2 databases, totaling 1,072 tasks. Even GPT-4o attains only 58.34% overall accuracy and 23.81% on the Pass@5 metric, underscoring the benchmark's difficulty. All code and data are released at https://github.com/Aurora-slz/Real-World-SQL-Bench .
title Rethinking Text-to-SQL: Dynamic Multi-turn SQL Interaction for Real-world Database Exploration
topic Databases
Computation and Language
url https://arxiv.org/abs/2510.26495