Natural language data query systems and methods
AssigneeSap SE
InventorsGautam Guha, Santhosh Rao, Sparshad Kasote
Life of this patent
Estimating the term…
Abstract
Embodiments of the present disclosure include techniques for querying a data store using natural language inputs. A machine learning model is trained using NLP inputs, SQL queries, and metadata attributes of a data store. In some embodiments, training inputs may include UI code and visualizations. A user enters an NLP input and the machine learning model is used to tokenize the input and generate a query automatically. Query results are displayed in UI. Certain NLP inputs from the user are presented as links for a user to select and generate new queries.
Claims20
A method of querying an analytic database comprising:
- training a machine learning model with a data set comprising a plurality of natural language inputs to said analytic database and a corresponding plurality of SQL queries, and a plurality of column names from the analytic database, wherein the machine learning model is trained to convert one or more words of the natural language inputs into tokens corresponding to the column names in the analytic database and associate the tokens with metadata attributes in the analytic database;
- receiving a first natural language input in the machine learning model;
- generating, based on an output of the machine learning model, a first SQL query;
- processing the first SQL query in the analytic database to produce first query results;
- in a user interface, displaying the first natural language input and the first query results, wherein one or more words of the first natural language input corresponding to one or more tokens identified by the machine learning model as one or more corresponding column names are displayed as one or more links, wherein the links are associated with a plurality of corresponding metadata attributes in the analytic database;
- and
- selecting, by a user, at least one of said one or more links to automatically generate a second SQL query to the analytic database to produce second query results based on the selection.
A computer system comprising:
- at least one processor;
- at least one non-transitory computer-readable medium storing computer-executable instructions that, when executed by the at least one processor, cause the computer system to perform a method comprising:
- training a machine learning model with a data set comprising a plurality of natural language inputs to said analytic database and a corresponding plurality of SQL queries, and a plurality of column names from the analytic database, wherein the machine learning model is trained to convert one or more words of the natural language inputs into tokens corresponding to the column names in the analytic database and associate the tokens with metadata attributes in the analytic database;
- receiving a first natural language input in the machine learning model;
- generating, based on an output of the machine learning model, a first SQL query;
- processing the first SQL query in the analytic database to produce first query results;
- in a user interface, displaying the first natural language input and the first query results, wherein one or more words of the first natural language input corresponding to one or more tokens identified by the machine learning model as one or more corresponding column names are displayed as one or more links, wherein the links are associated with a plurality of corresponding metadata attributes in the analytic database;
- and
- selecting, by a user, at least one of said one or more links to automatically generate a second SQL query to the analytic database to produce second query results based on the selection.
A non-transitory computer-readable medium storing computer-executable instructions that, when executed by at least one processor, perform a method comprising:
- training a machine learning model with a data set comprising a plurality of natural language inputs to said analytic database and a corresponding plurality of SQL queries, and a plurality of column names from the analytic database, wherein the machine learning model is trained to convert one or more words of the natural language inputs into tokens corresponding to the column names in the analytic database and associate the tokens with metadata attributes in the analytic database;
- receiving a first natural language input in the machine learning model;
- generating, based on an output of the machine learning model, a first SQL query;
- processing the first SQL query in the analytic database to produce first query results;
- in a user interface, displaying the first natural language input and the first query results, wherein one or more words of the first natural language input corresponding to one or more tokens identified by the machine learning model as one or more corresponding column names are displayed as one or more links, wherein the links are associated with a plurality of corresponding metadata attributes in the analytic database;
- and
- selecting, by a user, at least one of said one or more links to automatically generate a second SQL query to the analytic database to produce second query results based on the selection.
Dependencies are inferred from the claim text.