Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questions

Paper · Source
Question Answering and Search

We focus on the cross-domain contextdependent text-to-SQL generation task. Based on the observation that adjacent natural language questions are often linguistically dependent and their corresponding SQL queries tend to overlap, we utilize the interaction history by editing the previous predicted query to improve the generation quality. Our editing mechanism views SQL as sequences and reuses generation results at the token level in a simple manner. It is flexible to change individual tokens and robust to error propagation. Furthermore, to deal with complex table structures in different domains, we employ an utterance-table encoder and a table-aware decoder to incorporate the context of the user utterance and the table schema. We evaluate our approach on the SParC dataset and demonstrate the benefit of editing compared with the state-of-the-art baselines which generate SQL from scratch. Our code is available at https://github.com/ ryanzhumich/sparc_atis_pytorch.

Introduction. Generating SQL queries from user utterances is an important task to help end users acquire information from databases. In a real-world application, users often access information in a multi-turn interaction with the system by asking a sequence of related questions. As the interaction proceeds, the user often makes reference to the relevant mentions in the history or omits previously conveyed information assuming it is known to the system. Therefore, in the context-dependent scenario, the contextual history is crucial to understand the follow-up questions from users, and the system often needs to reproduce partial sequences generated in previous turns. Recently, Suhr et al. (2018) proposes a context-dependent text-to-SQL model including an interaction-level encoder and an attention mechanism over previous utterances. To reuse what has been generated, they propose to copy complete segments from the previous query.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

What enables conversational agents to guide rather than just respond? Why do language models struggle to implement user intent accurately from prompts? Does AI assistance erode cognitive skills while inflating perceived competence? What prediction granularity best trains models to generate reliable reasoning? How does diversity prevent model convergence on superficial patterns? Do language models encode knowledge that influences generation, or primarily imitate surface patterns? Why does AI verification capability persistently exceed generation capability? What limits language model accuracy in evaluating ideas? How reliably can humans and AI detectors identify machine-generated text? How effectively can test-time voting aggregate diverse reasoning samples? Does augmenting symbolic reasoning improve LLM logical reasoning ability? Why do retrieval-augmented generation systems fail in practice despite sound architecture? How should retrieval strategies adapt to multi-step reasoning demands? How can persistent memory architectures preserve information across ultra-long contexts? Should agents compress episodic memory or retain raw interaction histories? Do AI coding tools measurably improve developer productivity and code quality? What structural patterns sustain successful multi-turn dialogue and prevent breakdown?