Self-Contrastive Loop of Thought Method for Text-to-SQL Based on Large Language Model

Text-to-SQL is a task with excellent prospects and challenges, and it aims to convert natural language queries (NL) into corresponding structured query language (SQL) statements.The main challenge of this task is how to efficiently transform unstructured data and structured data.In recent years, the emergence of large language models (LLMs) has further promoted the development of this field.However, current LLM-based text-to-SQL methods rely on specific few-shot example construction, resulting in poor performance across domains.To solve this problem, we propose a text-to-SQL method of self-contrastive loop of thought structure.This method designs the LLM inference process as a loop structure based on the comparison of positive and negative examples.The model optimizes the generated results through continuous verification and error correction, greatly improving accuracy and reducing dependence on few-shot example construction.The experimental results on SPIDER and BIRD datasets show that this method can generate SQL with higher precision without relying on few-shot example construction.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.xllm-1.8
Primary Topic
Advanced Computational Techniques and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Self-Contrastive Loop of Thought Method for Text-to-SQL Based on Large Language Model

Mingxi Tan, Simon X. Yang, Fengrui Kang, Xianying Huang
Advanced Computational Techniques and Applications
article

Self-Contrastive Loop of Thought Method for Text-to-SQL Based on Large Language Model

Mingxi Tan, Simon X. Yang, Fengrui Kang, Xianying Huang
article en

Abstract

Text-to-SQL is a task with excellent prospects and challenges, and it aims to convert natural language queries (NL) into corresponding structured query language (SQL) statements.The main challenge of this task is how to efficiently transform unstructured data and structured data.In recent years, the emergence of large language models (LLMs) has further promoted the development of this field.However, current LLM-based text-to-SQL methods rely on specific few-shot example construction, resulting in poor performance across domains.To solve this problem, we propose a text-to-SQL method of self-contrastive loop of thought structure.This method designs the LLM inference process as a loop structure based on the comparison of positive and negative examples.The model optimizes the generated results through continuous verification and error correction, greatly improving accuracy and reducing dependence on few-shot example construction.The experimental results on SPIDER and BIRD datasets show that this method can generate SQL with higher precision without relying on few-shot example construction.

Quality Education
Openalex Percentile: Top 90%
Advanced Computational Techniques and Applications
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.

Self-Contrastive Loop of Thought Method for Text-to-SQL Based on Large Language Model — Mingxi Tan, Simon X. Yang, et al. · (2025) | TGRS Research Map | TGRS