ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2502.11741
52
1

SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQL

17 February 2025
Shuai Lyu
Haoran Luo
Zhonghong Ou
Yifan Zhu
Xiaoran Shang
Yang Qin
Meina Song
    AI4TS
    LRM
ArXivPDFHTML
Abstract

The Text-to-SQL(Text2SQL) task aims to convert natural language queries into executable SQL queries. Thanks to the application of large language models (LLMs), significant progress has been made in this field. However, challenges such as model scalability, limited generation space, and coherence issues in SQL generation still persist. To address these issues, we propose SQL-o1, a Self-Reward-based heuristic search method designed to enhance the reasoning ability of LLMs in SQL query generation. SQL-o1 combines Monte Carlo Tree Search (MCTS) for heuristic process-level search and constructs a Schema-Aware dataset to help the model better understand database schemas. Extensive experiments on the Bird and Spider datasets demonstrate that SQL-o1 improves execution accuracy by 10.8\% on the complex Bird dataset compared to the latest baseline methods, even outperforming GPT-4-based approaches. Additionally, SQL-o1 excels in few-shot learning scenarios and shows strong cross-model transferability. Our code is publicly available at:this https URL.

View on arXiv
@article{lyu2025_2502.11741,
  title={ SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQL },
  author={ Shuai Lyu and Haoran Luo and Zhonghong Ou and Yifan Zhu and Xiaoran Shang and Yang Qin and Meina Song },
  journal={arXiv preprint arXiv:2502.11741},
  year={ 2025 }
}
Comments on this paper