首页 > AI前沿 > LuthorSQL: A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent

LuthorSQL: A One-Pass Text-to-SQL Model as System 1 for a Slower LLM Agent

arXiv自然语言 2026-11-13 13:44 29 阅读 查看原文
用户现在需要把给定的新闻正文排版成语义化的HTML片段,首先得分析内容结构,开头是背景引入,然后是提出的模型,介绍特点、性能、结合后的效果、最后是污染探测和代码链接。首先,整个内容没有特别长的分节,但可以用h2划分几个部分?不对,先看原文结构:第一段是背景、问题,然后引出LuthorSQL,介绍它的工作机制,自身性能,和Claude结合的效果,最后是污染探测和代码。那合理的分节:用h2来划分不同部分,比如第一个h2可以是“研究背景与目标”?不对,要准确,不能改内容,哦不对,规则说不得增删改内容,所以h2的标题要从原文里提取?不对,原文没有现成的标题,哦不对,用户说长文用h2/h3划分小节,但原文是连贯的,不过可以划分:首先开头的背景和问题部分,然后是LuthorSQL的介绍,然后是性能表现,然后是结合后的效果,然后是污染探测与代码。等下,先逐句看,确保保留所有信息。 首先,开头的部分:“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?” 这部分可以用

,然后接下来是提出LuthorSQL,用h2?比如

LuthorSQL:面向LLM Agent的本地快速门控模型

?不对,不能自己加内容?哦不对,规则说保留原文所有信息,不得增删改,那h2的文本必须是原文里的内容?哦对,不能自己造标题,那怎么办?原文里的内容是连贯的,那可以划分:首先第一个

是背景部分,然后

LuthorSQL的设计与工作机制

?不对,原文里的内容是“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.” 这部分可以作为LuthorSQL的工作机制,用h2,标题可以提取原文里的表述,比如

LuthorSQL模型设计

?不对,会不会算增?哦,不对,用户说“不得增删改内容”,是指正文内容,小节标题是对内容的概括,应该可以?或者更稳妥的是,把整个内容按逻辑划分,h2的文本从原文里取核心表述。等下,再看规则2:长文用

/

划分小节,所以需要合理划分,同时不改变内容。 现在开始: 首先,背景部分:

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?

然后是引出模型,作为h2的开头?比如

LuthorSQL模型介绍

,然后下面

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.

然后下一部分是自身性能,h2

LuthorSQL的性能表现

,然后

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.

接下来是结合Claude后的效果,h2

与Claude Opus 5.5结合的验证结果

,然后

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.

然后是污染探测和代码,h2

污染探测与代码开放

,然后

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

?不对,原文里是“Code and data: https://github.com/IAMIbrahimmemon/luthorsql”,可以保留,或者用标签,但规则说不得增删改内容,所以可以保留文本,或者加链接,因为链接是原文的,不算改。 等等,但是h2的标题是不是可以更贴合原文,不要太自造?比如第一个h2可以是“研究背景与问题”,但原文里没有这个表述,会不会算增?哦,不对,用户说“不得增删改内容”是指正文的内容,小节标题是对内容的归纳,属于排版的语义化标签,应该可以,因为规则2要求用h2/h3划分小节,所以需要合理的小标题,只要不添加正文信息即可。 再检查:有没有增删改内容?比如原文的所有句子都要保留,每个自然段落用

,这里原文的自然段落其实是几个连贯的,但划分小节的话,用h2来分,每个h2下面用

。 另外,重要句子可以用,比如“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可以用?或者“cuts API cost by 33.3%”可以用? 再调整,确保所有信息都保留: 首先:

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?

LuthorSQL模型设计与工作机制

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.

LuthorSQL独立性能表现

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