Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Text-to-SQL Error Correction with Language Models of Code (2305.13073v2)

Published 22 May 2023 in cs.CL, cs.AI, cs.DB, and cs.LG

Abstract: Despite recent progress in text-to-SQL parsing, current semantic parsers are still not accurate enough for practical use. In this paper, we investigate how to build automatic text-to-SQL error correction models. Noticing that token-level edits are out of context and sometimes ambiguous, we propose building clause-level edit models instead. Besides, while most LLMs of code are not specifically pre-trained for SQL, they know common data structures and their operations in programming languages such as Python. Thus, we propose a novel representation for SQL queries and their edits that adheres more closely to the pre-training corpora of LLMs of code. Our error correction model improves the exact set match accuracy of different parsers by 2.4-6.5 and obtains up to 4.3 point absolute improvement over two strong baselines. Our code and data are available at https://github.com/OSU-NLP-Group/Auto-SQL-Correction.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (8)
  1. Ziru Chen (20 papers)
  2. Shijie Chen (14 papers)
  3. Michael White (10 papers)
  4. Raymond Mooney (21 papers)
  5. Ali Payani (48 papers)
  6. Jayanth Srinivasa (23 papers)
  7. Yu Su (138 papers)
  8. Huan Sun (88 papers)
Citations (8)
X Twitter Logo Streamline Icon: https://streamlinehq.com