Text-to-SQL AI Chat for Multi-Source Data Retrieval

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Interacting with SQL databases can be challenging due to complex query requirements and the need for specialized knowledge, making it difficult for users to effectively obtain data without writing and executing SQL code.

Innovation Solution

A computing system utilizing a generative artificial intelligence chat system to process natural language questions, generating SQL code and retrieving data from SQL databases, with the ability to combine results from multiple data sources and provide user-friendly responses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If users directly query SQL databases using natural language, then ease of operation is improved, but the system must generate and execute SQL code which increases device complexity

Engineering Contradiction:
Improveease of data retrievalVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent introduces a large language model as an intermediary between the user's natural language query and the SQL database. The LLM translates natural language into SQL code, which is then executed by a database executor. This mediator handles the complexity of SQL generation and execution, allowing users to interact with the database using simple natural language while the system manages the sophisticated translation and execution processes in the background.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If the system integrates multiple data sources, then adaptability is improved, but device complexity increases due to managing multiple data sources and metadata

Engineering Contradiction:
Improvedata source integrationVSAvoidsystem complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal data source interface that can handle multiple types of data sources (SQL databases, non-SQL databases, APIs, files) through a common architecture. The system uses a unified metadata schema and standardized connection handling that works across different data source types. This multi-functional approach allows the system to adapt to various data sources without requiring separate complex handling logic for each type, thereby improving versatility while controlling complexity through standardization.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Loss of information

If the system combines results from multiple data sources, then information completeness is improved, but processing time increases due to retrieving and comparing results from multiple sources

Engineering Contradiction:
Improveinformation completenessVSAvoidprocessing time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The patent performs preliminary actions by first identifying which data sources are relevant to the user's query before actually querying them. The system analyzes the natural language question, determines the necessary data sources based on the query requirements, and then selectively queries only those relevant sources. This preliminary identification step prevents unnecessary queries to irrelevant data sources, reducing overall processing time while still ensuring that all necessary information is retrieved from the appropriate sources.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20260044501A1Computing systems and methods for a text-to-SQL generative artificial intelligence chat using multiple data sources
Publication Date: 2026.02.12 THE TORONTO DOMINION BANK
  • US20260044501A1 patent drawing
  • US20260044501A1 patent drawing
  • US20260044501A1 patent drawing

AI summary

Systems and methods are provided for processing a natural language question using structured query language (SQL). A computing system receives a natural language question, generates a prompt with a database schema corresponding to a database, identifies relevant tables, and generates an augmented prompt with table identities. A SQL large language model (LLM) generates SQL code, which is executed on the database, and a result from the database is obtained. Additional data sources and additional metadata are retrieved to obtain an additional result. The additional result and the result are used to generate a result message, which is provided in response to the natural language question.