LuthorSQL: A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent
Ibrahim Memon, Armin Karamzade, M. Hanif Jhaveri, Roy Fox
UC Irvine · Independent Researcher
Published November 13, 2026 · on the feed November 16, 2026 · ▲ 3 · arXiv 2611.17780
The abstract
Frontier LLM agents that query databases with tools are among the most accurate text-to-SQL systems, but per-query calls to a hosted model are slow, costly, and expose sensitive organizational queries to external APIs. For example, a Claude Opus 5.5 agent serving 10,000 queries a day costs over $70,000 a year at list price. To what extent can local hardware already owned by an organization offload this burden without compromising the agent's accuracy? We present LuthorSQL, a non-autoregressive 7B text-to-SQL model that serves as a rapid System 1 gate for a slower LLM agent (System 2), escalating queries only when uncertain. LuthorSQL makes a single forward pass to predict slot scores over a bounded grammar for query plans, compiles and runs up to 32 candidate plans, and chooses an answer using a trained validator. On its own, LuthorSQL reaches 68.03% execution accuracy on BIRD's hidden test set at 0.84 s per question on a single GPU, maintains its accuracy in 9 GB with 8-bit quantized weights, and transfers zero-shot to Snowflake, BigQuery, MySQL, PostgreSQL, and DuckDB within 3.1 points of its native SQLite accuracy. Combined with Claude Opus 5.5 in a pre-registered confidence cascade over 227 questions on databases published after Opus's training cutoff, LuthorSQL answers nearly half of all questions locally and cuts API cost by 33.3% at the same accuracy. Finally, contamination probing shows that Opus reproduces 48-92% of public benchmark gold queries verbatim without seeing the schema; however, its tool-assisted accuracy holds on renamed schemas and reaches 95.6-97.4% on post-cutoff databases. Code and data: https://github.com/IAMIbrahimmemon/luthorsql
The Brief
2:51A short podcast summary of the paper. Written and voiced by AI.
Transcript
LuthorSQL. A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent. By Ibrahim Memon and three others, from UC Irvine and Independent Researcher. Published on the thirteenth of November.
Among the most accurate text-to-SQL systems are frontier language-model agents that query databases with tools. They come with three costs. Each query is a call to a hosted model, which is slow. It is costly. And it sends sensitive organisational queries out to external APIs. The abstract puts a figure on the second cost: a Claude Opus 5.5 agent serving ten thousand queries a day costs over seventy thousand dollars a year at list price. The question the paper asks is how much of that burden local hardware an organisation already owns can take on, without giving up the agent's accuracy.
The answer proposed is a division into two systems. LuthorSQL is a fast local model that acts as System 1, a rapid gate in front of a slower language-model agent, which plays System 2. LuthorSQL handles a query itself when it is confident, and escalates it to the agent only when it is uncertain.
LuthorSQL is a non-autoregressive text-to-SQL model with seven billion parameters. Rather than writing a query token by token, it makes a single forward pass that predicts slot scores over a bounded grammar for query plans. From those scores it compiles and runs up to thirty-two candidate plans, and a trained validator chooses which answer to return.
On its own, LuthorSQL reaches sixty-eight point zero three percent execution accuracy on the hidden test set of BIRD. It takes zero point eight four seconds per question on a single GPU. With weights quantized to eight bits, it keeps its accuracy in nine gigabytes of memory. It also transfers zero-shot to Snowflake, BigQuery, MySQL, PostgreSQL and DuckDB, staying within three point one points of its accuracy on its native SQLite.
The cascade was tested by pairing LuthorSQL with Claude Opus 5.5 under a confidence rule that was pre-registered. The test used two hundred twenty-seven questions on databases published after the training cutoff of Opus. LuthorSQL answers nearly half of all questions locally, and API cost falls by thirty-three point three percent at the same accuracy.
The authors also probed for contamination. Without seeing the schema, Opus reproduces between forty-eight and ninety-two percent of public benchmark gold queries verbatim. Even so, its tool-assisted accuracy holds up on renamed schemas. On the databases published after its cutoff, that accuracy reaches between ninety-five point six and ninety-seven point four percent.
The design question is not whether a small local model can replace a frontier agent. It is how many questions the frontier agent needs to see at all. A single-pass model with a validator, sitting in front and passing on only what it is unsure of, keeps nearly half the traffic local while the accuracy stays where the agent alone would put it. The contamination probe adds a caution about public benchmarks, and the cascade result was measured on databases published after the cutoff.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free