arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.17867cs.CLcs.AI
收藏

评估与增强大语言模型在多轮文本到SQL及多问题类型场景下的能力

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

School of Computer Science, Harbin University of Science and Technology(哈尔滨理工大学计算机科学学院);Faculty of Computing, Harbin Institute of Technology(哈尔滨工业大学计算学部)

Ziming Guo, Chao Ma, Yinggang Sun, Tiancheng Zhao, Guangyao Wang, Hai Huang

AI总结:

本文提出MMSQL测试套件评估LLMs在多轮文本到SQL中的问题分类与SQL生成能力,并设计多智能体框架以提升模型对复杂对话查询的处理效果。

摘要:

近年来,大语言模型(LLMs)的进展显著推动了文本到SQL系统的发展。然而,大多数基于LLM的方法往往只关注SQL生成,忽视了真实世界对话查询的复杂性。这种疏忽可能导致不可靠的响应,尤其是对于那些无法直接用SQL处理的模糊问题。为弥补这一不足,我们提出了MMSQL,一个全面的测试套件,旨在通过模拟具有多样化问题类型和多轮问答交互的真实场景,评估LLMs的问题分类和SQL生成能力。利用MMSQL,我们评估了主流LLMs的性能,包括开源和闭源模型,并识别了在这些场景中影响其性能的关键因素。此外,我们引入了一个基于LLM的多智能体框架,该框架使用专门的智能体来识别问题类型并确定合适的回答策略。我们的实验表明,该方法显著增强了模型应对对话动态复杂性的能力,能够有效处理用户查询的多样性和复杂性。我们的数据集和代码已在 https://mcxiaoxiao.github.io/MMSQL 公开。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑