跳到正文
arXiv:cs.AI· Bilel Abderrahmane Benziane, Xavier Schepler·· 16 小时前

小 LLM 如何在资源受限环境下实现可靠 Text-to-SQL:基于迭代重试工作流的研究

Reliable Text-to-SQL in Resource-Constrained Settings with Small LLMs via Iterative Retry Workflows

AI 导读

研究在受控推理预算下评测了 1B-8B 参数开源小模型在 Spider 基准上的 Text-to-SQL 能力,发现 SQL 专用模型在小规模下比通用和对话模型更可靠,且性能随提示词表示方式大幅波动。为此提出三种轻量推理工作流,在失败时自动换用其他提示词或模型重试,并可选加入语法纠正步骤,显著提升端到端成功率,代价是额外推理调用。

正文

View PDF HTML (experimental)

Abstract:Large Language Models (LLMs) have recently improved Text-to-SQL generation, but their computational cost can hinder deployment in resource-constrained settings. This paper evaluates the Text-to-SQL capabilities of small and medium open-source LLMs (1B-8B parameters) under a controlled inference budget, focusing on how model specialization and prompt formulation affect performance. Using the Spider benchmark, we compare multiple prompt representations and assess the accuracy of generated queries. Our results show that SQL-specialized models are consistently more reliable than general-purpose and chat-oriented models at small scales, and that performance can vary substantially depending on the prompt used. To reduce this variability without resorting to larger models, we introduce three lightweight inference workflows that automatically retry with alternative prompts and/or models when failures occur, including an optional syntax-correction step. These workflows significantly improve end-to-end success rates, with a trade-off in additional inference calls. These results demonstrate a practical path to stronger Text-to-SQL performance with small LLMs, by trading modest additional inference cost for higher reliability.
Subjects: Artificial Intelligence (cs.AI)
Cite as: arXiv:2610.17305 [cs.AI]
  (or arXiv:2610.17305v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2610.17305

arXiv-issued DOI via DataCite (pending registration)

Related DOI: https://doi.org/10.1109/ICAC70325.2026.11712531

DOI(s) linking to related resources

Submission history

From: Bilel Abderrahmane Benziane Eng [view email]
[v1] Mon, 12 Oct 2026 18:59:25 UTC (3,551 KB)

来源:arXiv:cs.AI · arxiv.org