AI News AI资讯 23h ago Updated 18h ago 更新于 18小时前 49

Feyn AI Releases SQRL, a Text-to-SQL Model Family That Inspects the Database Before Writing a Query Feyn AI发布SQRL,一种在编写查询前检查数据库的文本到SQL模型系列

Feyn AI introduces SQRL, a text-to-SQL model family that prioritizes database inspection over direct translation to resolve ambiguity and ensure query correctness. The flagship SQRL-35B-A3B achieves 70.6% execution accuracy on the BIRD Dev benchmark, outperforming Claude Opus 4.6 and other leading frontier models. SQRL utilizes a dynamic inspection mechanism, allowing the model to run read-only exploratory queries via `<sql>` blocks before committing to a final answer via `<answer>` blocks. Trai Feyn AI发布SQRL模型家族,创新性地采用“先检查后回答”机制,通过读取数据库数据解决文本到SQL转换中的歧义问题。 旗舰模型SQRL-35B-A3B在BIRD Dev基准测试中达到70.6%的执行准确率,超越Claude Opus 4.6等前沿模型。 训练过程结合CISPO强化学习算法与执行奖励,通过筛选高质量轨迹数据,使模型学会何时需要查询数据库以验证假设。 提供4B、9B和35B-A3B三种规格模型,小参数版本即可匹敌顶级大模型性能,且支持本地部署以保障数据隐私。

72
Hot 热度
68
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • Feyn AI introduces SQRL, a text-to-SQL model family that prioritizes database inspection over direct translation to resolve ambiguity and ensure query correctness.
  • The flagship SQRL-35B-A3B achieves 70.6% execution accuracy on the BIRD Dev benchmark, outperforming Claude Opus 4.6 and other leading frontier models.
  • SQRL utilizes a dynamic inspection mechanism, allowing the model to run read-only exploratory queries via <sql> blocks before committing to a final answer via <answer> blocks.
  • Training leverages the CISPO reinforcement learning method and a curated dataset filtered by model judges to remove erroneous reference queries, ensuring robust reward signals.
  • Smaller variants (SQRL-4B and SQRL-9B) maintain high performance, with the 4B model matching Claude Opus 4.6's accuracy while being deployable on local infrastructure.

Why It Matters

This development shifts the paradigm of text-to-SQL from static schema translation to dynamic data exploration, addressing the critical failure mode where syntactically valid SQL yields semantically incorrect results. By enabling models to inspect data distributions and resolve ambiguities like inconsistent naming conventions, SQRL offers a more reliable solution for enterprise applications where data quality varies. The availability of open-source, smaller models that match frontier proprietary performance provides organizations with privacy-preserving, cost-effective alternatives for on-premise deployment.

Technical Details

  • Dynamic Inspection Architecture: SQRL employs a two-action framework using <sql> tags for read-only exploration queries and <answer> tags for final SQL generation. The model decides whether to inspect based on ambiguity, performing up to five inspection rounds, though most queries resolve in fewer steps.
  • Training Methodology: The teacher model (SQRL-35B-A3B) was trained using CISPO, a reinforcement learning technique that clips importance-sampling weights to preserve gradient signals from rare tokens. Training focused on the "mixed zone" of trajectories where some attempts succeeded and others failed to isolate effective decision-making patterns.
  • Data Curation: The training dataset was rigorously cleaned by removing examples with unusable reference SQL and filtering out queries that did not correctly answer the prompt, as judged by three model judges. This ensures that execution-based rewards are accurate and not penalized for flawed ground truth.
  • Model Specifications: Built on Qwen3.5 and Qwen3.6 families, the model family includes SQRL-4B, SQRL-9B, and SQRL-35B-A3B. The 35B model activates approximately 3B parameters per token, optimizing inference efficiency.
  • Benchmark Performance: Evaluated on BIRD Dev, SQRL-35B-A3B achieved 70.60% execution accuracy, surpassing Claude Opus 4.6 (68.77%), Claude 4.5 Sonnet (67.34%), and Qwen3-Coder-480B-A35B (66.17%).

Industry Insight

  • Shift from Schema-Only to Data-Aware Generation: Developers should move beyond relying solely on schema definitions for text-to-SQL tasks. Implementing agents that can perform limited, read-only data inspections can significantly reduce logical errors caused by ambiguous column names or inconsistent data formats.
  • Cost-Effective Deployment of High-Accuracy Models: The performance parity between the open-source SQRL-4B and proprietary models like Claude Opus 4.6 suggests that smaller, specialized models can replace expensive API calls for many enterprise use cases, reducing latency and costs while keeping sensitive data on-premise.
  • Importance of Reward Signal Integrity: The success of SQRL highlights the necessity of curating high-quality training data for reinforcement learning in code generation. Automated evaluation pipelines must account for potential errors in ground-truth SQL to avoid teaching models incorrect behaviors.

TL;DR

  • Feyn AI发布SQRL模型家族,创新性地采用“先检查后回答”机制,通过读取数据库数据解决文本到SQL转换中的歧义问题。
  • 旗舰模型SQRL-35B-A3B在BIRD Dev基准测试中达到70.6%的执行准确率,超越Claude Opus 4.6等前沿模型。
  • 训练过程结合CISPO强化学习算法与执行奖励,通过筛选高质量轨迹数据,使模型学会何时需要查询数据库以验证假设。
  • 提供4B、9B和35B-A3B三种规格模型,小参数版本即可匹敌顶级大模型性能,且支持本地部署以保障数据隐私。

为什么值得看

SQRL突破了传统Text-to-SQL仅依赖模式翻译的局限,证明了利用运行时数据反馈能显著提升复杂查询的准确性。对于追求高可靠性的企业级数据分析应用,这种兼顾精度、成本与隐私控制的方案提供了极具吸引力的技术路径。

技术解析

  • 核心机制:SQRL引入交互式推理框架,模型可发出<sql>标签请求只读查询以获取观察结果<observation>,最多进行五次检查,最终通过<answer>提交结果,有效解决表连接错误、列名歧义等逻辑问题。
  • 训练策略:使用来自MiniMax M1的CISPO强化学习方法,通过执行结果匹配作为二元奖励信号;重点利用“混合区”数据(部分成功/失败轨迹)来优化决策边界,并清洗了BIRD和Spider数据集中无效参考查询。
  • 模型架构与性能:基于Qwen3.5/3.6构建,SQRL-35B-A3B激活约3B参数,在BIRD Dev上达70.6%;SQRL-4B以极小体积达到68.8%,性能对标Claude Opus 4.6,适合边缘或私有化部署。
  • 基准表现:在BIRD Dev上,SQRL系列全面领先于Claude 4.5 Sonnet、Qwen3-Coder-480B-A35B、GLM-4.7及DeepSeek-R1等主流模型。

行业启示

  • 从静态翻译转向动态验证:Text-to-SQL领域正从单纯的模式理解向结合数据分布的动态推理演进,引入运行时反馈机制将成为提升复杂场景准确率的关键方向。
  • 效率与精度的平衡:通过稀疏激活(如35B模型仅激活3B参数)和智能检查机制,可以在保持接近顶级大模型精度的同时大幅降低计算成本,为大规模落地提供经济可行的方案。
  • 数据主权的重要性:小型高效模型(如4B版本)的出现使得敏感数据无需离开本地基础设施即可完成高精度分析,增强了企业在合规要求严格场景下采用AI解决方案的信心。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Open Source 开源 LLM 大模型 Code Generation 代码生成 Benchmark 基准测试 Product Launch 产品发布