|

Feyn AI Releases SQRL, a Text-to-SQL Model Family That Inspects the Database Before Writing a Query

Most text-to-SQL techniques deal with the activity as translation. Feyn AI (YC-backed startup) reframes it round inspection. The Feyn workforce has launched SQRL, a household of fashions that flip pure language questions into SQL. Instead of producing a question instantly, SQRL can examine the database first. This lets it resolve ambiguity and write solely queries the knowledge really helps.

Feyn workforce studies that the flagship SQRL-35B-A3B reaches 70.6% execution accuracy on BIRD Dev. That determine edges Claude Opus 4.6 at 68.77% underneath the similar analysis. Three checkpoints ship overtly on Hugging Face: SQRL-4B, SQRL-9B, and SQRL-35B-A3B.

A question may be legitimate SQL and nonetheless be incorrect

Text-to-SQL is commonly described as a translation drawback, however that framing misses the hardest half. A question may be completely legitimate SQL and nonetheless return the incorrect reply. It can be a part of the incorrect tables, learn an ambiguous column incorrectly, or filter for values that don’t exist. None of those errors throws an error, so none is caught by execution alone.

Schema info doesn’t stop them. A schema lists tables, columns, sorts, and generally relationships. It doesn’t reveal whether or not a county is saved as Alameda, Alameda County, or ALAMEDA. It can not inform you which be a part of produces duplicate rows.

The BIRD benchmark makes these failures measurable. Its databases span actual domains and comprise imperfect values, ambiguous columns, and nontrivial relationships. A system is scored by executing its SQL and evaluating the returned rows towards a reference end result. For question languages, syntactic correctness isn’t sufficient. Feyn’s core perception is that the lacking info already lives inside the database. The mannequin merely wants permission to ask for it.

SQRL inspects earlier than it solutions

SQRL receives a query, its schema, and elective proof about the database. If that context is sufficient, it returns a question without delay. If one thing stays ambiguous, it runs read-only queries and makes use of the returned rows to draft its remaining reply. The determination to examine is circumstantial. Counting rows in a single desk wants no lookup, so SQRL solutions immediately.

The interplay makes use of two distinct actions. An <sql> block requests an statement from the database. An <reply> block commits to the remaining question. The harness executes exploration queries in read-only mode and returns their rows inside <statement> tags. SQRL can examine as much as 5 instances, although most questions end in fewer steps.

The explainer under walks via each behaviors on actual examples, then compares the household towards frontier fashions on BIRD Dev.