arXiv:2506.09359cs.CL2025-06被引 1

用大模型评估自然语言转SQL的语义等价性,提升生成质量。

Taming SQL Complexity: LLM-Based Equivalence Evaluation for Text-to-SQL

  • 利用大模型判断生成的SQL是否与目标语义一致。
  • 区分强语义等价与更实用的弱语义等价,适应多解场景。
  • 针对常见等价模式设计评估机制,适合NL2SQL系统开发者。

大型语言模型(LLMs)的兴起显著推动了自然语言转SQL(NL2SQL)系统的发展,但评估生成的SQL语义等价性仍面临挑战,尤其在用户查询模糊或存在多种有效SQL解释的情况下。本文探索使用大模型来评估生成的SQL在语义层面以及更实际的“弱”语义等价性。通过分析常见的SQL等价与不等价模式,讨论基于大模型评估所面临的挑战,并提出适用于实际应用的评估框架。

原文摘要 · Abstract (English)

The rise of Large Language Models (LLMs) has significantly advanced Text-to-SQL (NL2SQL) systems, yet evaluating the semantic equivalence of generated SQL remains a challenge, especially given ambiguous user queries and multiple valid SQL interpretations. This paper explores using LLMs to assess both semantic and a more practical "weak" semantic equivalence. We analyze common patterns of SQL equivalence and inequivalence, discuss challenges in LLM-based evaluation.

自然语言转SQL大模型评估语义等价

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