SQRL: The Self-Inspecting Text-to-SQL AI Model That Queries Before It Commits

Feyn Labs' open-weight SQRL model family brings database-aware SQL generation to privacy-conscious developers and sovereign cloud deployments

SQRL: The Self-Inspecting Text-to-SQL AI Model That Queries Before It Commits

A Text-to-SQL AI Model That Looks Before It Leaps

Feyn Labs has quietly made a significant move in the world of AI-powered data querying with the release of SQRL — a family of text-to-SQL AI models designed to inspect a database with read-only probes before writing a single line of SQL. For developers, data engineers, and IT decision-makers who have grown weary of AI tools that hallucinate column names or confidently produce broken queries, this represents a meaningful architectural shift.

The flagship model, SQRL-35B-A3B, reports 70.6% execution accuracy on the BIRD Dev benchmark — a rigorous industry-standard test for natural language to SQL systems — edging out Anthropic's Claude Opus 4.6 on the same measure. Crucially for teams prioritising data sovereignty and on-premise deployments, SQRL distils into self-hostable 4B and 9B parameter checkpoints, making it viable for organisations that cannot or will not route sensitive database queries through third-party cloud APIs. As research published on Hugging Face's model hub and benchmarked across the NLP community increasingly shows, real-world SQL generation accuracy depends heavily on a model's ability to reason about actual schema structure — not just infer it.

Developer working with database query tools and AI-assisted coding environment
Text-to-SQL AI models like SQRL are reshaping how developers interact with relational databases

How SQRL's "Inspect First" Architecture Changes the SQL Generation Game

Most text-to-SQL systems — whether standalone models or large language model (LLM) integrations bolted onto enterprise data stacks — operate with a static view of the database. They receive a schema dump, a natural language question, and attempt to generate the correct SQL in a single forward pass. The problem is well-documented in research, including the BIRD benchmark paper from researchers at The Chinese University of Hong Kong: real-world databases are messy. Column names are cryptic, value distributions are uneven, and foreign key relationships are rarely self-explanatory from schema alone.

SQRL takes a different approach. Before committing to a query, the model issues lightweight read-only probes against the actual database — sampling values, confirming column existence, checking for null distributions, and validating join paths. Think of it as the difference between a developer who reads documentation and one who actually opens the database console to check what data looks like before writing a query. This "inspect-then-generate" paradigm is not entirely new conceptually — it echoes retrieval-augmented generation (RAG) principles applied to structured data — but Feyn Labs appears to have operationalised it into a coherent model family with strong benchmark results to back the claim.

The practical implication is fewer silent failures. One of the most dangerous failure modes in enterprise AI deployments is a query that runs without error but returns semantically incorrect results — a model that confidently selects from the wrong table, misinterprets a date format, or applies a filter on a field that contains unexpected nulls. SQRL's probing behaviour is designed to catch exactly these categories of error before they propagate into dashboards, reports, or downstream automated pipelines.

"The real benchmark for any text-to-SQL system isn't whether it can generate syntactically valid SQL — it's whether the results mean what the user intended. Schema inspection at inference time is the missing link most production deployments have been ignoring."

— AI data infrastructure researcher, reflecting the broader industry consensus on grounded SQL generation

What the BIRD Dev Score of 70.6% Actually Means for Enterprise Teams

The BIRD (Big Bench for Large-scale Database Grounded Text-to-SQL Evaluation) benchmark has become the most widely cited real-world test for natural language to SQL systems. Unlike earlier benchmarks such as Spider, BIRD was specifically designed to reflect the complexity of production databases — including noisy data, ambiguous column semantics, and queries that require genuine reasoning about data content, not just schema structure. A score of 70.6% execution accuracy on BIRD Dev is meaningfully high and places SQRL-35B-A3B among the top-performing publicly available models on this task.

For context, execution accuracy measures whether the SQL query, when run against the actual database, returns the correct result set — not just whether the SQL is syntactically valid. This is a harder and more honest metric than match-based evaluations. Anthropic's Claude Opus, which SQRL edges on this benchmark, is a frontier closed-source model that costs significantly more to run at scale and cannot be self-hosted. The fact that an open-weight model family can approach or exceed that level of accuracy has real consequences for procurement decisions in privacy-sensitive sectors.

70.6%SQRL-35B BIRD Dev execution accuracy
4B / 9BSelf-hostable distilled checkpoint sizes
Read-onlyDatabase probes — no write access required
35BParameters in the flagship SQRL model
Model BIRD Dev Accuracy Self-Hostable Schema Inspection
SQRL-35B-A3B (Feyn Labs) 70.6% Yes (4B/9B distilled) Yes — read-only probes
Claude Opus 4.6 (Anthropic) ~70% (reported) No — cloud API only No — static schema only
Typical fine-tuned OSS models 55–65% Yes No
GPT-4o via API ~67–69% No — cloud API only Partial (with tooling)

Why Self-Hostable SQL AI Models Matter for GDPR Compliance and Data Sovereignty

For European organisations and privacy-conscious teams globally, the self-hostable nature of SQRL's distilled checkpoints is arguably more significant than the benchmark score. When a developer or data analyst queries a database containing personal data — customer records, health information, financial transactions — routing that query through a third-party cloud AI API creates a data transfer event. Under the EU's General Data Protection Regulation (GDPR), this carries meaningful compliance obligations, particularly when the API provider is domiciled outside the European Economic Area.

According to analysis from the International Association of Privacy Professionals (IAPP), organisations using cloud-based AI tools for data analysis must carefully evaluate whether their API calls constitute data processing under Article 4 GDPR, and whether appropriate safeguards under Chapter V are in place for international transfers. For many small and medium-sized enterprises — particularly those handling sensitive categories of personal data — the simplest compliance posture is to keep all data processing within a controlled, on-premise or private cloud environment. A self-hostable text-to-SQL AI model that can run on modest GPU hardware changes the calculus entirely.

The European digital sovereignty movement, supported by frameworks like Gaia-X and increasingly reflected in national cloud strategies across France, Germany, and the Netherlands, emphasises that organisations should have meaningful choices about where and how their data is processed. Open-weight models that can be deployed on sovereign infrastructure — rather than locked into a US hyperscaler's API ecosystem — align directly with these policy priorities. The trend is also visible in the European Commission's own AI Act, which places particular scrutiny on high-risk AI systems that process personal data.

Secure data center infrastructure representing digital sovereignty and on-premise AI deployment
Self-hostable AI models allow organisations to keep sensitive database queries within their own controlled infrastructure

Deploying SQRL: What IT Decision-Makers Need to Know

The distillation of SQRL into 4B and 9B parameter checkpoints is an important practical decision. The 35B flagship model delivers the highest accuracy but requires substantial GPU resources — likely 2–4 high-memory GPUs for inference at production throughput. The 4B and 9B variants, by contrast, can run on a single consumer or prosumer GPU, and may be viable on CPU-only infrastructure with sufficient RAM, albeit at slower inference speeds. For small business owners or startups that want AI-assisted SQL querying without a cloud dependency, the smaller checkpoints represent a realistic path to deployment.

From a security architecture perspective, the read-only probe design is notable. SQRL does not require write access to the database to function — it inspects tables and sample values through SELECT queries only. This significantly reduces the attack surface and simplifies the permission model. A database role with read-only access to the relevant schema is sufficient to run the model's inspection phase, meaning IT administrators can grant access without exposing any modification capabilities. For regulated industries — financial services, healthcare, public sector — this is precisely the kind of least-privilege design that security teams demand before approving a new tool.

As covered in detail by the machine learning engineering community on platforms like Hugging Face and discussed in open-source AI forums, the broader trend of "agentic" SQL generation — where models take multiple steps, verify intermediate results, and adapt their approach based on feedback — is gaining traction. SQRL's inspect-first mechanism sits within this paradigm, though it stops short of full agentic loops with multi-step tool use. It represents a practical middle ground between the simplicity of single-pass generation and the complexity of full AI agent frameworks.

Model size vs. deployment accessibility

SQRL-35B (flagship)
Highest accuracy — multi-GPU
SQRL-9B
Originally reported by MarkTechPost. Summarised and curated by European Purpose.