arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2205.07686cs.CL
收藏

CQR-SQL:会话问题重构增强的上下文相关文本到SQL解析器

CQR-SQL: Conversational Question Reformulation Enhanced Context-Dependent Text-to-SQL Parsers

Tencent Cloud Xiaowei(腾讯云小微);Beihang University(北京航空航天大学)

Dongling Xiao, Linzheng Chai, Qian-Wen Zhang, Zhao Yan, Zhoujun Li, Yunbo Cao

摘要:

上下文相关的文本到SQL是将多轮问题转换为与数据库相关的SQL查询的任务。现有的方法通常侧重于充分利用历史上下文或先前预测的SQL来进行当前SQL解析,而忽略了显式地理解模式和会话依赖,如共指,省略和用户焦点变化。在本文中,我们提出了CQR-SQL,它使用辅助会话问题重构(CQR)学习显式地利用模式和解耦上下文依赖SQL解析。具体来说,我们首先提出了一个模式增强递归CQR方法产生领域相关的自包含的问题。其次,通过基于模式的一致性任务和树型结构的SQL解析一致性任务对CQR-SQL模型进行训练,使其能够将多轮问句和辅助自包含问句的语义映射到同一个潜在空间中,通过充分的上下文理解来提高SQL解析的能力。在撰写本文时,我们的CQR-SQL在两个上下文相关的文本到SQL基准测试SParC和CoSQL上取得了最新的结果。

英文摘要:

Context-dependent text-to-SQL is the task of translating multi-turn questions into database-related SQL queries. Existing methods typically focus on making full use of history context or previously predicted SQL for currently SQL parsing, while neglecting to explicitly comprehend the schema and conversational dependency, such as co-reference, ellipsis and user focus change. In this paper, we propose CQR-SQL, which uses auxiliary Conversational Question Reformulation (CQR) learning to explicitly exploit schema and decouple contextual dependency for SQL parsing. Specifically, we first present a schema enhanced recursive CQR method to produce domain-relevant self-contained questions. Secondly, we train CQR-SQL models to map the semantics of multi-turn questions and auxiliary self-contained questions into the same latent space through schema grounding consistency task and tree-structured SQL parsing consistency task, which enhances the abilities of SQL parsing by adequately contextual understanding. At the time of writing, our CQR-SQL achieves new state-of-the-art results on two context-dependent text-to-SQL benchmarks SParC and CoSQL.

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

↑