跳到主要导航 跳到搜索 跳到主要内容

ToolSQL: A Tool-Assisted Agent for SQL Verification and Refinement

  • Zhongyuan Wang
  • , Richong Zhang*
  • , Zhijie Nie
  • , Jaein Kim
  • *此作品的通讯作者
  • Beihang University

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Recent Text-to-SQL methods leverage large language models (LLMs) by incorporating feedback from the database management system. While these methods effectively address execution errors in SQL queries, they struggle with database mismatches - errors that do not trigger execution exceptions. Database mismatches include issues such as condition mismatches and stricter constraint mismatches, both of which are more prevalent in real-world scenarios. To address these challenges, we propose a tool-assisted agent framework for SQL verification and refinement, equipping the LLM-based agent with two specialized tools: a retriever and a detector, designed to diagnose and correct SQL queries with database mismatches. These tools enhance the capability of LLMs to handle real-world questions more effectively. We also introduce SpiderMismatch, a new dataset specifically constructed to reflect the condition mismatch problems encountered in real-world scenarios. Empirical studies demonstrate the effectiveness of our proposed model on Spider and Spider-Realistic datasets in few-shot settings and confirm that our model outperforms baseline methods on SpiderMismatch.

源语言英语
主期刊名KDD 2025 - Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining
出版商Association for Computing Machinery
3102-3110
页数9
ISBN(电子版)9798400714542
DOI
出版状态已出版 - 3 8月 2025
活动31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD 2025 - Toronto, 加拿大
期限: 3 8月 20257 8月 2025

出版系列

姓名Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining
2
ISSN(印刷版)2154-817X

会议

会议31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD 2025
国家/地区加拿大
Toronto
时期3/08/257/08/25

指纹

探究 'ToolSQL: A Tool-Assisted Agent for SQL Verification and Refinement' 的科研主题。它们共同构成独一无二的指纹。

引用此