# Bridging the Semantic Gap with SQL Query Logs in Natural Language   Interfaces to Databases

**Authors:** Christopher Baik, H. V. Jagadish, Yunyao Li

arXiv: 1902.00031 · 2019-04-16

## TL;DR

This paper introduces Templar, a system that uses SQL query logs to improve natural language interfaces to databases by addressing keyword mapping and join path inference, significantly boosting accuracy.

## Contribution

The paper presents a novel approach leveraging SQL query logs to enhance NLIDB performance, with a system that can augment existing interfaces and improve accuracy.

## Key findings

- Up to 138% improvement in top-1 accuracy
- Effective use of SQL query logs for semantic gap bridging
- Significant enhancement over baseline NLIDBs

## Abstract

A critical challenge in constructing a natural language interface to database (NLIDB) is bridging the semantic gap between a natural language query (NLQ) and the underlying data. Two specific ways this challenge exhibits itself is through keyword mapping and join path inference. Keyword mapping is the task of mapping individual keywords in the original NLQ to database elements (such as relations, attributes or values). It is challenging due to the ambiguity in mapping the user's mental model and diction to the schema definition and contents of the underlying database. Join path inference is the process of selecting the relations and join conditions in the FROM clause of the final SQL query, and is difficult because NLIDB users lack the knowledge of the database schema or SQL and therefore cannot explicitly specify the intermediate tables and joins needed to construct a final SQL query. In this paper, we propose leveraging information from the SQL query log of a database to enhance the performance of existing NLIDBs with respect to these challenges. We present a system Templar that can be used to augment existing NLIDBs. Our extensive experimental evaluation demonstrates the effectiveness of our approach, leading up to 138% improvement in top-1 accuracy in existing NLIDBs by leveraging SQL query log information.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1902.00031/full.md

## Figures

11 figures with captions in the complete paper: https://tomesphere.com/paper/1902.00031/full.md

## References

44 references — full list in the complete paper: https://tomesphere.com/paper/1902.00031/full.md

---
Source: https://tomesphere.com/paper/1902.00031