arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.24023cs.CLcs.AI
收藏

内部架构:一种两阶段微调方法,用于大规模高效文本到SQL

Schema on the Inside: A Two-Phase Fine-Tuning Method for High-Efficiency Text-to-SQL at Scale

Chinmay Soni, Shivam Chourasia, Gaurav Kumar, Hitesh Kapoor

AI总结:

本文提出一种两阶段监督微调方法,使模型能内部化整个数据库架构,减少输入token至100以下,提升文本到SQL的精度和效率。

摘要:

将大型、专有API基础的语言模型应用于文本到SQL任务面临重大行业挑战:依赖大规模、结构复杂的提示导致每token API成本高昂且延迟高,阻碍了可扩展的生产部署。我们提出一个专门用于CriQ应用程序的自托管8B参数模型,该应用是印度最大的幻想体育平台Dream11的姊妹应用,拥有2.5亿用户。我们的新型两阶段监督微调方法使模型能够内部化整个数据库架构,从而消除对长上下文提示的需求。这将输入token减少超过99%,从17k基准降至不足100,并用高效的本地推理取代昂贵的外部API调用。所得到的系统实现了98.4%的执行成功率和92.5%的语义准确性,显著优于使用Google Gemini Flash 2.0的提示工程基线(95.6%执行,89.4%语义准确性)。这些结果展示了在大规模生产环境中使用领域专用、自托管语言模型实现高精度、低延迟文本到SQL应用的可行路径。

英文摘要:

Applying large, proprietary API-based language models to text-to-SQL tasks poses a significant industry challenge: reliance on massive, schema-heavy prompts results in prohibitive per-token API costs and high latency, hindering scalable production deployment. We present a specialized, self-hosted 8B-parameter model designed for a conversational bot in CriQ, a sister app to Dream11, India's largest fantasy sports platform with over 250 million users, that answers user queries about cricket statistics. Our novel two-phase supervised fine-tuning approach enables the model to internalize the entire database schema, eliminating the need for long-context prompts. This reduces input tokens by over 99%, from a 17k-token baseline to fewer than 100, and replaces costly external API calls with efficient local inference. The resulting system achieves 98.4% execution success and 92.5% semantic accuracy, substantially outperforming a prompt-engineered baseline using Google's Gemini Flash 2.0 (95.6% execution, 89.4% semantic accuracy). These results demonstrate a practical path toward high-precision, low-latency text-to-SQL applications using domain-specialized, self-hosted language models in large-scale production environments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑