# BASE-SQL: A powerful open source Text-To-SQL baseline approach

Source: [BASE-SQL: A powerful open source Text-To-SQL baseline approach](<https://www.sota2.com/research/paper/68fa76fd1e209131cea70427>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-27T06:47:55.951Z

Authors: Lei Sheng, Shuai-Shuai Xu, Wei Xie

Published: 2025-02-15T09:23:37.000Z

## Abstract

The conversion of natural language into SQL language for querying databases (Text-to-SQL) has broad application prospects and has attracted widespread attention. At present, the mainstream Text-to-SQL methods are mainly divided into in-context learning (ICL) based methods and supervised fine-tuning (SFT) based methods. ICL-based methods can achieve relatively good results thanks to the use of the most advanced closed-source models. However, in real-world application scenarios, factors such as data privacy, SQL generation efficiency and cost need to be considered. SFT-based methods have certain advantages. At present, methods based on fine-tuning of open source models lack easy-to-implement and effective (cost-effective) baseline methods. We propose a pipeline-based method using open source model fine-tuning, referred to as BASE-SQL, which includes four components: Schema Linking, Candidate SQL Generate, SQL Revision and SQL Merge Revision. Experimental results show that BASE-SQL uses the open source model Qwen2.5-Coder-32B-Instruct, and achieves an accuracy of 67.47% on the BIRD development set and 88.9% on the Spider test set, which is significantly better than other methods using open source models, and even exceeds several methods using the GPT-4o closed-source model. At the same time, BASE-SQL is easy to implement and highly efficient (on average, only five calls to the large language model are required to generate SQL once). The code will be open sourced at https://github.com/CycloneBoy/base\_sql.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Text-to-SQL on Spider (test)](<https://www.sota2.com/research/sota/text-to-sql-on-spider-test.md>): Text-to-SQL; Spider (test); Execution Accuracy: 87.9.

- [Text-to-SQL on Spider (dev)](<https://www.sota2.com/research/sota/text-to-sql-on-spider-dev.md>): Text-to-SQL; Spider (dev); EX: 86.8.

- [Text-to-SQL on BIRD (dev)](<https://www.sota2.com/research/sota/text-to-sql-on-bird-dev.md>): Text-to-SQL; BIRD (dev); Execution Accuracy (EA): 63.8.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2502.10739>)

[PDF](<https://arxiv.org/pdf/2502.10739.pdf>)
