Natural Language Interfaces with Interpretable SQL for Cross-Database Transfer

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing natural language database interfaces (NLDB) face challenges in achieving high accuracy for cross-database queries, leading to mistrust from users due to high error rates and opacity, and lack the ability to easily transfer to new databases without a domain-specific corpus.

Innovation Solution

A system with a semantic parser that generates interpretable SQL queries, uses a hybrid of synchronous context-free grammars for explanations, and includes a safe-guard module to detect out-of-domain and hard-to-answer questions, allowing users to verify the correctness of the queries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If natural language to SQL translation is performed without domain-specific corpus, then cross-database transferability is improved, but translation accuracy deteriorates

Engineering Contradiction:
Improvecross-database transferabilityVSAvoidtranslation accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The system performs preliminary analysis of the target database schema and generates database-specific guidance information before executing the natural language to SQL translation. This preliminary action enables the system to adapt to new databases without requiring domain-specific training corpora, while maintaining high translation accuracy through pre-computed schema insights.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary component that generates database-specific guidance information acting as a bridge between the natural language query and the target database schema. This intermediary translates general natural language intent into database-specific SQL queries by leveraging pre-analyzed schema characteristics, thereby enabling accurate cross-database transfer without domain-specific corpora.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If traditional NLDB systems are used, then simplicity of interface is improved, but user trust deteriorates due to high error rates and opacity

Engineering Contradiction:
Improveinterface simplicityVSAvoiduser trust
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The system implements a feedback mechanism that provides users with explanations of the generated SQL queries and allows them to request modifications. This feedback loop increases user trust by making the system's reasoning transparent while maintaining interface simplicity, as users can verify the correctness of queries before execution without needing to understand complex database operations.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent enables users to self-correct or modify generated SQL queries through an intuitive interface. Users can request changes to the generated queries and the system will regenerate appropriate SQL statements, allowing users to take control when needed while maintaining the simplicity of natural language interaction for routine queries.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12399892B2System and method for transferable natural language interface
Publication Date: 2025.08.26 ROYAL BANK OF CANADA
  • US12399892B2 patent drawing
  • US12399892B2 patent drawing
  • US12399892B2 patent drawing

AI summary

A computer system and method for answering a natural language question is provided. The system comprises at least one processor and a memory storing instructions which when executed by the processor configure the processor to perform the method. The method comprises receiving a natural language question, generating a SQL query based on the natural language question, generating an explanation regarding a solution to the natural language question as answered by the SQL query, and presenting the solution and the explanation.