通过置信度估计提升文本转SQL系统的错误检测能力
Confidence Estimation for Error Detection in Text-to-SQL Systems
- 用熵值法构建选择性分类器,平衡覆盖范围与出错风险
- T5模型置信度更准,搭配外部分类器效果优于GPT-4和Llama 3
- 高置信度更擅长识别无关问题,而非语法错误的查询生成
文本转SQL使用户可通过自然语言与数据库交互,简化信息检索与整合。尽管大语言模型(LLMs)在将自然语言问题转化为SQL查询方面取得成功,但其广泛应用仍受两大挑战制约:跨多样查询的鲁棒泛化能力不足,以及预测结果缺乏可解释的置信度。为应对这些问题,本研究探讨在文本转SQL系统中引入选择性分类器。我们分析了基于熵的置信度估计与选择性分类器在覆盖率与风险之间的权衡,并评估其对整体性能的影响。此外,我们研究了模型初始校准情况,并通过校准技术提升模型置信度与准确率的一致性。实验表明,编码器-解码器结构的T5比上下文学习的GPT-4及仅解码器的Llama 3更具校准性,因此外部熵基选择性分类器表现更优。研究还发现,在错误检测中,高置信度更倾向于识别与问题无关的输入,而非查询生成错误。
原文摘要 · Abstract (English)
Text-to-SQL enables users to interact with databases through natural language, simplifying the retrieval and synthesis of information. Despite the success of large language models (LLMs) in converting natural language questions into SQL queries, their broader adoption is limited by two main challenges: achieving robust generalization across diverse queries and ensuring interpretative confidence in their predictions. To tackle these issues, our research investigates the integration of selective classifiers into Text-to-SQL systems. We analyse the trade-off between coverage and risk using entropy based confidence estimation with selective classifiers and assess its impact on the overall performance of Text-to-SQL models. Additionally, we explore the models' initial calibration and improve it with calibration techniques for better model alignment between confidence and accuracy. Our experimental results show that encoder-decoder T5 is better calibrated than in-context-learning GPT 4 and decoder-only Llama 3, thus the designated external entropy-based selective classifier has better performance. The study also reveal that, in terms of error detection, selective classifier with a higher probability detects errors associated with irrelevant questions rather than incorrect query generations.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。