arXiv:2509.09234cs.CL2025-09中稿 · ACL

用大模型动态生成SQL,精准回答表格问答问题

Agentic LLMs for Question Answering over Tabular Data

  • 通过多阶段流程:选例、生成SQL、验证与迭代优化
  • 在DataBench上达70.5%准确率,远超26%基线
  • 适合需要智能解析表格数据的开发者与研究者

表格问答(Table QA)因真实表格结构多样、规模不一、数据类型复杂而面临独特挑战。SemEval 2025 Task 8(DataBench)引入了一个大规模、跨领域数据集作为基准,用于评估模型处理结构化查询的能力。本文提出一种基于大语言模型(LLMs)的自然语言转SQL(NL-to-SQL)方法,使用GPT-4o、GPT-4o-mini和DeepSeek v2:16b等模型动态生成SQL查询。系统采用多阶段流水线:示例选择、SQL生成、答案提取、验证及迭代优化。实验表明,该方法在DataBench QA上达到70.5%准确率,在DataBench Lite QA上达71.6%,显著优于26%和27%的基线表现。本文详述方法细节、实验结果及替代方案,揭示了大模型驱动表格问答的优势与局限。

原文摘要 · Abstract (English)

Question Answering over Tabular Data (Table QA) presents unique challenges due to the diverse structure, size, and data types of real-world tables. The SemEval 2025 Task 8 (DataBench) introduced a benchmark composed of large-scale, domain-diverse datasets to evaluate the ability of models to accurately answer structured queries. We propose a Natural Language to SQL (NL-to-SQL) approach leveraging large language models (LLMs) such as GPT-4o, GPT-4o-mini, and DeepSeek v2:16b to generate SQL queries dynamically. Our system follows a multi-stage pipeline involving example selection, SQL query generation, answer extraction, verification, and iterative refinement. Experiments demonstrate the effectiveness of our approach, achieving 70.5\% accuracy on DataBench QA and 71.6\% on DataBench Lite QA, significantly surpassing baseline scores of 26\% and 27\% respectively. This paper details our methodology, experimental results, and alternative approaches, providing insights into the strengths and limitations of LLM-driven Table QA.

表格问答大模型NL-to-SQL数据解析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。