arXiv:2411.16742cs.DBcs.AI2024-11被引 7

直接用模型生成概率校准文本转SQL的置信度,比复杂自检方法更有效。

Text-to-SQL Calibration: No Need to Ask -- Just Rescale Model Probabilities

  • 用完整序列生成概率直接计算置信度,无需额外提示
  • 在两个主流数据集上优于依赖自我检查的最新方法
  • 适合追求高效可靠的工业级文本转SQL系统开发者

校准在大型语言模型(LLMs)越来越多地用于将自然语言查询转换为商业数据库SQL时至关重要。本文研究了为生成的SQL查询分配置信度的校准技术。我们发现,一种简单的基线方法——从模型的完整序列概率中推导置信度——优于近期依赖后续提示进行自检和置信度表述的方法。我们在两个广泛使用的Text-to-SQL基准和多种LLM架构上进行了全面评估,为不同校准策略的有效性提供了重要洞见。

原文摘要 · Abstract (English)

Calibration is crucial as large language models (LLMs) are increasingly deployed to convert natural language queries into SQL for commercial databases. In this work, we investigate calibration techniques for assigning confidence to generated SQL queries. We show that a straightforward baseline -- deriving confidence from the model's full-sequence probability -- outperforms recent methods that rely on follow-up prompts for self-checking and confidence verbalization. Our comprehensive evaluation, conducted across two widely-used Text-to-SQL benchmarks and multiple LLM architectures, provides valuable insights into the effectiveness of various calibration strategies.

文本转SQL模型校准大模型

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