LuthorSQL: a one-shot text-to-SQL model as System 1 for slower LLM agentsLuthorSQL: A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent
AI summary
The authors propose LuthorSQL, a non-autoregressive 7B text-to-SQL model that serves as a fast System 1 pre-filter for slower LLM agents, escalating queries to the agent only when uncertain. The model predicts slot scores for query plans over a bounded grammar in a single forward pass, compiles and runs up to 32 candidate plans, and then a trained verifier selects the answer. Used alone, it achieves 68.03% execution accuracy on the BIRD hidden test set, takes 0.84 seconds per question on a single GPU, retains accuracy within 9 GB of memory after 8-bit quantization, and when transferred zero-shot to Snowflake, BigQuery, MySQL, PostgreSQL and DuckDB, differs from native SQLite accuracy by no more than 3.1 percentage points.