While Large Language Models (LLMs) demonstrate impressive proficiency in generating SQL queries, they fundamentally lack the capability to self-evaluate correctness without an execution oracle. This limitation creates a stark Generation-Selection Gap, where high potential accuracy (Pass@K) fails to translate into execution accuracy (Pass@1). Although supervised verifiers offer mitigation, they incur prohibitive annotation costs and suffer from domain fragility. Consequently, recent research has pivoted to the training-free setting. However, existing methods--such as Self-Consistency or LLM-as-a-Judge--remain hampered by systematic bias (consensus on hallucinations) and symbolic blindness (inability to simulate execution states). We introduce DPC (Dual-Paradigm Consistency), a multi-agent framework that reformulates SQL selection from a probabilistic guessing task on hidden data into a deterministic verification task on visible data. Specifically, DPC employs a SLICER and a TESTER agent to collaboratively construct a Minimal Distinguishing Database (MDD)--an adversarial, fully observable micro-environment engineered to expose logical discrepancies between candidates. To break the self-correction bias, a SOLVER agent then verifies the SQL candidates by cross-referencing their execution against a parallel Python/Pandas solution. By validating execution consistency between declarative (SQL) and imperative (Python) paradigms, DPC robustly discriminates correct logic from systematic hallucinations. Experiments on BIRD and Spider across multiple LLMs demonstrate that our method consistently outperforms existing selection baselines, achieving absolute accuracy improvements of up to 2.2% over strong competitors like Self-Consistency.


翻译:尽管大型语言模型在生成SQL查询方面展现出卓越的能力,但它们本质上缺乏在没有执行环境的情况下自我评估正确性的能力。这一局限导致了显著的"生成-选择差距"——高潜在准确率(Pass@K)无法转化为实际执行准确率(Pass@1)。虽然监督验证器提供了缓解方案,但需要高昂的标注成本且存在领域脆弱性。因此,近期研究转向了免训练设置。然而,现有方法(如自一致性或语言模型即评判者)仍受困于系统性偏差(对幻觉的一致认同)和符号盲目性(无法模拟执行状态)。我们提出DPC(双范式一致性)——一种多智能体框架,将SQL选择从基于隐藏数据的概率性猜测任务重构为基于可见数据的确定性验证任务。具体而言,DPC采用切片器(SLICER)和测试器(TESTER)智能体协同构建最小判别数据库——一个对抗性的、完全可观测的微型环境,旨在暴露候选SQL之间的逻辑差异。为打破自我纠正偏差,求解器(SOLVER)智能体通过将SQL候选的执行结果与并行实现的Python/Pandas解决方案进行交叉验证,验证其执行一致性。通过验证声明式(SQL)与命令式(Python)范式间的执行一致性,DPC能稳健地区分正确逻辑与系统性幻觉。在BIRD和Spider数据集上基于多种大型语言模型的实验表明,我们的方法持续优于现有选择基线,相较于自一致性等强竞争方法实现了最高2.2%的绝对准确率提升。

0
下载
关闭预览

相关内容

【CVPR2025】DPC:双提示协作用于视觉-语言模型调优
专知会员服务
11+阅读 · 2025年3月18日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
最新论文解读 | 基于预训练自然语言生成的文本摘要方法
微软研究院AI头条
57+阅读 · 2019年3月19日
论文浅尝 | 基于深度强化学习的远程监督数据集的降噪
开放知识图谱
29+阅读 · 2019年1月17日
文本分类问题不需要ResNet?小夕解析DPCNN设计原理(上)
夕小瑶的卖萌屋
36+阅读 · 2018年4月3日
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
4+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关VIP内容
【CVPR2025】DPC:双提示协作用于视觉-语言模型调优
专知会员服务
11+阅读 · 2025年3月18日
大型语言模型对齐技术综述:RLHF、RLAIF、PPO、DPO 等
专知会员服务
55+阅读 · 2024年7月24日
相关基金
国家自然科学基金
23+阅读 · 2016年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员