Text2SQL Training Corpus Generation Based on Bidirectional Enhancement and Multi-Stage Supervision

针对Text2SQL任务中训练语料人工标注成本高、场景覆盖有限的问题,本文提出一种基于双向增强与多阶监督的语料生成框架。该方法通过问题到SQL的正向增强与SQL到问题的逆向增强构建双向数据流,结合大语言模型的上下文理解与代码生成能力,创新性地引入四阶段监督审查机制(提问多样性扩充、提问质量审查、SQL自动生成、生成质量审查),极大地提高了低资源条件下训练语料生成的效率与质量。实验表明,该方法生成的语料所训练出来的模型执行准确率相较于传统人工标注语料微调模型提升了16.3%,相较于少样本提示学习方法提升了35.7%。其次,在语料的泛化迁移性方面,本文方法生成的语料对模型尺寸大小和提问难易程度的适应性都高于人工少量标注方式。To address the challenges of high annotation costs and limited scenario coverage in Text2SQL training corpus construction, this paper proposes a corpus generation framework based on bidirectional enhancement and multi-stage supervision. The method constructs a bidirectional data flow through question-to-SQL forward enhancement and SQL-to-question reverse enhancement, combines the contextual understanding and code generation capabilities of large language models (LLMs), and innovatively introduces a novel four-stage supervision and verification mechanism (question diversity expansion, question quality verification, SQL auto-generation, and generation quality verification), significantly improving the efficiency and quality of corpus generation under low-resource conditions. Experiments demonstrate that models trained with this generated corpus achieve a 16.3% improvement in execution accuracy compared to models fine-tuned with traditional human-annotated corpora and a 35.7% improvement over few-shot prompt learning methods. Furthermore, in terms of the generalization and transferability of the corpus, the corpus generated by this paper’s method is more adaptable to both model size and question difficulty levels than the manually annotated small-scale approach.

Authors

Publication Details

Journal
Computer Science and Application
Published
2025-01-01
DOI
https://doi.org/10.12677/csa.2025.157174
Primary Topic
Educational Technology and Assessment
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Text2SQL Training Corpus Generation Based on Bidirectional Enhancement and Multi-Stage Supervision

浩 黄
Computer Science and Application
Educational Technology and Assessment
article

Text2SQL Training Corpus Generation Based on Bidirectional Enhancement and Multi-Stage Supervision

浩 黄
article en

Abstract

针对Text2SQL任务中训练语料人工标注成本高、场景覆盖有限的问题,本文提出一种基于双向增强与多阶监督的语料生成框架。该方法通过问题到SQL的正向增强与SQL到问题的逆向增强构建双向数据流,结合大语言模型的上下文理解与代码生成能力,创新性地引入四阶段监督审查机制(提问多样性扩充、提问质量审查、SQL自动生成、生成质量审查),极大地提高了低资源条件下训练语料生成的效率与质量。实验表明,该方法生成的语料所训练出来的模型执行准确率相较于传统人工标注语料微调模型提升了16.3%,相较于少样本提示学习方法提升了35.7%。其次,在语料的泛化迁移性方面,本文方法生成的语料对模型尺寸大小和提问难易程度的适应性都高于人工少量标注方式。To address the challenges of high annotation costs and limited scenario coverage in Text2SQL training corpus construction, this paper proposes a corpus generation framework based on bidirectional enhancement and multi-stage supervision. The method constructs a bidirectional data flow through question-to-SQL forward enhancement and SQL-to-question reverse enhancement, combines the contextual understanding and code generation capabilities of large language models (LLMs), and innovatively introduces a novel four-stage supervision and verification mechanism (question diversity expansion, question quality verification, SQL auto-generation, and generation quality verification), significantly improving the efficiency and quality of corpus generation under low-resource conditions. Experiments demonstrate that models trained with this generated corpus achieve a 16.3% improvement in execution accuracy compared to models fine-tuned with traditional human-annotated corpora and a 35.7% improvement over few-shot prompt learning methods. Furthermore, in terms of the generalization and transferability of the corpus, the corpus generated by this paper’s method is more adaptable to both model size and question difficulty levels than the manually annotated small-scale approach.

Computer Science and ApplicationVol. 15(07)
Openalex Percentile: Top 75%
Educational Technology and Assessment
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Text2SQL Training Corpus Generation Based on Bidirectional Enhancement and Multi-Stage Supervision — 浩 黄 · Computer Science and Application (2025) | TGRS Research Map | TGRS