IP Library Granted Patent US 12699924
Granted Patent B2
US 12699924 · App. 17/957,006 · Granted Aug 4, 2026

Natural language query processing based on machine learning to perform a task

Inventors: Bryson Chisholm (Stevensville, CA); Shikhar Kwatra (San Jose, CA); Shaikh Shahriar Quader (Oshawa, CA); Ayesha Bhangu (Whitby, CA); Jack Zhang (Unionville, CA); Shabana Dhayananth (Brampton, CA); Tarandeep Kaur Randhawa (Stratford, CA)
Assignee: International Business Machines Corporation
G06N20/00G06F16/3344
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 12699924
App. No.
17/957,006
Granted
Aug 4, 2026
Kind
B2
Abstract

An embodiment of the present invention extracts information from a natural language query requesting performance of a task. A machine learning model determines a task that corresponds to the task requested by the natural language query based on the extracted information. A query is generated for retrieving data from a plurality of different data sources based on the extracted information. The data for the determined task is retrieved from the plurality of different data sources based on the generated query. The determined task is performed using the retrieved data. Present invention embodiments include a method, system, and computer program product for processing a natural language query in substantially the same manner described above.

Claims (79)

1 . A method of processing a natural language query requesting performance of a task, the method comprising:

training, via at least one processor, a machine learning model of the at least one processor using natural language expression templates with placeholders for attributes,

wherein the natural language expression templates are used to train the machine learning model to map natural language expressions to one or more tasks, wherein each task, of the one or more tasks, is associated with a corresponding template routine including instructions or code statements for performing a corresponding task;

extracting, via the at least one processor, information from the natural language query;

determining, via the machine learning model and based on the extracted information, a task that corresponds to the performance of the task requested by the natural language query;

generating, via the at least one processor, a query for retrieving data from a plurality of different data sources based on the extracted information;

retrieving, via the at least one processor, the data for the determined task from the plurality of different data sources based on the generated query;

preprocessing, via the at least one processor, the retrieved data into a format appropriate for performing the determined task based on requirements of a platform or service for performing the determined task, wherein preprocessing the retrieved data comprises:

applying a rules-based approach that selects one or more query templates based on conditions satisfied by the extracted information, and

replacing placeholders in the selected one or more query templates with data asset attributes derived from a knowledge catalog; and

performing, via the at least one processor, the determined task using the retrieved data and a template routine corresponding to the determined task.

2 . The method of claim 1 , wherein the performance of the task requested by the natural language query includes generating a target machine learning model.

3 . The method of claim 2 , wherein performing the determined task comprises:

generating the target machine learning model; and

training the target machine learning model using the retrieved data as training data.

4 . The method of claim 2 , further comprising:

deploying, via the at least one processor, the target machine learning model to a desired environment.

5 . The method of claim 1 , further comprising:

determining, via the at least one processor, one or more suggestions to complete the natural language query in response to receiving a partial query.

6 . The method of claim 5 , wherein determining one or more suggestions comprises:

classifying data assets and corresponding content from the plurality of different data sources into topics based on a machine learning topic model, wherein keywords are associated with the topics;

classifying the natural language query into the topics based on the machine learning topic model; and

determining, via a machine learning prediction model, one or more keywords of the topics of the natural language query to serve as the one or more suggestions based on the task requested by the natural language query and the extracted information.

7 . The method of claim 1 , further comprising:

generating, via the at least one processor, training data including the natural language expression templates with the placeholders replaced with attributes from an operational environment; and

re-training, via the at least one processor, the machine learning model with the training data to customize the machine learning model for the operational environment.

8 . A system for processing a natural language query requesting performance of a task, the system comprising:

one or more memories; and

at least one processor coupled to the one or more memories, the at least one processor configured to:

train a machine learning model using natural language expression templates with placeholders for attributes,

wherein the natural language expression templates are used to train the machine learning model to map natural language expressions to one or more tasks, wherein each task, of the one or more tasks, is associated with a corresponding template routine including instructions or code statements for performing a corresponding task;

extract information from the natural language query;

determine, via the machine learning model and based on the extracted information, a task that corresponds to the performance of the task requested by the natural language query;

generate a query for retrieving data from a plurality of different data sources based on the extracted information;

retrieve the data for the determined task from the plurality of different data sources based on the generated query;

preprocess the retrieved data into a format appropriate for performing the determined task based on requirements of a platform or service for performing the determined task, wherein preprocessing the retrieved data comprises:

applying a rules-based approach that selects one or more query templates based on conditions satisfied by the extracted information, and

replacing placeholders in the selected one or more query templates with data asset attributes derived from a knowledge catalog; and

perform the determined task using the retrieved data and a template routine corresponding to the determined task.

9 . The system of claim 8 , wherein the performance of the task requested by the natural language query includes generating a target machine learning model, and wherein performing the determined task comprises:

generating the target machine learning model; and

training the target machine learning model using the retrieved data as training data.

10 . The system of claim 9 , wherein the at least one processor is further configured to:

deploy the target machine learning model to a desired environment.

11 . The system of claim 8 , wherein the at least one processor is further configured to:

determine one or more suggestions to complete the natural language query in response to receiving a partial query.

12 . The system of claim 11 , wherein determining one or more suggestions comprises:

classifying data assets and corresponding content from the plurality of different data sources into topics based on a machine learning topic model, wherein keywords are associated with the topics;

classifying the natural language query into the topics based on the machine learning topic model; and

determining, via a machine learning prediction model, one or more keywords of the topics of the natural language query to serve as the one or more suggestions based on the task requested by the natural language query and the extracted information.

13 . The system of claim 8 , wherein the at least one processor is further configured to:

generate training data including the natural language expression templates with the placeholders replaced with attributes from an operational environment; and

re-train the machine learning model with the training data to customize the machine learning model for the operational environment.

14 . A computer program product for processing a natural language query requesting performance of a task, the computer program product comprising one or more computer readable storage media having program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by at least one processor to cause the at least one processor to:

train a machine learning model using natural language expression templates with placeholders for attributes,

wherein the natural language expression templates are used to train the machine learning model to map natural language expressions to one or more tasks, wherein each task, of the one or more tasks, is associated with a corresponding template routine including instructions or code statements for performing a corresponding task;

extract information from the natural language query;

determine, via the machine learning model and based on the extracted information, a task that corresponds to the performance of the task requested by the natural language query;

generate a query for retrieving data from a plurality of different data sources based on the extracted information;

retrieve the data for the determined task from the plurality of different data sources based on the generated query;

preprocess the retrieved data into a format appropriate for performing the determined task based on requirements of a platform or service for performing the determined task, wherein preprocessing the retrieved data comprises:

applying a rules-based approach that selects one or more query templates based on conditions satisfied by the extracted information, and

replacing placeholders in the selected one or more query templates with data asset attributes derived from a knowledge catalog; and

perform the determined task using the retrieved data and a template routine corresponding to the determined task.

15 . The computer program product of claim 14 , wherein the performance of the task requested by the natural language query includes generating a target machine learning model.

16 . The computer program product of claim 15 , wherein performing the determined task comprises:

generating the target machine learning model; and

training the target machine learning model using the retrieved data as training data.

17 . The computer program product of claim 15 , wherein the program instructions executable by the at least one processor further cause the at least one processor to:

deploy the target machine learning model to a desired environment.

18 . The computer program product of claim 14 , wherein the program instructions executable by the at least one processor further cause the at least one processor to:

determine one or more suggestions to complete the natural language query in response to receiving a partial query.

19 . The computer program product of claim 18 , wherein determining one or more suggestions comprises:

classifying data assets and corresponding content from the plurality of different data sources into topics based on a machine learning topic model, wherein keywords are associated with the topics;

classifying the natural language query into the topics based on the machine learning topic model; and

determining, via a machine learning prediction model, one or more keywords of the topics of the natural language query to serve as the one or more suggestions based on the task requested by the natural language query and the extracted information.

20 . The computer program product of claim 14 , wherein the program instructions executable by the at least one processor further cause the at least one processor to:

generate training data including the natural language expression templates with the placeholders replaced with attributes from an operational environment; and

re-train the machine learning model with the training data to customize the machine learning model for the operational environment.