Text-to-SQL Error Correction with Language Models of Code
Text-to-SQL Error Correction with Language Models of Code
复制标题
DOI:
10.48550/arxiv.2305.13073
复制
发表时间:
2023-05
期刊:
影响因子:
--
通讯作者:
Ziru Chen;Shijie Chen;Michael White;R. Mooney;Ali Payani;Jayanth Srinivasa;Yu Su;Huan Sun
中科院分区:
文献类型:
--
作者:
Ziru Chen;Shijie Chen;Michael White;R. Mooney;Ali Payani;Jayanth Srinivasa;Yu Su;Huan Sun
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 language models 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 language models 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.