Tooling Framework for Instantiating Natural Language Querying System

Manasa Jammi, Jaydeep Sen, Ashish R. Mittal, Sagar Verma, Vardaan Pahuja, Rema Ananthanarayanan, Pranay Lohia, Hima Karanam, Diptikalyan Saha, Karthik SankaranarayananPVLDB 2018

TL;DR

This paper introduces a framework that significantly simplifies the creation of Natural Language Querying (NLQ) systems. It tackles the challenge of connecting NLQ interfaces to diverse data sources and formats with minimal manual configuration, making powerful data exploration accessible to a wider audience.

What Problem Does This Paper Address?

Natural Language Interfaces to Databases (NLIDBs) promise a world where users can query data using everyday language, bypassing the need to learn complex query languages like SQL. However, building these systems has historically been a complex and brittle process. Existing systems often require extensive manual configuration, including defining ontologies, domain vocabularies, and mappings between them and the data sources. This paper addresses the significant gap in making NLIDB systems practical and easy to instantiate across a wide variety of data sources, formats, and even for users who start with their data rather than a pre-defined ontology. The core challenge is to automate the laborious setup process, enabling seamless querying with minimal human intervention.

Methods

The paper presents a tooling framework that extends the existing ATHENA NLIDB system. The key innovation lies in its ability to handle two primary "flows":

  • Data-First Flow: Users can provide raw data files (e.g., Excel, CSV, HTML, PDF) or point to existing data stores (RDBMS, Graph, RDF, Document stores). The framework then automatically infers an ontology and domain vocabulary from this data.
  • Ontology-First Flow: Users can provide an existing domain ontology, and the framework helps map it to their data.

To achieve this, the framework introduces several novel components and techniques:

  • Unified Data Representation (UDR): An intermediate representation is inferred from various data sources. This UDR captures classes, features (properties), instances, and crucial constraints (e.g., isMarkedAsID, isUnique, isAutoIncremented, countOfUniqueValues).
  • Ontology Derivation: A two-phase approach is used to infer ontologies from the UDR. This includes identifying concepts, properties, and inferring relationships like functional, isA, and union.
  • Domain Vocabulary Enhancement: Public APIs like WordNet and PPDB are used to automatically generate synonyms for ontology elements. This is crucial for robust mapping of natural language queries.
  • Configuration Inference: The framework aims to automatically infer necessary configurations (e.g., key, default time, default group by properties) that ATHENA requires.
  • OQL Translators: The framework translates the intermediate Ontology Query Language (OQL) into specific query languages for different backend stores (e.g., SPARQL for RDF, Gremlin for Graph).

Datasets

The paper does not explicitly list or introduce specific benchmark datasets for training or evaluation. Instead, it focuses on demonstrating the framework's applicability using a hypothetical scenario from the healthcare domain involving an Excel file with drug information. The framework is designed to work with any structured data source.

Key Insights and Ideas

  • Democratizing NLQ: The most significant insight is that the complexity of setting up NLQ systems can be drastically reduced through automation, making this technology accessible beyond specialized NLP researchers.
  • Data-First is Key: Enabling users to start with their data, rather than requiring them to first build an ontology, is a critical step towards broader adoption.
  • UDR as a Unifying Abstraction: The Unified Data Representation is a clever way to abstract away the specifics of different data sources, allowing for a generalized ontology inference process.
  • Vocabulary is King: The automatic enrichment of domain vocabulary with synonyms is vital for handling the inherent ambiguity of natural language.
  • Extensibility is Crucial: The framework's ability to translate OQL to various backend query languages highlights the importance of modularity and extensibility in building robust data integration systems.

Key Results

The paper demonstrates the framework's functionality through a detailed demo scenario. For instance, a query like "How expensive is the medicine Paracetamol?" is processed. The tool successfully identifies "expensive" as a synonym for "cost" and "medicine" for "drug." It also handles cases where direct matches aren't present, like "Paracetamol" not being in the raw data but inferring it from its IUPAC name, requiring manual synonym addition for full resolution. A subsequent query, "Show me the costliest medicine per type," is translated into a SQL query with MAX and GROUP BY clauses, and the results are visualized. The paper emphasizes that the framework successfully addresses the challenges of multiple flows, multiple data sources, and automated ontology/vocabulary derivation.

Limitations and Future Work

  • Manual Intervention for Specificity: While the framework automates much of the process, highly domain-specific terms (like the IUPAC name for Paracetamol) may still require manual synonym addition by the user.
  • Configuration Inference Complexity: The paper notes that automatically inferring certain configurations is a challenging task requiring deep semantic understanding of the data model, and their inference is not detailed in this paper.
  • Visualization: While the framework integrates with a visualization engine, the paper acknowledges that automatically generating the most appropriate graph or chart is an ongoing area of research.
  • Incremental Updates: The paper mentions the need for seamless handling of incremental updates to ontologies and data, which is addressed through database triggers and TI refreshing.
  • Future Work: The authors suggest extending access to more structured backends and further automating the inference of configurations and visualizations.

Summary updated

BibTeX
@article{jammi2018tooling,
  author = {Manasa Jammi and Jaydeep Sen and Ashish R. Mittal and Sagar Verma and Vardaan Pahuja and Rema Ananthanarayanan and Pranay Lohia and Hima Karanam and Diptikalyan Saha and Karthik Sankaranarayanan},
  title = {{Tooling Framework for Instantiating Natural Language Querying System}},
  journal = {Proc. VLDB Endow.},
  year = {2018},
  url = {https://openreview.net/forum?id=3OvX--F0H-A},
}
Figure