IP Library Granted Patent US 12,475,150
Granted Patent B2
US 12,475,150 · App. 18/590,114 · Granted Nov 18, 2025

Configuring a large language model to convert natural language queries to structured queries

Inventors: Vidit Aggarwal (Dublin, CA); Lukasz Janusz Karolewski (San Jose, CA); Ajay Prakash (Fremont, CA)
Assignee: Microsoft Technology Licensing, LLC
G06F16/3329
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 12,475,150
App. No.
18/590,114
Granted
Nov 18, 2025
Kind
B2
Abstract

Embodiments of the disclosed technologies are capable of generating natural language queries. The embodiments describe generating a training natural language query of a training structured search query using a first LLM and a first prompt. The embodiments further describe fine-tuning a second LLM using the training natural language query of the training structured search query and the training structured search query. The fine-tuned second LLM generates a structured version of a natural language query. The embodiments further describe generating the structured version of a received natural language query using the fine-tuned second LLM and a second prompt.

Claims (40)

1 . A method comprising:

generating, using a first large language model (LLM) and a first prompt, a training unstructured natural language query using an input training structured search query;

fine-tuning a second LLM using the training unstructured natural language query and the training structured search query, wherein the fine-tuned second LLM generates a structured version of a natural language query;

generating, using the fine-tuned second LLM and a second prompt, a structured natural language query using an input unstructured natural language query;

mapping, using the second LLM, text of the input unstructured natural language query to a tag; and

mapping, using the second LLM, the text of the input unstructured natural language query to a value corresponding to the tag, wherein the structured natural language query comprises the tag and the value.

2 . The method of claim 1 , wherein the training structured search query is a search query in a predetermined format, the training structured search query being a query for digital content.

3 . The method of claim 1 , wherein the training unstructured natural language query comprises one or more natural language words associated with a search defined by the training structured search query.

4 . The method of claim 1 , wherein the first prompt comprises a set of tags, wherein the training structured search query comprises a tag of the set of tags.

5 . The method of claim 1 , wherein the second prompt comprises a set of tags, wherein the input unstructured natural language query comprises a tag of the set of tags.

6 . The method of claim 1 , wherein the training unstructured natural language query is associated with a first domain, the method further comprising:

generating, using the first LLM and the first prompt, a second training unstructured natural language query using the input training structured search query, wherein the second training unstructured natural language query is associated with a second domain.

7 . The method of claim 1 , further comprising:

creating the second prompt comprising the training unstructured natural language query and the training structured search query using retrieval augmented generation.

8 . The method of claim 1 , further comprising:

creating the first prompt comprising a user-generated structured search query and a user-generated unstructured search query using retrieval augmented generation, wherein the user-generated unstructured search query is a user-generated natural language query.

9 . A system comprising:

at least one processor: and

at least one memory device coupled to the at least one processor, wherein the at least one memory device comprises instructions that, when executed by the at least one processor, cause the at least one processor to perform at least one operation comprising:

generating, using a first large language model (LLM) and a first prompt, a training unstructured natural language query using an input training structured search query;

fine-tuning a second LLM using the training unstructured natural language query and the training structured search query, wherein the fine-tuned second LLM generates a structured version of a natural language query;

generating, using the fine-tuned second LLM and a second prompt, a structured natural language query using an input unstructured natural language query;

mapping, using the second LLM, text of the input unstructured natural language query to a tag; and

mapping, using the second LLM, the text of the input unstructured natural language query to a value corresponding to the tag, wherein the structured natural language query comprises the tag and the value.

10 . The system of claim 9 , wherein the training structured search query is a search query in a predetermined format, the training structured search query being a query for digital content.

11 . The system of claim 9 , wherein the training unstructured natural language query comprises one or more natural language words associated with a search defined by the training structured search query.

12 . The system of claim 9 , wherein the first prompt comprises a set of tags, wherein the training structured search query comprises a tag of the set of tags.

13 . The system of claim 9 , wherein the second prompt comprises a set of tags, wherein the input unstructured natural language query comprises a tag of the set of tags.

14 . A non-transitory machine-readable storage medium comprising instructions that, when executed by at least one processor, cause the at least one processor to perform at least one operation comprising:

generating, using a first large language model (LLM) and a first prompt, a training unstructured natural language query using an input training structured search query;

fine-tuning a second LLM using the training unstructured natural language query and the training structured search query, wherein the fine-tuned second LLM generates a structured version of a natural language query;

generating, using the fine-tuned second LLM and a second prompt, a structured natural language query using an input unstructured natural language query;

mapping, using the second LLM, text of the input unstructured natural language query to a tag; and

mapping, using the second LLM, the text of the input unstructured natural language query to a value corresponding to the tag, wherein the structured natural language query comprises the tag and the value.

15 . The non-transitory machine-readable storage medium of claim 14 , wherein the training structured search query is a search query in a predetermined format, the training structured search query being a query for digital content.

16 . The non-transitory machine-readable storage medium of claim 14 , wherein the training unstructured natural language query comprises one or more natural language words associated with a search defined by the training structured search query.

17 . The non-transitory machine-readable storage medium of claim 14 , wherein the first prompt comprises a set of tags, wherein the training structured search query comprises a tag of the set of tags.

18 . The non-transitory machine-readable storage medium of claim 14 , wherein the second prompt comprises a set of tags, wherein the input unstructured natural language query comprises a tag of the set of tags.

19 . The non-transitory machine-readable storage medium of claim 14 , wherein the training unstructured natural language query is associated with a first domain, wherein the instructions, when executed by the at least one processor, cause the at least one processor to perform at least one operation further comprising:

generating, using the first LLM and the first prompt, a second training unstructured natural language query using the input training structured search query, wherein the second training unstructured natural language query is associated with a second domain.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 6, 2024
From: AGGARWAL, VIDIT; KAROLEWSKI, LUKASZ JANUSZ; PRAKASH, AJAY
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 066673/0295 →
Continuity (1)
Related Publication 20250272317A1 · Aug 28, 2025
References Cited (6)
US 11954102B1 · Palaniappan · 2024 [cited by examiner]
US 20190011278A1 · Vellasques · 2019 [cited by examiner]
US 20240346254A1 · Liu · 2024 [cited by examiner]
US 20240370479A1 · Hudetz · 2024 [cited by examiner]
US 20240411797A1 · Blum · 2024 [cited by examiner]
US 20250068488A1 · Xu · 2025 [cited by examiner]
Cited By (2)
US 12,572,552 US 12,650,991