{"pub_number":"US12373554B2","doc_number":"12373554","country":"US","kind_code":"B2","patent_type":"utility","status":"active","title":"Generating security language queries","abstract_text":"A computer-implemented method of generating a security language query from a user input query includes receiving, at a computer system, an input security hunting user query indicating a user intention; selecting, using a trained machine learning model and based on the input security hunting query, an example user security hunting query and corresponding example security language query; generating, using the trained machine learning model, query metadata from the input security hunting query; generating a prompt, the prompt comprising: the input security hunting user query; the selected example user security hunting query and the corresponding example security language query; and the generated query metadata; inputting the prompt to a large language model; receiving a security language query from the large language model corresponding to the input security hunting query reflective of the user intention.","claims":[{"number":1,"text":"A computer-implemented method comprising: receiving a training data set comprising a plurality of user security hunting queries, corresponding ground truth security language queries, and corresponding query metadata; generating a plurality of probe prompts from the training data set, wherein generating each probe prompt comprises: selecting one of the plurality of user security hunting queries as a subject of the probe prompt, and randomly selecting a subset of the plurality of user security hunting queries and corresponding ground truth security language queries as examples for inclusion into the probe prompt; inputting the probe prompts to a large language model; receiving, as output from the large language model, security language queries corresponding to the subjects of the probe prompts; comparing the security language queries for the probe prompts to the corresponding ground truth security language queries; calculating probe scores for the probe prompts based on the comparison; a","independent":true},{"number":2,"text":"The method of claim 1, wherein the trained model comprises: a base large language model; a pooling layer; a ranking head; and a classification head, wherein the ranking head is trained to select the user security hunting query and corresponding ground truth security language query, and the classification head is trained to generate the query metadata.","independent":false,"depends_on":[1]},{"number":3,"text":"The method of claim 1, comprising generating the training data set by: receiving an initial training data set comprising a plurality of user security hunting queries, corresponding ground truth security language queries, and corresponding query metadata; receiving a security query set comprising security language queries and corresponding textual descriptions of the security language queries; generating a prompt including: a user security hunting query and corresponding ground truth security language query drawn from the initial training data set, and a security language query and corresponding textual description from the security query set; inputting the prompt to a natural language generation large language model; receiving, as output from the natural language generation large language model, a user security hunting query corresponding to the security language query from the security query set, including the received user security hunting query and the security language query from t","independent":false,"depends_on":[1]},{"number":4,"text":"The method of claim 1, comprising: backtranslating the user security hunting queries to generate backtranslated security hunting queries; and including the backtranslated security hunting queries in the training data set.","independent":false,"depends_on":[1]},{"number":5,"text":"The method of claim 1, comprising: fitting a linear model to the probe scores; generating, from the linear model, rankings indicative of usefulness of the examples included in the probe prompts to the subjects of the probe prompts; wherein training the machine learning model to generate the output scores to select a user security hunting query and corresponding ground truth security language query of the training data set is based on the ranking.","independent":false,"depends_on":[1]},{"number":6,"text":"The method of claim 5, wherein training the machine learning model based on the ranking comprises: selecting a pair of examples from the ranking; inputting the pair of examples to the machine learning model; training the machine learning model to minimize a pairwise cross-entropy loss calculated from the pair of examples.","independent":false,"depends_on":[5]},{"number":7,"text":"The method of claim 1, comprising: generating a plurality of hyperparameter probe prompts, wherein generating each hyperparameter probe prompt comprises: selecting one of the plurality of user security hunting queries as a subject of the hyperparameter probe prompt, and randomly selecting values for a hyperparameter of the machine learning model; inputting the generated hyperparameter probe prompts to the large language model; receiving, as output from the large language model, security language queries corresponding to the subjects of the hyperparameter probe prompt; comparing the received security language queries for the hyperparameter probe prompts to the corresponding ground truth security language queries; calculating hyperparameter probe scores for the hyperparameter probe prompts based on the comparison; and training the machine learning model to select a value for the hyperparameter based on the calculated hyperparameter probe scores.","independent":false,"depends_on":[1]},{"number":8,"text":"A system comprising a processor and a storage, the storage storing computer-readable instructions which, when executed by the processor, cause the system to perform operations comprising: receiving a training data set comprising a plurality of user security hunting queries, corresponding ground truth security language queries, and corresponding query metadata; generating a plurality of probe prompts from the training data set, wherein generating each probe prompt comprises: selecting one of the plurality of user security hunting queries as a subject of the probe prompt, and randomly selecting a subset of the plurality of user security hunting queries and corresponding ground truth security language queries as examples for inclusion into the probe prompt; inputting the probe prompts to a large language model; receiving, as output from the large language model, security language queries corresponding to the subjects of the probe prompts; comparing the security language queries for the pr","independent":true}],"description":"BACKGROUND\nSecurity hunting or threat hunting involves proactively searching for security threats to a computer system. One challenge for security analysts is understanding the structure and format of security data, in order to be effective when performing a security investigation. On average, companies use 20 different security products to protect and defend their assets and intellectual property. Most of these security products use their own proprietary log structure, which is difficult to decipher and understand, and requires a considerable amount of time for an analyst to become proficient in interrogating. Microsoft\n®\nsecurity products (e.g. Microsoft\n®\nSentinel\n®\n/Defender\n®\n) employ a query language called Kusto Query Language (KQL) for querying these logs, which is often unfamiliar for junior analysts with limited knowledge of the relevant table and schema definitions.\nSUMMARY\nAccording to one aspect disclosed herein, there is provided a computer-implemented method comprising: receiving an input security hunting user query; selecting, using a trained machine learning model and based on the input security hunting query, an example user security hunting query and corresponding example security language query; generating, using the trained machine learning model, query metadata from the input security hunting query; generating a prompt, the prompt comprising: the input security hunting user query; the selected example user security hunting query and the corresponding example security language query; and the generated query metadata; inputting the prompt to a large language model; receiving a security language query from the large language model corresponding to the input security hunting query.\nUsing a trained machine learning model to select the examples (or\n“\nshots\n”\n) included in the prompt and to generate appropriate metadata (e.g. table schema data) assists in providing reliable security language queries that closely align to the users intent.\nAccording to","inventors":[{"name":"Daniel Lee Mace","slug":"daniel-lee-mace","city":"Bellevue","country":"US"},{"name":"William Blum","slug":"william-blum","city":"Bellevue","country":"US"},{"name":"Jeremias Eichelbaum","slug":"jeremias-eichelbaum","city":"Vancouver","country":"CA"},{"name":"Amir Rubin","slug":"amir-rubin","city":"Vancouver","country":"CA"},{"name":"Edir V. Garcia Lazo","slug":"edir-v-garcia-lazo","city":"Seattle","country":"US"},{"name":"Nihal Irmak Pakis","slug":"nihal-irmak-pakis","city":"Vancouver","country":"CA"},{"name":"Yogesh K. Roy","slug":"yogesh-k-roy","city":"Redmond","country":"US"},{"name":"Jugal Parikh","slug":"jugal-parikh","city":"Sammamish","country":"US"},{"name":"Peter A. Bryan","slug":"peter-a-bryan","city":"Seattle","country":"US"},{"name":"Benjamin Elliott Nick","slug":"benjamin-elliott-nick","city":"Bellevue","country":"US"},{"name":"Ram Shankar Siva Kumar","slug":"ram-shankar-siva-kumar","city":"Bothell","country":"US"}],"assignees":[{"name":"Microsoft Technology Licensing, LLC","slug":"microsoft-technology-licensing-llc","country":"US"}],"examiners":[],"cpc_codes":["G06F 16/2423","G06F 21/554","G06F 40/47"],"ipc_codes":["G06F 16/242","G06F 21/55","G06F 40/47"],"filing_date":"2022-08-31","pub_date":"2025-07-29","grant_date":"2025-07-29","expiration_date":"2042-08-31","family_members":[],"citations_made":[{"pub_number":"US11893341B2","category":"examiner"},{"pub_number":"US20190132214A1","category":"examiner"},{"pub_number":"US20200341976A1","category":"examiner"},{"pub_number":"US20200412767A1","category":"examiner"},{"pub_number":"US20230083512A1","category":"examiner"},{"pub_number":"US20230315856A1","category":"examiner"},{"pub_number":"US20230418815A1","category":"examiner"},{"pub_number":"US20240037327A1","category":"examiner"},{"pub_number":"US20240095447A1","category":"examiner"}],"non_patent_literature":["Brown, et al.,","“","Language Models are Few-Shot Learners","”",", In Repository of arXiv:2005.14165v4, Jul. 22, 2020, pp. 1-75.","International Search Report and Written Opinion received for PCT Application No. PCT/US2023/028905, Dec. 15, 2023, 19 pages.","Prashant,","“","Create a Question-Answer Service using GPT-3 and OpenAI","”"],"drawings_count":0,"source_id":"uspto_patent_grants","upstream_forward_citations":0,"metrics":{"forward_citations":1,"indexed_forward_citations":1,"backward_citations":9,"npl_citations":10,"citations_per_year":1.0,"pagerank":0.17328679513998632,"citation_rank":2224634,"pagerank_rank":2224634,"velocity_rank":2224634,"family_citations":1}}