Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Types

Ziming Guo, Chao Ma, Yinggang Sun, Tiancheng Zhao, Guangyao Wang +1 more
12/21/2024
5 citations
cs.CLcs.AI

Official code: mcxiaoxiao/MMSQL (21 stars, Jupyter Notebook, last commit 2026-01-21).

Abstract

Recent advancements in large language models (LLMs) have significantly advanced text-to-SQL systems. However, most LLM-based methods often narrowly focus on SQL generation, neglecting the complexities of real-world conversational queries.

Show full abstract

This oversight can lead to unreliable responses, particularly for ambiguous questions that cannot be directly addressed with SQL. To bridge this gap, we propose MMSQL, a comprehensive test suite designed to evaluate the question classification and SQL generation capabilities of LLMs by simulating real-world scenarios with diverse question types and multi-turn Q&A interactions. Using MMSQL, we assessed the performance of popular LLMs, including both open-source and closed-source models, and identified key factors impacting their performance in such scenarios. Moreover, we introduce an LLM-based multi-agent framework that employs specialized agents to identify question types and determine appropriate answering strategies. Our experiments demonstrate that this approach significantly enhances the model's ability to navigate the complexities of conversational dynamics, effectively handling the diverse and complex nature of user queries. Our dataset and code are publicly available at https://mcxiaoxiao.github.io/MMSQL.

View on arXivView PDF

Code Implementations(1)

mcxiaoxiao/MMSQLOfficial100%

[IJCNN2025] MMSQL: Multi-turn Multi-type text-to-SQL test suit. Repository contains scripts, code, datasets in the paper "Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Types"

216Jupyter Notebook, PythonJun 7, 202410 months ago
cosqldatasetllmnlptext-to-sql

Similar Papers

Cite this paper

@article{guo2024evaluating,
  title  = {Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Types},
  author = {Ziming Guo and Chao Ma and Yinggang Sun and Tiancheng Zhao and Guangyao Wang and Hai Huang},
  year   = {2024},
  eprint = {2412.17867},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.17867v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.17867.svg)](https://codeofpaper.com/paper/2412.17867)

Discussion