TAHOE 解决了 Text-to-SQL 从原型到生产部署的痛点——无需微调模型即可大幅提升 SQL 生成准确率,做数据库应用或数据分析的开发者可以直接用这套方法优化现有 LLM 管线。
TAHOE 是一个新型 Text-to-SQL 系统,通过将提示优化视为动态数据管理问题来提升 LLM 的 SQL 生成质量。它利用错误驱动的提示学习管道,在开发和部署阶段将调试痕迹整合到结构化的提示库中,包括语法提示和语义提示。TAHOE 还引入策略层来建模冲突的用户意图,并通过逻辑规划和 SQL 合成指导推理。在 Spider 2.0-Snow 基准测试中,TAHOE 将 GPT-5.5 的通过率从 61.95% 提升至 79.42%,并实现了 100% 的 Snowflake 语法通过率。该提示库还可迁移到更弱的模型,如 Doubao-2.0-lite 上获得 19.7 个百分点的通过率提升。
TAHOE: Text-to-SQL with Automated Hint Optimization from Experience
Large Language Models (LLMs) have democratized database access through Text-to-SQL, but moving from prototypes to production remains difficult. Real deployments must handle strict SQL dialects, massive schemas, and evolving user preferences, while supervised fine-tuning is costly and rigid and agentic test-time scaling is expensive. We present Tahoe, a system that treats prompt optimization as a dynamic data management problem. Tahoe uses an error-driven hint learning pipeline across Development and Deployment to consolidate debugging traces into a structured Hint Bank. Compiler feedback is distilled into reusable Syntax Hints for dialect-specific rules, while execution and user feedback are converted into Semantic Hints for schema- and user-specific logic. Tahoe further introduces a Strategy Layer that models conflicting user intents as competing strategies under shared natural-language triggers, with recency signals and post-learning attribution statistics that summarize empirical success, harm, inertness, and support. At inference time, Tahoe retrieves relevant hints and guides the LLM through Logic Planning followed by SQL Synthesis. We implement and evaluate the development-phase workflow, leaving deployment-time human-feedback updates for future work. On Spider 2.0-Snow, Tahoe substantially improves Text-to-SQL without updating model parameters. On 113 supervised Spider 2.0-Snow-0212 examples using GPT-5.5, Tahoe raises pass rate from 61.95 percent to 79.42 percent and pass-at-4 from 72.57 percent to 87.61 percent, achieves 100 percent Snowflake syntax pass rate, and reduces average compiler-feedback critic rounds from 2.79 to 0.12 per sampled candidate. The same Hint Bank also transfers to weaker backbones, including a 19.7 percentage-point pass-rate gain on Doubao-2.0-lite.