Efficient Deployment of Conversational Natural Language Interfaces over Databases (2020)

Abstract: Many users communicate with chatbots and AI assistants in order to help them with various tasks. A key component of the assistant is the ability to understand and answer a user’s natural language questions for question-answering (QA). Because data can be usually stored in a structured manner, an essential step involves turning a natural language question into its corresponding query language. However, in order to train most natural language-to-query-language state-of-the-art models, a large amount of training data is needed first. In most domains, this data is not available and collecting such datasets for various domains can be tedious and time-consuming. In this work, we propose a novel method for accelerating the training dataset collection for developing the natural language-to-query-language machine learning models. Our system allows one to generate conversational multi-term data, where multiple turns define a dialogue session, enabling one to better utilize chatbot interfaces. We train two current state-of-the-art NL-to-QL models, on both an SQL and SPARQL-based datasets in order to showcase the adaptability and efficacy of our created data.

## introduction chatbots and ai task assistants are widely used today to help users with their everyday needs. one use for these assistants is asking them questions on various areas of knowledge or how to accomplish different tasks @xcite . because data is usually stored in a structured database, in order to answer a user's questions, it is essential that the system should first understand the question, and convert it into a structured language query, such as sql or sparql, to fetch the correct answer. while much research has focused on translating natural languages into query lan-turn 1: who are the employees that work in the it department and have the last name smith? turn 2: how many of them started working after jan 1, 2020? turn 3: what are their phone numbers? turn 1:select name from employees where @xmath0; turn 2:select count(name) from employees where @xmath1; turn 3:select phone_number from employees where @xmath2; ## related work in the field of natural language interfaces for structured data there are bodies of work that 1) focus on translating natural language to a specific query language and that 2) relate to collecting semantic parsing data for natural language interfaces. ## data collection system our conversational data collection strategy is developed to efficiently collect nl/ql pairs for training data in models which translate the nl into ql in a multi-turn setting. because domain data is required when training a chatbot to query a database when converting from nl to ql, our approach is generalized so that one can easily collect data for their respective domain. ## data examples in this section we will showcase examples in both the sql and sparql domain and traverse through each stage of our data collection system. we first begin with sql, used to query relational databases, and then demonstrate our system with a graph querying language, sparql. by doing so, we show the extendability of our approach to various structured qls. moreover, we confirm the importance of generating executable queries in a conversational data collection system. ## experiments we will now examine our experiments with a relational and graph database setting. we first briefly discuss the data used in constructing the converstational dataset and then describe the various models utilized in translating the nl questions into their respective structured queries. ## results we evaluated the models on our generated datasets for exact-match accuracy of the sql/sparql output queries. the results (shown in ## conclusion in this work, we propose a conversational data collection system which accelerates the deployment of conversational natural language interface applications which utilize structured data. we describe the three main processes of our system, including the lf dialog generator, the nl-ql generator, and the paraphrase component. by taking in a domain ontology, lexicon, and structured database as input, our system generates nl-ql multi-turn pairs which can be used to train systems that translate nl to ql. each component of our system is examined in both the sql and sparql ql domain. we then validate our data by training state-of-the-art nl to ql models on single-turn utterances. our experiments show promising results in both the sql and sparql domains, while providing an efficient method to generate data for the development of multi-turn models.