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.
翻译:以环境为主的文本到 SQL 是将多方向问题转换为与数据库有关的 SQL 查询的任务。 现有方法通常侧重于充分利用历史背景或先前预测的 SQL 进行当前 SQL 解析,而忽视明确理解模式和对话依赖性,例如共同参照、省略和用户焦点变化。 在本文中,我们提议CQR-SQL,使用辅助对话问题重整(CQR)学习为 SQL 进行分解,以明确利用系统化和调和环境依赖性。具体地说,我们首先提出一种经过强化的循环CQR 方法,以产生与领域相关的自足问题。 其次,我们培训CQR-SQL 模型,通过系统定位一致性任务和树型重整 SQL 分解任务,将多方向问题和辅助自足问题混入同一潜在空间,从而通过适当的背景理解提高SQL 状态分辨能力。 在撰写文件时,我们CR-S-L-S-C-C-S-C-C-C-C-C-C-C-C-C-C-C-C-Base-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C-C