IP Library Granted Patent US 12681921
Granted Patent B2
US 12681921 · App. 18/991,674 · Granted Jul 14, 2026

Text-to-structured query language query generation using profile-enhanced schema linking

Inventors: Theodore Johnson (New York, NY); Vladislav Shkapenyuk (New York, NY)
Assignee: AT&T Intellectual Property I, L.P.
G06F16/2423G06F16/2471
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12681921
App. No.
18/991,674
Granted
Jul 14, 2026
Kind
B2
Abstract

A method includes receiving a question phrased in natural language and related to data stored in a table of a structured query language database, wherein the table includes a plurality of fields containing a plurality of values, selecting a schema variant of a plurality of schema variants to apply to the question, converting the question to a structured query language query using a language model and applying a context of the schema variant, extracting a subset of the plurality of fields and a set of literals from the structured query language query, and defining a schema to be linked to the question as all subsets of the plurality of fields collected from all structured query language queries of a plurality of structured query language queries, wherein each structured query language query was generated by the language model using a different schema variant of the plurality of schema variants.

Claims (40)

1 . A method comprising:

receiving, by a processing system including at least one processor, a question phrased in natural language and related to data stored in a table of a structured query language database, wherein the table includes a plurality of fields containing a plurality of values;

selecting, by the processing system, a schema variant of a plurality of schema variants to apply to the question;

converting, by the processing system, the question to a structured query language query using a language model and applying a context of the schema variant;

extracting, by the processing system, a subset of the plurality of fields and a set of literals from the structured query language query;

modifying, by the processing system, the structured query language query to use at least one additional field not contained in the subset of the plurality of fields, wherein the at least one additional field contains at least one literal of the set of literals; and

defining, by the processing system, a schema to be linked to the question as all subsets of the plurality of fields collected from all structured query language queries of a plurality of structured query language queries, wherein each structured query language query of the plurality of structured query language queries was generated by the language model using a different schema variant of the plurality of schema variants.

2 . The method of claim 1 , wherein the plurality of schema variants comprises: a focused schema, minimal profile; a focused schema, maximal profile; a full schema, minimal profile; a full schema, maximal profile; and a focused schema, full profile.

3 . The method of claim 2 , wherein the focused schema comprises at least one field of the plurality of fields which is textually similar to the question, based on string similarity indices on the at least one field.

4 . The method of claim 3 , wherein the focused schema further comprises at least one field of the plurality of fields which includes at least one literal of the set of literals.

5 . The method of claim 2 , wherein the full schema comprises all fields in all tables of the structured query language database.

6 . The method of claim 2 , wherein the minimal profile comprises a one-sentence, text-based natural language description of a field of the plurality of fields.

7 . The method of claim 2 , wherein the maximal profile comprises a multi-sentence, text-based natural language description of a field of the plurality of fields.

8 . The method of claim 2 , wherein the full profile comprises a description of a field of the plurality of fields that is based on subject matter expert-supplied metadata.

9 . The method of claim 8 , wherein the full profile further comprises natural language paraphrasing of the subject matter expert-supplied metadata.

10 . The method of claim 1 , further comprising repeating the receiving, the selecting, the converting, the extracting, and the defining for each of the plurality of schema variants.

11 . The method of claim 1 , wherein the at least one additional field is included in the schema.

12 . The method of claim 1 , wherein the at least one literal does not occur in any field of the subset of the plurality of fields.

13 . A non-transitory computer readable medium storing instructions which, when executed by a processing system including at least one processor, cause the processing system to perform operations, the operations comprising:

receiving a question phrased in natural language and related to data stored in a table of a structured query language database, wherein the table includes a plurality of fields containing a plurality of values;

selecting a schema variant of a plurality of schema variants to apply to the question;

converting the question to a structured query language query using a language model and applying a context of the schema variant;

extracting a subset of the plurality of fields and a set of literals from the structured query language query;

modifying the structured query language query to use at least one additional field not contained in the subset of the plurality of fields, wherein the at least one additional field contains at least one literal of the set of literals; and

defining a schema to be linked to the question as all subsets of the plurality of fields collected from all structured query language queries of a plurality of structured query language queries, wherein each structured query language query of the plurality of structured query language queries was generated by the language model using a different schema variant of the plurality of schema variants.

14 . The non-transitory computer readable medium of claim 13 , wherein the plurality of schema variants comprises: a focused schema, minimal profile; a focused schema, maximal profile; a full schema, minimal profile; a full schema, maximal profile; and a focused schema, full profile.

15 . The non-transitory computer readable medium of claim 14 , wherein the focused schema comprises at least one field of the plurality of fields which is textually similar to the question, based on string similarity indices on the at least one field.

16 . The non-transitory computer readable medium of claim 15 , wherein the focused schema further comprises at least one field of the plurality of fields which includes at least one literal of the set of literals.

17 . The non-transitory computer readable medium of claim 14 , wherein the full schema comprises all fields in all tables of the structured query language database.

18 . The non-transitory computer readable medium of claim 14 , wherein the minimal profile comprises a one-sentence, text-based natural language description of a field of the plurality of fields, and the maximal profile comprises a multi-sentence, text-based natural language description of a field of the plurality of fields.

19 . The non-transitory computer readable medium of claim 14 , wherein the full profile comprises a description of a field of the plurality of fields that is based on subject matter expert-supplied metadata.

20 . A system comprising:

a processing system comprising at least one processor; and

a non-transitory computer readable medium storing instructions which, when executed by the processing system, cause the processing system to perform operations, the operations comprising:

receiving a question phrased in natural language and related to data stored in a table of a structured query language database, wherein the table includes a plurality of fields containing a plurality of values;

selecting a schema variant of a plurality of schema variants to apply to the question;

converting the question to a structured query language query using a language model and applying a context of the schema variant;

extracting a subset of the plurality of fields and a set of literals from the structured query language query;

modifying the structured query language query to use at least one additional field not contained in the subset of the plurality of fields, wherein the at least one additional field contains at least one literal of the set of literals; and

defining a schema to be linked to the question as all subsets of the plurality of fields collected from all structured query language queries of a plurality of structured query language queries, wherein each structured query language query of the plurality of structured query language queries was generated by the language model using a different schema variant of the plurality of schema variants.