Table of Contents
Fetching ...

SQLucid: Grounding Natural Language Database Queries with Interactive Explanations

Yuan Tian, Jonathan K. Kummerfeld, Toby Jia-Jun Li, Tianyi Zhang

TL;DR

SQLucid is introduced, a novel user interface that bridges the gap between non-expert users and complex database querying processes and addresses existing limitations by integrating visual correspondence, intermediate query results, and editable step-by-step SQL explanations in natural language to facilitate user understanding and engagement.

Abstract

Though recent advances in machine learning have led to significant improvements in natural language interfaces for databases, the accuracy and reliability of these systems remain limited, especially in high-stakes domains. This paper introduces SQLucid, a novel user interface that bridges the gap between non-expert users and complex database querying processes. SQLucid addresses existing limitations by integrating visual correspondence, intermediate query results, and editable step-by-step SQL explanations in natural language to facilitate user understanding and engagement. This unique blend of features empowers users to understand and refine SQL queries easily and precisely. Two user studies and one quantitative experiment were conducted to validate SQLucid's effectiveness, showing significant improvement in task completion accuracy and user confidence compared to existing interfaces. Our code is available at https://github.com/magic-YuanTian/SQLucid.

SQLucid: Grounding Natural Language Database Queries with Interactive Explanations

TL;DR

SQLucid is introduced, a novel user interface that bridges the gap between non-expert users and complex database querying processes and addresses existing limitations by integrating visual correspondence, intermediate query results, and editable step-by-step SQL explanations in natural language to facilitate user understanding and engagement.

Abstract

Though recent advances in machine learning have led to significant improvements in natural language interfaces for databases, the accuracy and reliability of these systems remain limited, especially in high-stakes domains. This paper introduces SQLucid, a novel user interface that bridges the gap between non-expert users and complex database querying processes. SQLucid addresses existing limitations by integrating visual correspondence, intermediate query results, and editable step-by-step SQL explanations in natural language to facilitate user understanding and engagement. This unique blend of features empowers users to understand and refine SQL queries easily and precisely. Two user studies and one quantitative experiment were conducted to validate SQLucid's effectiveness, showing significant improvement in task completion accuracy and user confidence compared to existing interfaces. Our code is available at https://github.com/magic-YuanTian/SQLucid.
Paper Structure (38 sections, 14 figures, 6 tables)

This paper contains 38 sections, 14 figures, 6 tables.

Figures (14)

  • Figure 1: The iterative SQL refinement pipeline of SQLucid
  • Figure 2: The user interface of SQLucid. (A) The Database panel allows users to switch databases and tables in a database. It also allows users to manually inspect, search, and filter data. (B) The Question panel allows users to ask a question to the database in natural language. (C) The Query Result panel shows the query result as well as the intermediate result of individual steps when the user clicks each step. (D) The Query Explanation panel renders the step-by-step SQL explanation in natural language. Users can directly edit the explanation to fix the incorrect behavior in a step, add new steps, or delete existing steps.
  • Figure 3: (A) Hover over a table name and SQLucid automatically switches to the corresponding table and highlights it. (B) Hover over a column name and SQLucid automatically highlights the entire column.
  • Figure 4: When clicking on the step number, the Query Result view will visualize the intermediate result after the selected step.
  • Figure 5: Interacting with the step-by-step explanation
  • ...and 9 more figures