LuthorSQL: A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
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
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 51 of its 79 references that are in the map. Submitted 13 Nov 2026.
Builds on
51 of 79 references.
Closest ancestors · 1
Same direction, newest first
Other references · 50
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,205
- 2023FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performancecited by 1,000
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 809
- 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 747
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 714
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 503
- 2017Non-Autoregressive Neural Machine Translationcited by 498
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 446
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 432
- 2024Hybrid LLM: Cost-Efficient and Quality-Aware Query Routingcited by 421
- 2022CodeT: Code Generation with Generated Testscited by 411
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 267
38 more
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 247
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 216
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 204
- 2025DiffuCoder: Understanding and Improving Masked Diffusion Models for Code Generationcited by 201
- 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 196
- 2023SwiftSage: A Generative Agent with Fast and Slow Thinking for Complex Interactive Taskscited by 184
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 181
- 2023Large Language Model Cascades with Mixture of Thoughts Representations for Cost-efficient Reasoningcited by 157
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 151
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 139
- 2020Bridging Textual and Tabular Data for Cross-Domain Text-to-SQL Semantic Parsingcited by 139
- 2020Semantic Evaluation for Text-to-SQL with Distilled Test Suitescited by 137
- 2020Structure-Grounded Pretraining for Text-to-SQLcited by 131
- 2022Natural Language to Code Translation with Executioncited by 128
- 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 117
- 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 111
- 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 110
- 2025OmniSQL: Synthesizing High-quality Text-to-SQL Data at Scalecited by 101
- 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 99
- 2019A Comprehensive Exploration on WikiSQL with Table-Aware Word Contextualizationcited by 90
- 2018SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-DomainText-to-SQL Taskcited by 76
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 70
- 2020RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databasescited by 64
- 2018Robust Text-to-SQL Generation with Execution-Guided Decodingcited by 57
- 2023Dr.Spider: A Diagnostic Evaluation Benchmark towards Text-to-SQL Robustnesscited by 56
- 2022Model Cascading: Towards Jointly Improving Efficiency and Accuracy of NLP Systemscited by 53
- 2025Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQLcited by 47
- 2025XiYan-SQL: A Novel Multi-Generator Framework For Text-to-SQLcited by 47
- 2024Understanding the Effects of Noise in Text-to-SQL: An Examination of the BIRD-Bench Benchmarkcited by 39
- 2020Hybrid Ranking Network for Text-to-SQLcited by 34
- 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedbackcited by 29
- 2019X-SQL: reinforce schema representation with contextcited by 23
- 2024Investigating the Impact of Data Contamination of Large Language Models in Text-to-SQL Translationcited by 22
- 2024MSc-SQL: Multi-Sample Critiquing Small Language Models For Text-To-SQL Translationcited by 20
- 2019Bridging the Semantic Gap with SQL Query Logs in Natural Language Interfaces to Databasescited by 17
- 2025EllieSQL: Cost-Efficient Text-to-SQL with Complexity-Aware Routingcited by 14
- 2024Towards Optimizing SQL Generation via LLM Routingcited by 6
- 2026R3-SQL: Ranking Reward and Resampling for Text-to-SQLcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025A Multi-agent Text2SQL Framework using Small Language Models and Execution Feedback
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
- 2026An Agentic System for Schema Aware NL2SQL Generation
- 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarios
- 2026Both Ends Count! Just How Good are LLM Agents at "Text-to-Big SQL"?
- 2025Rethinking Agentic Workflows: Evaluating Inference-Based Test-Time Scaling Strategies in Text2SQL Tasks
- 2025SLM-SQL: An Exploration of Small Language Models for Text-to-SQL
- 2025RAISE: Reasoning Agent for Interactive SQL Exploration