首页 / AGI 进程 · 本周 AI 论文 / arXiv:2611.29009
← 返回论文列表
ARXIV PAPER · 论文详情

Mind the Trap As LLMs Guess the Data Model: Grain-Aware Guards Against Fan-out in Text-to-SQL and Its Benchmarks

语言模型 arXiv:2611.29009 cs.DB 2026-11-21
arXiv ID2611.29009
提交日期2026-11-21
原始分类cs.DB
作者数量1

作者

Ahmed M. Mahran

摘要(英文原文)

Text-to-SQL systems built on large language models (LLMs) often aggregate over one-to-many and many-to-many joins, a classic trap: when the joined rows repeat an entity, a SUM or COUNT counts it more than once, yet the query runs and returns a plausible number. We characterize these fan-out errors by one condition on the relation an aggregate reads, which depends on two facts a schema does not show: each measure's grain, and how many rows a join on each key repeats. An audit that tests the condition on the data finds distorted gold answers for 4.2% of the dev questions of BIRD, a widely used benchmark, and BIRD's later, independent revision changed 44% of the answers the audit flags as definite fan-out, against 16% of unflagged ones. We release BIRD-FanOut, 486 BIRD questions with reviewed gold, and GrainTraps, synthetic questions that set this trap and related ones. Across eight LLM agents, functional dependencies (FDs) computed from the data help no more than per-column statistics on GrainTraps, but grain-aware FDs, which also state each measure's grain and the repetition per key, cut fan-out errors on BIRD from 18.4% of runs to about 13%, also on held-out questions and without LLM judges. Accuracy rises less, because most remaining errors are not fan-out and BIRD's hints often prescribe the over-count. Text-to-SQL models should be given the grain of the data, and benchmark gold should be audited on the data. Code, data and benchmarks are available at https://github.com/ahmed-mahran/misqal
查看原文(arXiv) ↗ PDF ↗ 本站仅展示 arXiv 公开元数据,不托管论文原文;点击上方入口离开本站前往 arXiv。

相关论文

数据来源:arXiv 官方 API · 本站每日自动同步 · 页面生成于 2026-11-24