Saved in:
Bibliographic Details
Main Authors: Shen, Jiawei, Wan, Chengcheng, Qiao, Ruoyi, Zou, Jiazhen, Xu, Hang, Shao, Yuchen, Zhang, Yueling, Miao, Weikai, Pu, Geguang
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2501.09310
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915367477051392
author Shen, Jiawei
Wan, Chengcheng
Qiao, Ruoyi
Zou, Jiazhen
Xu, Hang
Shao, Yuchen
Zhang, Yueling
Miao, Weikai
Pu, Geguang
author_facet Shen, Jiawei
Wan, Chengcheng
Qiao, Ruoyi
Zou, Jiazhen
Xu, Hang
Shao, Yuchen
Zhang, Yueling
Miao, Weikai
Pu, Geguang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2501_09310
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle A Study of In-Context-Learning-Based Text-to-SQL Errors
Shen, Jiawei
Wan, Chengcheng
Qiao, Ruoyi
Zou, Jiazhen
Xu, Hang
Shao, Yuchen
Zhang, Yueling
Miao, Weikai
Pu, Geguang
Computation and Language
Artificial Intelligence
Software Engineering
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.
title A Study of In-Context-Learning-Based Text-to-SQL Errors
topic Computation and Language
Artificial Intelligence
Software Engineering
url https://arxiv.org/abs/2501.09310