文本到SQL系统中推理与非推理大语言模型的代价权衡
Cost Trade-offs of Reasoning and Non-Reasoning Large Language Models in Text-to-SQL
AI总结:
本文研究了推理与非推理大语言模型在文本到SQL任务中的成本权衡,发现推理模型在处理效率和成本控制上表现更优,但非推理模型存在显著的成本波动问题。
摘要:
尽管文本到SQL系统在准确性方面表现优异,但现有效率指标如有效效率分数优先考虑执行时间,我们证明这一指标本质上与基于消费的云账单是脱节的。本文通过在Google BigQuery上使用230 GB StackOverflow数据集,在六个LLM上执行180次文本到SQL查询,评估了推理与非推理大型语言模型在云查询执行成本上的权衡。我们的分析发现,推理模型处理的字节数比非推理模型少44.5%,在保持96.7%至100%的正确性的同时,执行时间与查询成本的相关性较弱,仅为r=0.16,表明速度优化并不意味着成本效率。非推理模型还表现出极端的成本波动,最高可达3.4倍,产生每个查询超过36 GB的异常值,超过最佳模型1.8 GB平均值的20倍,原因是缺少分区过滤和低效的连接操作。我们识别了这些普遍的低效模式,并提供了部署指南,以减轻在成本敏感的企业环境中面临的财务风险。
英文摘要:
While Text-to-SQL systems achieve high accuracy, existing efficiency metrics like the Valid Efficiency Score prioritize execution time, a metric we show is fundamentally decoupled from consumption-based cloud billing. This paper evaluates cloud query execution cost trade-offs between reasoning and non-reasoning Large Language Models by performing 180 Text-to-SQL query executions across six LLMs on Google BigQuery using the 230 GB StackOverflow dataset. Our analysis reveals that reasoning models process 44.5% fewer bytes than non-reasoning counterparts while maintaining equivalent correctness at 96.7% to 100%, and that execution time correlates weakly with query cost at $r=0.16$, indicating that speed optimization does not imply cost efficiency. Non-reasoning models also exhibit extreme cost variance of up to 3.4$\times$, producing outliers exceeding 36 GB per query, over 20$\times$ the best model's 1.8 GB average, due to missing partition filters and inefficient joins. We identify these prevalent inefficiency patterns and provide deployment guidelines to mitigate financial risks in cost-sensitive enterprise environments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。