Research Papers 论文研究 4h ago Updated 33m ago 更新于 33分钟前 45

ESQ-Bench: A Multi-Tier Enterprise Oracle Benchmark for Evaluating NL2SQL Dialect Generalization and Silent Semantic Divergence ESQ-Bench:用于评估NL2SQL方言泛化和隐性语义分歧的多层企业Oracle基准

ESQ-Bench is introduced as an Oracle-first NL2SQL benchmark addressing the gap between academic benchmarks (Spider, BIRD) and real-world enterprise database complexity The benchmark features six populated schemas across four SQL dialects (Oracle, PostgreSQL, MySQL, SQL Server) with 465 tables, 164,682 rows, and zero empty tables, organized into three complexity tiers A four-metric evaluation harness (Exact Match, Execution Accuracy, Semantic Recall, Silent Divergence) reveals that operational si 提出ESQ-Bench,首个面向企业级Oracle数据库的NL2SQL多层级基准测试,填补了现有学术基准(Spider/BIRD)无法反映企业复杂性的空白 构建6个填充模式(465表、164,682行),在Oracle/PostgreSQL/MySQL/SQL Server四平台共享相同种子数据,确保跨方言一致性 引入四指标评估体系(EM/EX/SR/SD),发现执行通过查询中静默语义差异率高达73-99%,暴露"执行正确但结果错误"的隐蔽风险 Claude Sonnet 4.6在Tier-1/2/3分别达87.4%/74.9%/68.7% EX,全面超越GPT-4o;本地Llama 3.2仅

58
Hot 热度
72
Quality 质量
65
Impact 影响力

Analysis 深度分析

TL;DR

  • ESQ-Bench is introduced as an Oracle-first NL2SQL benchmark addressing the gap between academic benchmarks (Spider, BIRD) and real-world enterprise database complexity
  • The benchmark features six populated schemas across four SQL dialects (Oracle, PostgreSQL, MySQL, SQL Server) with 465 tables, 164,682 rows, and zero empty tables, organized into three complexity tiers
  • A four-metric evaluation harness (Exact Match, Execution Accuracy, Semantic Recall, Silent Divergence) reveals that operational silent-divergence reaches 73-99% among execution-passing queries, exposing a critical evaluation blind spot
  • Claude Sonnet 4.6 outperforms GPT-4o across all tiers with schema-linked prompting (87.4%, 74.9%, 68.7% EX), while local Llama 3.2 achieves only 13.3% bank-wide EX
  • GPT-4o zero-shot performance inverts schema-linked results at Tiers 2-3 due to survivor bias and lower execution rates, highlighting methodological pitfalls in benchmark evaluation

Why It Matters

This benchmark exposes a fundamental flaw in NL2SQL evaluation: high execution accuracy on academic datasets masks catastrophic silent semantic divergence in enterprise settings, where queries may execute successfully but return wrong results. For AI practitioners building production NL2SQL systems, this work provides the first systematic framework to detect and quantify silent semantic failures that traditional metrics completely miss.

Technical Details

  • Schema Construction: Six enterprise-grade schemas deployed identically across Oracle, PostgreSQL, MySQL, and SQL Server with 465 tables, 164,682 rows, and zero empty tables, ensuring cross-dialect comparability
  • Three-Tier Complexity Structure: Tier-1 (95 questions), Tier-2 (228 questions), Tier-3 (227 questions) with systematically increasing schema complexity and query difficulty
  • Four-Metric Evaluation Harness: Exact Match (EM), Execution Accuracy (EX), Semantic Recall (SR), and Silent Divergence (SD) — with SD specifically designed to detect cases where queries execute without error but produce incorrect results
  • Model Evaluation Results: GPT-4o schema-linked EX degrades monotonically across tiers (79.8%, 60.3%, 57.2%); Claude Sonnet 4.6 achieves 87.4%, 74.9%, 68.7%; Llama 3.2 reaches only 13.3% bank-wide (73/550)
  • Critical Finding: EM remains below 7% tier-wide, and wrong-result semantics dominate failure modes at higher tiers, with silent-divergence rates of 73-99% among EX-passing queries

Industry Insight

  • Organizations deploying NL2SQL in enterprise environments must adopt silent-divergence-aware evaluation; relying solely on execution accuracy will produce systems that appear functional but deliver incorrect business results
  • The dramatic performance gap between Claude Sonnet 4.6 and GPT-4o on enterprise Oracle schemas suggests dialect-specific fine-tuning and schema-aware prompting strategies are critical for production deployments
  • The survivor bias phenomenon observed in GPT-4o zero-shot vs. schema-linked comparisons serves as a cautionary tale: benchmark methodology must account for execution rate differences to avoid misleading performance rankings

TL;DR

  • 提出ESQ-Bench,首个面向企业级Oracle数据库的NL2SQL多层级基准测试,填补了现有学术基准(Spider/BIRD)无法反映企业复杂性的空白
  • 构建6个填充模式(465表、164,682行),在Oracle/PostgreSQL/MySQL/SQL Server四平台共享相同种子数据,确保跨方言一致性
  • 引入四指标评估体系(EM/EX/SR/SD),发现执行通过查询中静默语义差异率高达73-99%,暴露"执行正确但结果错误"的隐蔽风险
  • Claude Sonnet 4.6在Tier-1/2/3分别达87.4%/74.9%/68.7% EX,全面超越GPT-4o;本地Llama 3.2仅13.3% EX,凸显闭源与开源模型的企业级能力鸿沟

为什么值得看

本文揭示了当前NL2SQL研究在企业落地场景中的严重评估缺陷,为工业界提供了首个系统性衡量方言泛化与静默语义偏差的基准。对AI从业者而言,ESQ-Bench的静默差异指标(SD)将推动评估范式从"语法正确"向"语义正确"转变,避免部署时因结果错误导致的业务风险。

技术解析

  • 多平台同构模式构建:在Oracle、PostgreSQL、MySQL、SQL Server四数据库上部署完全相同的种子数据与465表结构,消除方言差异对评估的干扰,确保跨平台可比性
  • 三层复杂度设计:Tier-1(95题)至Tier-3(227题)按表关联深度、聚合复杂度、子查询嵌套递进,形成单调递减的执行匹配曲线(GPT-4o: 79.8%→60.3%→57.2%)
  • 静默差异(SD)指标:定义"执行成功但结果错误"的隐蔽失败模式,发现EX通过查询中SD率高达73-99%,证明传统EX指标严重高估模型实际可用性
  • 评估框架:四维度评估(EM精确匹配、EX执行匹配、SR语法正确率、SD静默差异率),550黄金验证问答对覆盖真实企业查询场景

行业启示

  • 评估标准升级:企业部署NL2SQL系统必须引入SD指标,仅依赖EX/EM将导致大量"看似正确实则错误"的查询流入生产环境
  • 模型选型策略:闭源API模型(Claude Sonnet 4.6/GPT-4o)在企业级Oracle方言上显著优于开源模型(Llama 3.2),短期应优先采用API方案,同时关注开源模型的方言适配进展
  • 基准测试设计趋势:未来NL2SQL研究需从"学术简化场景"转向"企业真实复杂度",跨方言一致性、静默语义验证将成为新评估核心维度

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Benchmark 基准测试 Evaluation 评测 Dataset 数据集 Research 科学研究 LLM 大模型