๐Ÿคฏ AI Breakthrough: SQL Queries Explained Now! ๐Ÿš€

July 20, 2026 |

AI

๐ŸŽง Audio Summaries
English flag
French flag
German flag
Japanese flag
Korean flag
Mandarin flag
Spanish flag
๐Ÿ›’ Shop on Amazon

๐Ÿง Quick Intel


  • Feyn AI launched SQRL, a family of models translating natural language questions into SQL queries, achieving 70.6% execution accuracy on the BIRDDev benchmark, surpassing Claude Opus 4.6 at 68.77%.
  • The SQRL-35B-A3B model utilizes 3B parameters per token and was trained using CISPO, a reinforcement learning method with a โ€˜mixed zoneโ€™ for group-relative training.
  • Training involved cleaning the training pool, removing unusable results, and judges dropping queries that did not answer questions, focusing on sufficient context for query generation.
  • SQRL builds upon the Qwen3.5 and Qwen3.6 model families, with the 9B student model reaching 69.80% accuracy and the 4B model matching Claude Opus 4.6 at 68.80%.
  • Feyn recommends SQRL-9B as the default checkpoint, SQRL-4B for budget-conscious deployments, and SQRL-35B-A3B for maximum accuracy.
  • SQRLโ€™s evaluation on BIRD Dev measures query correctness by comparing results to reference answers, with a focus on returning the same result.
  • The frontier field includes benchmarks like Claude 4.5 Sonnet (67.34%), Qwen3-Coder-480B-A35B (66.17%), and DeepSeek-R1 (61.67%), highlighting competitive performance.
  • ๐Ÿ“Summary


    Feyn AI has introduced SQRL, a new family of models designed to translate natural language questions into SQL queries for database inspection. The flagship SQRL-35B-A3B model achieved 70.6% accuracy on the BIRDDev benchmark, surpassing Claude Opus at 68.77%. Developed using a reinforcement learning method and a โ€˜mixed zoneโ€™ training approach, SQRL analyzes questions alongside database schemas and optional evidence. The model returns queries when sufficient context is present, or executes read-only queries and drafts answers when ambiguity persists. Three checkpoints โ€“ SQRL-4B, SQRL-9B, and SQRL-35B-A3B โ€“ are available on Hugging Face, with the 9B model recommended as the default for its balance of accuracy and performance. The technology represents a significant step in the ongoing pursuit of efficient database interaction.

    ๐Ÿ’กInsights

    โ–ผ


    SQRL: A Novel Approach to Text-to-SQL
    The Feyn AI team has developed SQRL, a family of models designed to transform natural language questions into SQL queries. Unlike traditional text-to-SQL systems that generate queries immediately, SQRL employs a novel โ€œinspectโ€ mechanism, allowing it to analyze the database schema before formulating a query. This approach mitigates ambiguity and ensures queries are supported by the data, significantly improving accuracy.

    The Inspection Mechanism: Addressing Query Ambiguity
    Text-to-SQL presents a significant challenge: a syntactically correct SQL query can still return an incorrect result due to issues like incorrect table joins, ambiguous column interpretations, or nonexistent values. Traditional systems often fail to catch these errors, as they rely solely on execution. SQRLโ€™s core innovation lies in its ability to inspect the database schema and data itself, resolving ambiguity before generating a query. The system operates through two distinct actions: an `` block requests an observation from the database, and an `` block commits to the final query.

    BIRD Benchmark and Evaluation Metrics
    The BIRD benchmark provides a rigorous testing environment for text-to-SQL systems, mirroring real-world database scenarios with imperfect data, ambiguous columns, and complex relationships. Systems are evaluated by executing their SQL queries and comparing the returned rows against a reference result. Syntactic correctness alone is insufficient; the benchmark emphasizes the need for accurate results, exposing failures in systems that rely solely on query execution. Feyn's flagship SQRL-35B-A3B achieves 70.6% execution accuracy on the BIRDDev dataset, surpassing Claude Opus 4.6โ€™s 68.77% under identical evaluation conditions.

    Training SQRL: A Hybrid Approach
    Feynโ€™s training methodology for SQRL combines several key elements. First, the training pool was meticulously cleaned, removing examples where reference SQL queries produced no usable results. Second, three model judges reviewed the remaining pairs, discarding queries that did not accurately answer the questions as written. Third, the model was trained using CISPO, a reinforcement learning method from MiniMaxโ€™s M1 work, which clips the importance-sampling weights rather than the policy ratio, preserving gradient signal from rare but decisive tokens. Crucially, the training incorporated a โ€œmixed zoneโ€ approach, reinforcing decisions that separated correct trajectories from incorrect ones. This behavior training was essential for enabling SQRLโ€™s inspection mechanism.

    Deployment and Model Variants
    To facilitate deployment, Feyn sampled complete teacher trajectories and retained only runs where the final SQL returned the correct result. This produced approximately 10,200 examples, preserving the reasoning, exploration queries, observations, and final answers. The 4B and 9B student models were fine-tuned on these trajectories, further refined using the same CISPO execution reward. The SQRL family builds upon the Qwen3.5 and Qwen3.6 model families, demonstrating strong performance on the BIRD Dev benchmark.

    Performance Comparison with Frontier Models
    SQRL-35B-A3B achieves a score of 70.60% and activates approximately 3B parameters per token. The 9B student holds nearly all of that at 69.80%. SQRL-4B reaches 68.80%, matching Claude Opus 4.6 on this evaluation in a model small enough to host anywhere, so your schema, queries, and observations stay on infrastructure you control. In comparison, frontier models like Claude 4.5 Sonnet (67.34%), Qwen3-Coder-480B-A35B (66.17%), GLM-4.7 (63.82%), DeepSeek-R1 (61.67%), and Kimi-K2-Thinking (60.63%) trail behind SQRL.

    SQRL Deployment and Usage Considerations
    For optimal deployment, Feyn recommends the SQRL-9B model as the default checkpoint, with SQRL-4B for the tightest budgets and SQRL-35B-A3B for the highest accuracy. Specifically, the 9B model serves with vLLM: The application loop is small. Keep database execution read-only, and return each observation to the model until it emits an answer. One caveat matters. Do not enable a serving-layer reasoning parser. The action protocol appears in the content after the closingtag, so stripping that content removes the modelโ€™soraction. Parse the raw message content and preserve everything after the final think tag.