MCI-SQL: Text-to-SQL with Metadata-Complete Context and Intermediate Correction

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Wang, Qin, Li, Youhuan, Lin, Suixi, Tang, Zhuo, Li, Kenli, Peng, Peng, Xu, Quanqing, Yang, Chuanhui
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866915861441282048
author Wang, Qin
Li, Youhuan
Lin, Suixi
Tang, Zhuo
Li, Kenli
Peng, Peng
Xu, Quanqing
Yang, Chuanhui
author_facet Wang, Qin
Li, Youhuan
Lin, Suixi
Tang, Zhuo
Li, Kenli
Peng, Peng
Xu, Quanqing
Yang, Chuanhui
contents Text-to-SQL aims to translate natural language queries into SQL statements. Existing methods typically follow a pipeline of pre-processing, schema linking, candidate SQL generation, SQL alignment, and target SQL selection. However, these methods face significant challenges. First, they often struggle with column filtering during schema linking due to difficulties in comprehending raw metadata. Also, the candidate SQL generation process often suffers from reasoning errors, which limits accuracy improvements. To address these limitations, we propose a framework, called MCI-SQL, to efficiently and precisely generate SQL queries. Specifically, we assign metadata-complete contexts to each column, which significantly improves the accuracy of column filtering for schema linking. Also, for candidate SQL generation, we propose an intermediate correction mechanism that validates SQL queries and revises errors in a timely way. Moreover, we also propose effective optimizations in subsequent SQL alignment and selection phases, which further enhance the performance. Experiments on the widely-used BIRD benchmark show that MCI-SQL achieves execution accuracy of 74.45% on the development set and 76.41% on the test set, surpassing current published state-of-the-art results. In addition, we manually identify and correct 412 samples in the BIRD dataset, forming a new version named BIRD-clear, which is released together with our code on GitHub. We also evaluate our methods on BIRD-clear and find that MCI-SQL outperforms baselines by 8.47 percentage points in execution accuracy, further demonstrating the effectiveness and reliability of our framework.
format Preprint
id arxiv_https___arxiv_org_abs_2603_13390
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle MCI-SQL: Text-to-SQL with Metadata-Complete Context and Intermediate Correction
Wang, Qin
Li, Youhuan
Lin, Suixi
Tang, Zhuo
Li, Kenli
Peng, Peng
Xu, Quanqing
Yang, Chuanhui
Databases
Text-to-SQL aims to translate natural language queries into SQL statements. Existing methods typically follow a pipeline of pre-processing, schema linking, candidate SQL generation, SQL alignment, and target SQL selection. However, these methods face significant challenges. First, they often struggle with column filtering during schema linking due to difficulties in comprehending raw metadata. Also, the candidate SQL generation process often suffers from reasoning errors, which limits accuracy improvements. To address these limitations, we propose a framework, called MCI-SQL, to efficiently and precisely generate SQL queries. Specifically, we assign metadata-complete contexts to each column, which significantly improves the accuracy of column filtering for schema linking. Also, for candidate SQL generation, we propose an intermediate correction mechanism that validates SQL queries and revises errors in a timely way. Moreover, we also propose effective optimizations in subsequent SQL alignment and selection phases, which further enhance the performance. Experiments on the widely-used BIRD benchmark show that MCI-SQL achieves execution accuracy of 74.45% on the development set and 76.41% on the test set, surpassing current published state-of-the-art results. In addition, we manually identify and correct 412 samples in the BIRD dataset, forming a new version named BIRD-clear, which is released together with our code on GitHub. We also evaluate our methods on BIRD-clear and find that MCI-SQL outperforms baselines by 8.47 percentage points in execution accuracy, further demonstrating the effectiveness and reliability of our framework.
title MCI-SQL: Text-to-SQL with Metadata-Complete Context and Intermediate Correction
topic Databases
url https://arxiv.org/abs/2603.13390