# US 2026/0099490 A1 · System and method for conversion of text to structured query language

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0099490 A1
- Document ID: US20260099490A1
- Status: Published application
- Kind: A1
- Application number: 19/347,832
- Filed: 2025-10-02
- Published: 2026-04-09
- Earliest claimed: 2024-10-03
- Assignees: The Governing Council of the University of Toronto
- Applicants: The Governing Council of the University of Toronto
- Inventors: Kaiwen CHEN; Nikolaos KOUDAS; Yueting CHEN; Xiaohui YU
- Web page: https://patentgrep.com/patent/US20260099490A1

## CPC

- G06F 16/24522: {Translation of natural language queries to structured queries}
- G06F 16/211: {Schema design and management}
- G06F 16/243: {Natural language query formulation}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

There is provided a system and method for conversion of natural language text to structured query language query. The method including: receiving a natural language question; linking schema to the received natural language question using a machine learning model, the linking of schema including: determining or predicting one or more branching points each representing deviations of generated tokens from ground truth; and performing a corrective action to replace generated tokens at the branching points; generating a structured query language query using a trained large language model, the large language model taking the natural language question and the schema linked to the received natural language question as input; and outputting the structured query language query.

## Claims

### Claim 1

A computer-implemented method for conversion of natural language text to a structured query language query, the method comprising:
receiving a natural language question;
linking schema to the received natural language question using a machine learning model, wherein generation of the machine learning model comprises:
determining or predicting one or more branching points each representing deviations of generated tokens from ground truth; and
performing a corrective action to replace generated tokens at the branching points;
generating a structured query language query using a trained large language model, the large language model taking as input the natural language question and the schema linked to the received natural language question; and
outputting the structured query language query.

### Claim 2 (depends on 1)

The method of claim 1, wherein the generated tokens comprise units of text representing strings of data of a database schema element.

### Claim 3 (depends on 1)

The method of claim 1, wherein for determination of the one or more branching points, the ground truth comprises ground truth tokens, the ground truth tokens comprising a set of column and table names in the training data that are correct for given text queries in the training data.

### Claim 4 (depends on 3)

The method of claim 3, wherein the corrective action comprises replacing the generated token with a corresponding correct ground truth token.

### Claim 5 (depends on 1)

The method of claim 1, wherein prediction of the one or more branching points comprises predicting when each of the generated tokens deviate from a respective correct ground truth token.

### Claim 6 (depends on 5)

The method of claim 5, wherein predicting when each of the generated tokens deviate from the respective correct ground truth token comprises using one or more classifier models, and wherein generation of the token comprises using the results of the one or more classifier models to quantify the probability that the generated token is a branching point.

### Claim 7 (depends on 6)

The method of claim 6, wherein the one or more classifier models are provided for each hidden state of the machine learning model.

### Claim 8 (depends on 7)

The method of claim 7, wherein each classifier model is trained using a training set of hidden state vectors for each generated token in the training set and a corresponding set of boolean variables indicating a ground truth value of whether such token corresponds to a branching point.

### Claim 9 (depends on 1)

The method of claim 1, wherein generation of the machine learning model further comprises ceasing generation of the model and performing self-correction or soliciting human intervention using table trace back, the table trace back determines a difference between a decoder function computed on a sequence of tokens before and after the branching point.

### Claim 10 (depends on 9)

The method of claim 9, wherein the corrective action comprises using a surrogate model to confirm relevance of the tables determined from the table trace back to the structured query language query.

### Claim 11

A system for conversion of natural language text to a structured query language query, the system comprising one or more processing units and a data memory, the data memory comprising instructions for the one or more processing units to execute:
an input module to receive a natural language question;
a schema module to link schema to the received natural language question using a machine learning model, wherein generation of the machine learning model comprises:
determining or predicting one or more branching points each representing deviations of generated tokens from ground truth; and
performing a corrective action to replace generated tokens at the branching points;
a translation module to generate a structured query language query using a trained large language model, the large language model taking as input the natural language question and the schema linked to the received natural language question; and
an output module to output the structured query language query.

### Claim 12 (depends on 11)

The system of claim 11, wherein the generated tokens comprise units of text representing strings of data of a database schema element.

### Claim 13 (depends on 11)

The system of claim 11, wherein for determination of the one or more branching points, the ground truth comprises ground truth tokens, the ground truth tokens comprising a set of column and table names in the training data that are correct for given text queries in the training data.

### Claim 14 (depends on 13)

The system of claim 13, wherein the corrective action comprises replacing the generated token with a corresponding correct ground truth token.

### Claim 15 (depends on 11)

The system of claim 11, wherein prediction of the one or more branching points by the schema module comprises predicting when each of the generated tokens deviate from a respective correct ground truth token.

### Claim 16 (depends on 15)

The system of claim 15, wherein predicting when each of the generated tokens deviate from the respective correct ground truth token comprises using one or more classifier models, and wherein generation of the token comprises using the results of the one or more classifier models to quantify the probability that the generated token is a branching point.

### Claim 17 (depends on 16)

The system of claim 16, wherein the one or more classifier models are provided for each hidden state of the machine learning model.

### Claim 18 (depends on 17)

The system of claim 17, wherein each classifier model is trained using a training set of hidden state vectors for each generated token in the training set and a corresponding set of boolean variables indicating a ground truth value of whether such token corresponds to a branching point.

### Claim 19 (depends on 11)

The system of claim 11, wherein generation of the machine learning model by the schema module further comprises ceasing generation of the model and performing self-correction or soliciting human intervention using table trace back, the table trace back determines a difference between a decoder function computed on a sequence of tokens before and after the branching point.

### Claim 20

Non-transitory computer-readable medium storing instructions that, when executed by one or more processing units, cause the one or more processing units to perform operations comprising:
receiving a natural language question;
linking schema to the received natural language question using a machine learning model, wherein generation of the machine learning model comprises:
determining or predicting one or more branching points each representing deviations of generated tokens from ground truth; and
performing a corrective action to replace generated tokens at the branching points;
generating a structured query language query using a trained large language model, the large language model taking as input the natural language question and the schema linked to the received natural language question; and
outputting the structured query language query.
