A Study of In-Context-Learning-Based Text-to-SQL Errors

Jiawei Shen, Chengcheng Wan, Ruoyi Qiao, Jiazhen Zou, Hang Xu +4 more
1/16/2025
cs.CLcs.AIcs.SE

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Large language models (LLMs) have been adopted to perform text-to-SQL tasks, utilizing their in-context learning (ICL) capability to translate natural language questions into structured query language (SQL). However, such a technique faces correctness problems and requires efficient repairing solutions. In this paper, we conduct the first comprehensive study of text-to-SQL errors. Our study covers four representative ICL-based techniques, five basic repairing methods, two benchmarks, and two LLM settings. We find that text-to-SQL errors are widespread and summarize 29 error types of 7 categories. We also find that existing repairing attempts have limited correctness improvement at the cost of high computational overhead with many mis-repairs. Based on the findings, we propose MapleRepair, a novel text-to-SQL error detection and repairing framework. The evaluation demonstrates that MapleRepair outperforms existing solutions by repairing 13.8% more queries with neglectable mis-repairs and 67.4% less overhead.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{shen2025study,
  title  = {A Study of In-Context-Learning-Based Text-to-SQL Errors},
  author = {Jiawei Shen and Chengcheng Wan and Ruoyi Qiao and Jiazhen Zou and Hang Xu and Yuchen Shao and Yueling Zhang and Weikai Miao and Geguang Pu},
  year   = {2025},
  eprint = {2501.09310},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.09310v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.09310.svg)](https://codeofpaper.com/paper/2501.09310)

Discussion