Generating queries for an anomaly detection framework using natural language prompts
Generating queries for an anomaly detection framework using natural language prompts, including: receiving a prompt to a large language model for a query in a query language of an anomaly detection framework; providing the prompt to the large language model; and presenting, based on the prompt, the query received from the large language model.
1 . A method of generating queries for an anomaly detection framework using natural language prompts, the method comprising:
receiving a first prompt to a large language model for a query in a query language of an anomaly detection framework;
providing the first prompt to the large language model;
presenting, based on the first prompt, when a response received from the large language model is a query, the query received from the large language model; and
presenting, based on the first prompt, when the response received from the large language model is not a query, a non-query response received from the large language model, wherein the providing of the first prompt to the large language model includes:
generating a second prompt including both a prompt template and the first prompt; and
providing the second prompt, which includes the prompt template and the first prompt, to the large language model wherein the presented non-query response provides guidance to the user on a method of interaction of the user with the large language model.
2 . The method of claim 1 , further comprising:
when the response received from the large language model is a query, executing the query; and
presenting a response to the executed query.
3 . The method of claim 1 , wherein the prompt template comprises a statement describing what the large language model should output in response to the first prompt.
4 . The method of claim 1 , wherein the prompt template comprises one or more constraints for generating the query by the large language model.
5 . The method of claim 1 , further comprising performing, based on a received command, an action based on the query.
6 . The method of claim 1 , wherein the first prompt comprises a request to convert another query in another query language into the query language for the anomaly detection framework.
7 . The method of claim 1 , further comprising:
receiving, from the large language model in response to the first prompt, data indicating one or more actions to perform in the anomaly detection framework based on the query; and
performing, based on the data, the one or more actions.
8 . The method of claim 7 , wherein the data indicating one or more actions comprises data indicating one or more Application Program Interface (API) calls to one or more APIs of the anomaly detection framework, and wherein performing the one or more actions comprises executing the one or more API calls.
9 . The method of claim 1 , further comprising training the large language model.
10 . The method of claim 1 , wherein the method of interaction includes rewording of the prompt.
11 . A computer program product for generating queries for an anomaly detection framework using natural language prompts, the computer program product disposed on a non-transitory computer readable medium, the computer program product including computer program instructions configurable to carry out the steps of:
receiving a first prompt to a large language model for a query in a query language of an anomaly detection framework;
providing the first prompt to the large language model;
presenting, based on the first prompt, when a response received from the large language model is a query, the query received from the large language model; and
presenting, based on the first prompt, when the response received from the large language model is not a query, a non-query response received from the large language model, wherein the providing of the first prompt to the large language model includes:
generating a second prompt including both a prompt template and the first prompt; and
providing the second prompt, which includes the prompt template and the first prompt, to the large language model wherein the presented non-query response provides guidance to the user on a method of interaction of the user with the large language model.
12 . The computer program product of claim 11 , wherein the steps further comprise:
when the response received from the large language model is a query, executing the query; and
presenting a response to the executed query.
13 . The computer program product of claim 11 , wherein the first prompt template comprises a statement describing what the large language model should output in response to the first prompt.
14 . The computer program product of claim 11 , wherein the prompt template comprises one or more constraints for generating the query by the large language model.
15 . The computer program product of claim 11 , wherein the steps further comprise performing, based on a received command, an action based on the query.
16 . The computer program product of claim 11 , wherein the first prompt comprises a request to convert another query in another query language into the query language for the anomaly detection framework.
17 . The computer program product of claim 11 , wherein the steps further comprise:
receiving, from the large language model in response to the first prompt, data indicating one or more actions to perform in the anomaly detection framework based on the query; and
performing, based on the data, the one or more actions.
18 . The computer program product of claim 16 , wherein the data indicating one or more actions comprises data indicating one or more Application Program Interface (API) calls to one or more APIs of the anomaly detection framework, and wherein performing the one or more actions comprises executing the one or more API calls.
19 . The computer program product of claim 11 , wherein the steps further comprise generating a polygraph.
20 . A method of generating queries for an anomaly detection framework using natural language prompts, the method comprising:
receiving a first prompt to a large language model for a query in a query language of an anomaly detection framework;
providing the first prompt to the large language model;
presenting, based on the first prompt, when a response received from the large language model is a query, the query received from the large language model;
presenting, based on the first prompt, when the response received from the large language model is not a query, a non-query response received from the large language model;
receiving, from the large language model in response to the first prompt, data indicating one or more actions to perform in the anomaly detection framework based on the query; and
performing, based on the data, the one or more actions wherein:
the data indicating one or more actions comprises data indicating one or more Application Program Interface (API) calls to one or more APIs of the anomaly detection framework;
performing the one or more actions comprises executing the one or more API calls; and
the providing of the first prompt to the large language model includes:
generating a second prompt including both a prompt template and the first prompt; and
providing the second prompt, which includes the prompt template and the first prompt, to the large language model.