用多专家协作提升复杂SQL生成准确率与可解释性。
AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
- 分步拆解问题、生成子查询,再优化列选择
- 在Spider数据集上达86.07%执行准确率,接近GPT-4性能
- 适合关注可解释性与效率平衡的工业级应用
大语言模型虽推动了文本到SQL生成的发展,但单一架构难以应对复杂推理与模式多样性。本文提出AGENTIQL,一种受智能体启发的多专家框架,包含用于问题分解的推理智能体、生成子查询的编码智能体,以及列选择优化步骤。自适应路由机制可在模块化流水线与基线解析器间动态切换,兼顾效率与精度。流水线中多个步骤可并行执行,具备良好扩展性。在Spider基准测试中,使用14B模型结合规划器与执行器融合策略,最高实现86.07%的执行准确率(EX),性能逼近基于GPT-4的顶尖水平(89.65% EX),且仅依赖开源小规模模型。除精度外,该框架通过暴露中间推理步骤显著提升透明度,为语义解析提供了一种高效、可扩展且可解释的解决方案。
原文摘要 · Abstract (English)
LLMs have advanced text-to-SQL generation, yet monolithic architectures struggle with complex reasoning and schema diversity. We propose AGENTIQL, an agent-inspired multi-expert framework that combines a reasoning agent for question decomposition, a coding agent for sub-query generation, and a refinement step for column selection. An adaptive router further balances efficiency and accuracy by selecting between our modular pipeline and a baseline parser. Several steps in the pipeline can be executed in parallel, making the framework scalable to larger workloads. Evaluated on the Spider benchmark, AGENTIQL improves execution accuracy and interpretability and achieves up to 86.07% EX with 14B models using the Planner&Executor merging strategy. The attained performance is contingent upon the efficacy of the routing mechanism, thereby narrowing the gap to GPT-4-based SOTA (89.65% EX) while using much smaller open-source LLMs. Beyond accuracy, AGENTIQL enhances transparency by exposing intermediate reasoning steps, offering a robust, scalable, and interpretable approach to semantic parsing.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。