arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.06193cs.CL
收藏

DocuT5:使用表格文档生成Seq2seq SQL

DocuT5: Seq2seq SQL Generation with Table Documentation

University of Glasgow(格拉斯哥大学)

Elena Soare, Iain Mackie, Jeffrey Dalton

摘要:

当前基于预训练的语言模型的SQL生成器很难回答需要域上下文或理解细粒度表结构的复杂问题。人类将通过对表格的文档进行推理来处理这些未知数。基于这一假设,我们提出了DocuT 5,它使用现成的语言模型架构,并从外部“文档”注入知识,以提高领域泛化。我们在包含跨域和多表的复杂问题的Spider系列数据集上进行实验。具体来说,我们开发了一个新的文本到SQL失败分类,发现19.6%的错误是由于外键错误,49.2%是由于缺乏领域知识。我们提出了DocuT 5,一种从(1)表结构上下文的外键和(2)领域知识通过上下文化表和列捕获知识的方法。这两种类型的知识都比最先进的T5在Spider上进行了约束解码,并且领域知识在Spider-DK和Spider-SYN数据集上产生了最先进的可比有效性。

英文摘要:

Current SQL generators based on pre-trained language models struggle to answer complex questions requiring domain context or understanding fine-grained table structure. Humans would deal with these unknowns by reasoning over the documentation of the tables. Based on this hypothesis, we propose DocuT5, which uses off-the-shelf language model architecture and injects knowledge from external `documentation' to improve domain generalization. We perform experiments on the Spider family of datasets that contain complex questions that are cross-domain and multi-table. Specifically, we develop a new text-to-SQL failure taxonomy and find that 19.6% of errors are due to foreign key mistakes, and 49.2% are due to a lack of domain knowledge. We proposed DocuT5, a method that captures knowledge from (1) table structure context of foreign keys and (2) domain knowledge through contextualizing tables and columns. Both types of knowledge improve over state-of-the-art T5 with constrained decoding on Spider, and domain knowledge produces state-of-the-art comparable effectiveness on Spider-DK and Spider-SYN datasets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑