Table understanding requires structured, multi-step reasoning. Large Language Models (LLMs) struggle with it due to the structural complexity of tabular data. Recently, multi-agent frameworks for SQL generation have shown promise in tackling the challenges of understanding tabular data, but existing approaches often suffer from limitations such as the inability to comprehend table structure for reliable SQL generation, error propagation that results in invalid queries, and over-reliance on execution correctness. To address these issues, we propose Chain-of-Query (CoQ), a novel multi-agent framework for SQL-aided table understanding. CoQ adopts natural-language-style representations of table schemas to abstract away structural noise and enhance understanding. It employs a clause-by-clause SQL generation strategy to improve query quality and introduces a hybrid reasoning division that separates SQL-based mechanical reasoning from LLM-based logical inference, thereby reducing reliance on execution outcomes. Extensive experiments across four models and five widely used benchmarks demonstrate that CoQ achieves substantial accuracy improvements and significantly lowers invalid SQL rates compared to prior generic LLM-based, SQL-aided, and hybrid baselines, confirming its superior effectiveness in table understanding. The code is available at https://github.com/SongyuanSui/ChainofQuery.


翻译:表格理解需要结构化、多步骤的推理。由于表格数据的结构复杂性,大型语言模型(LLMs)在此任务上面临困难。近期,用于SQL生成的多智能体框架在应对表格数据理解挑战方面展现出潜力,但现有方法常存在局限,例如无法可靠理解表结构以生成SQL、错误传播导致无效查询,以及过度依赖执行正确性。为解决这些问题,我们提出查询链(Chain-of-Query, CoQ),一种用于SQL辅助表格理解的新型多智能体框架。CoQ采用自然语言风格的表模式表示,以抽象化结构噪声并增强理解。它采用逐子句的SQL生成策略以提高查询质量,并引入混合推理划分,将基于SQL的机械推理与基于LLM的逻辑推断分离,从而减少对执行结果的依赖。在四个模型和五个广泛使用的基准测试上进行的大量实验表明,与先前基于通用LLM、SQL辅助及混合基线方法相比,CoQ实现了显著的准确率提升,并大幅降低了无效SQL生成率,证实了其在表格理解方面的卓越有效性。代码发布于 https://github.com/SongyuanSui/ChainofQuery。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
【KDD2024】面向鲁棒推荐的决策边界感知图对比学习
专知会员服务
21+阅读 · 2024年8月8日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员