摘要
本文开发了一种基于大语言模型(LLM)的 Text-to-SQL 系统,应用于 ALeRCE 天文数据库。该系统通过上下文学习使用户能以自然语言查询并生成可执行 SQL。研究构建了包含 110 个样本的数据集,并提出包含模式链接、查询分类、提示分解及自校正的四模块逐步生成框架。评估显示,该框架显著优于直接推理基线,其中自校正模块有效降低了执行错误。在十三种模型中,Claude Opus 4.6 等表现最佳,但在复杂查询上性能仍有下降。
AI 推荐理由
论文核心研究 LLM 调用数据库工具(Text-to-SQL)的技能,包含工具使用全流程。
研究机构
Department of Electrical Engineering, University of Chile, Av. Tupper 2077, Santiago, Chile
Millennium Institute of Astrophysics (MAS), Nuncio Monsenor Sótero Sanz 100, Providencia, Santiago, Chile
Data and Artificial Intelligence Initiative (IDAI), Universidad de Chile, Beauchef 831, North building, 7th floor, Santiago 8320000, Chile
Center for Mathematical Modeling, Universidad de Chile, Beauchef 831, North building, 7th floor, Santiago 8320000, Chile
Department of Astronomy, Universidad de Chile, Casilla 360, Santiago, Chile
Department of Computer Science, Universidad de Concepción, Edmundo Larenas 219, Concepción, Chile
Center for Data and Artificial Intelligence, Universidad de Concepción, Edmundo Larenas 310, Concepción, Chile
论文信息