Large language models (LLMs) advance natural language (NL) interaction with databases by converting queries into SQL. However, users often lack familiarity with database schemas, making it difficult to express precise query requirements. To address this, we propose SQL-QMARS, a multi-agent Text-to-SQL framework designed to interactively clarify user intent. The system evaluates query vagueness using a three-layer metadata structure (theme, table, and field). Based on this evaluation, it dynamically triggers two flows: recommending multi-granular suggestions for vague queries and resolving ambiguities for clear ones. Furthermore, the system supports fusing external data to expand the knowledge source for query suggestions. The demonstration indicates that SQL-QMARS effectively guides users from vague to precise queries, improving the practicality of NL-based database interaction.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

SQL-QMARS: A Query-Guided Multi-agent Recommendation System for SQL

  • Jiawen Xu,
  • Wei Zhou,
  • Yungui Zheng,
  • Huiqi Hu,
  • Peng Cai,
  • Xuan Zhou,
  • Yaoqiang Xu,
  • Chen Qian

摘要

Large language models (LLMs) advance natural language (NL) interaction with databases by converting queries into SQL. However, users often lack familiarity with database schemas, making it difficult to express precise query requirements. To address this, we propose SQL-QMARS, a multi-agent Text-to-SQL framework designed to interactively clarify user intent. The system evaluates query vagueness using a three-layer metadata structure (theme, table, and field). Based on this evaluation, it dynamically triggers two flows: recommending multi-granular suggestions for vague queries and resolving ambiguities for clear ones. Furthermore, the system supports fusing external data to expand the knowledge source for query suggestions. The demonstration indicates that SQL-QMARS effectively guides users from vague to precise queries, improving the practicality of NL-based database interaction.