IP Library › Granted Patent US 12,748,791
Granted Patent B2
US 12,748,791 · App. 18/680,991 · Granted Sep 29, 2026

Scalable generative AI-based tool infrastructure

Inventors: Erik William Berg (Portland, OR); Yash Jayesh Dagli (Kirkland, WA); Amber Elisabeth Telfer Norris (Hillsboro, OR)
Assignee: Microsoft Technology Licensing, LLC
G06F16/3347G06F11/362G06F16/338G06F30/31G06F30/3323G06F30/398G06F40/40G06N3/0475
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,748,791
App. No.
18/680,991
Granted
Sep 29, 2026
Kind
B2
Abstract

Embodiments of the present disclosure include a formal verification method comprising a plurality of custom generative AI-based tools configured in a bottoms up methodology to generate formal verification code using an LLM. In another embodiment, the present disclosure includes a generative AI-based tool architecture comprising an index of code examples. A query from a user is used to retrieve code examples, and the query and code examples are sent to an LLM to generate code corresponding to the query.

Claims (70)

1 . A method, comprising:

receiving an input query from a user prompt;

sending the input query to a large language model (LLM);

receiving, from the LLM, an initial representation of the input query;

performing, based on the initial representation, a lookup on an index storing a plurality of entries, wherein each of the plurality of entries in the index follows a domain specific code syntax, and performing the lookup comprises:

retrieving, from the index, a plurality of relevant entries based on the initial representation; and

ranking the plurality of relevant entries according to how each entry matches the input query;

supplementing the input query with at least some of the plurality of relevant entries, including:

determining that a token count of the input query plus a token count of the plurality of relevant entries exceeds an allowed token window of the LLM;

selecting, from the plurality of relevant entries and in accordance with the ranking, a subset of the plurality of relevant entries such that a combined token count of the input query and the subset does not exceed the allowed token window of the LLM; and

combining the input query and the subset of the plurality of relevant entries to generate a supplemented input query:

sending the supplemented input query to the LLM;

receiving, from the LLM, a response corresponding to the supplemented input query; and

presenting the response on a graphical user interface.

2 . The method of claim 1 , wherein the response includes software code that follows the domain specific code syntax.

3 . The method of claim 1 , further comprising:

receiving, from the graphical user interface, an acceptance of the response; and

saving the response along with the input query in the index based on the acceptance.

4 . The method of claim 1 , wherein the lookup on the index is based on at least one field in the initial representation.

5 . The method of claim 4 , wherein the at least one field is a query field, a context field, an instructions field, a module field, a generated response field, an accepted response field, a contributor field, or an ID field.

6 . The method of claim 5 , wherein each of the plurality of entries includes the at least one field.

7 . The method of claim 6 , wherein the plurality of entries includes a code snippet, an API reference, or a code example.

8 . The method of claim 1 , wherein performing the lookup comprises:

generating a vectorized query from the initial representation.

9 . The method of claim 1 , wherein the subset of the plurality of relevant entries comprises highest-ranked entries admitted in rank order according to how each entry matches the input query until adding a further entry would exceed the allowed token window.

10 . A system comprising:

one or more processors;

a non-transitory computer-readable medium storing a program executable by the one or more processors, the program comprising sets of instructions for:

receiving an input query from a user prompt;

sending the input query to a large language model (LLM);

receiving, from the LLM, an initial representation of the input query;

performing, based on the initial representation, a lookup on an index storing a plurality of entries, wherein each of the plurality of entries in the index follows a domain specific code syntax, and performing the lookup comprises:

retrieving, from the index, a plurality of relevant entries based on the initial representation; and

ranking the plurality of relevant entries according to how each entry matches the input query;

supplementing the input query with at least some of the plurality of relevant entries, including:

determining that a token count of the input query plus a token count of the plurality of relevant entries exceeds an allowed token window of the LLM;

selecting, from the plurality of relevant entries and in accordance with the ranking, a subset of the plurality of relevant entries such that a combined token count of the input query and the subset does not exceed the allowed token window of the LLM; and

combining the input query and the subset of the plurality of relevant entries to generate a supplemented input query;

sending the supplemented input query to the LLM;

receiving, from the LLM, a response corresponding to the supplemented input query; and

presenting the response on a graphical user interface.

11 . The system of claim 10 , wherein the response includes software code that follows the domain specific code syntax.

12 . The system of claim 10 , wherein the program further comprises sets of instructions for:

receiving, from the graphical user interface, an acceptance of the response; and

saving the response along with the input query in the index based on the acceptance.

13 . The system of claim 10 , wherein the lookup on the index is based on at least one field in the initial representation.

14 . The system of claim 13 , wherein the at least one field is a query field, a context field, an instructions field, a module field, a generated response field, an accepted response field, a contributor field, or an ID field.

15 . The system of claim 10 , wherein performing the lookup comprises:

generating a vectorized query from the initial representation.

16 . A non-transitory computer-readable medium storing a program executable by one or more processors, the program comprising sets of instructions for:

receiving an input query from a user prompt;

sending the input query to a large language model (LLM);

receiving, from the LLM, an initial representation of the input query;

performing, based on the initial representation, a lookup on an index storing a plurality of entries, wherein each of the plurality of entries in the index follows a domain specific code syntax, and performing the lookup comprises:

retrieving, from the index, a plurality of relevant entries based on the initial representation; and

ranking the plurality of relevant entries according to how each entry matches the input query;

supplementing the input query with at least some of the plurality of relevant entries, including:

determining that a token count of the input query plus a token count of the plurality of relevant entries exceeds an allowed token window of the LLM;

selecting, from the plurality of relevant entries and in accordance with the ranking, a subset of the plurality of relevant entries such that a combined token count of the input query and the subset does not exceed the allowed token window of the LLM; and

combining the input query and the subset of the plurality of relevant entries to generate a supplemented input query;

sending the supplemented input query to the LLM;

receiving, from the LLM, a response corresponding to the supplemented input query; and

presenting the response on a graphical user interface.

17 . The non-transitory computer-readable medium of claim 16 , wherein the program further comprises sets of instructions for:

receiving, from the graphical user interface, an acceptance of the response; and

saving the response along with the input query in the index based on the acceptance.

18 . The non-transitory computer-readable medium of claim 16 , wherein the lookup on the index is based on at least one field in the initial representation.

19 . The non-transitory computer-readable medium of claim 18 , wherein the at least one field is a query field, a context field, an instructions field, a module field, a generated response field, an accepted response field, a contributor field, or an ID field.

20 . The non-transitory computer-readable medium of claim 16 , wherein performing the lookup comprises:

generating a vectorized query from the initial representation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 3, 2024
From: BERG, ERIK WILLIAM; DAGLI, YASH JAYESH; NORRIS, AMBER ELISABETH TELFER
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 067602/0677 →
Continuity (2)
Provisional Application 63567558 · Mar 20, 2024
Related Publication 20250298825A1 · Sep 25, 2025
References Cited (57)
US 10809984B2 · Mizrahi · 2020 [cited by examiner]
US 11194815B1 · Kumar · 2021 [cited by examiner]
US 11481211B1 · Karri · 2022 [cited by examiner]
US 11681541B2 · Mostafa · 2023 [cited by examiner]
US 11836069B2 · Balasubramanian · 2023 [cited by examiner]
US 12073195B2 · Duan · 2024 [cited by examiner]
US 12271710B2 · Schaefer · 2025 [cited by examiner]
US 12340191B1 · Serban · 2025 [cited by applicant]
US 12566926B2 · Hsu · 2026 [cited by applicant]
US 20100106705A1 · Rush · 2010 [cited by examiner]
US 20180196731A1 · Moorthi · 2018 [cited by examiner]
US 20200097261A1 · Smith · 2020 [cited by examiner]
US 20210200958A1 · Liu · 2021 [cited by examiner]
US 20210390418A1 · Mass · 2021 [cited by examiner]
US 20220043738A1 · Mahajan · 2022 [cited by examiner]
US 20220405336A1 · Lippe · 2022 [cited by examiner]
US 20230042051A1 · Clement · 2023 [cited by examiner]
US 20230222393A1 · Zahm · 2023 [cited by examiner]
US 20240070270A1 · Mace · 2024 [cited by examiner]
US 20240134614A1 · Bakshi · 2024 [cited by examiner]
US 20240256423A1 · Zhang · 2024 [cited by examiner]
US 20240265281A1 · Hart · 2024 [cited by examiner]
US 20240281222A1 · Trummer · 2024 [cited by examiner]
US 20240289124A1 · Qiao · 2024 [cited by examiner]
US 20240311093A1 · Schaefer · 2024 [cited by examiner]
US 20240311582A1 · Schaefer · 2024 [cited by examiner]
US 20240311652A1 · Kulkarni · 2024 [cited by applicant]
US 20240378306A1 · Lyle · 2024 [cited by examiner]
US 20240403005A1 · Friddle · 2024 [cited by examiner]
US 20240403340A1 · Boxler · 2024 [cited by examiner]
US 20240411666A1 · Chan · 2024 [cited by examiner]
US 20240419917A1 · Clement · 2024 [cited by examiner]
US 20240419977A1 · Perez · 2024 [cited by examiner]
US 20240428079A1 · Chen · 2024 [cited by examiner]
US 20250005026A1 · Balasubramanian · 2025 [cited by examiner]
US 20250005058A1 · Khosla · 2025 [cited by examiner]
US 20250007790A1 · Marwah · 2025 [cited by examiner]
US 20250029114A1 · Stonehocker · 2025 [cited by examiner]
US 20250117479A1 · Yang · 2025 [cited by examiner]
US 20250173365A1 · Sivulka · 2025 [cited by examiner]
US 20250217265A1 · Hicks · 2025 [cited by examiner]
US 20250238628A1 · Sharma · 2025 [cited by applicant]
US 20250278564A1 · Yuan · 2025 [cited by examiner]
US 20250298721A1 · Berg · 2025 [cited by applicant]
US 20250298952A1 · Berg · 2025 [cited by applicant]
US 20250298955A1 · Ramirez Beltran · 2025 [cited by applicant]
US 20250363304A1 · Fortkort · 2025 [cited by examiner]
Luan, Sifei, et al. “Aroma: Code recommendation via structural code search.” Proceedings of the ACM on Programming Languages 3.OOPSLA (2019): 1-28. (Year: 2019). [cited by examiner]
Murr, Lincoln, Morgan Grainger, and David Gao. “Testing Ilms on code generation with varying levels of prompt specificity.” arXiv preprint arXiv:2311.07599 (2023). (Year: 2023). [cited by examiner]
Yu, Shengcheng, et al. “Llm for test script generation and migration: Challenges, capabilities, and opportunities.” 2023 IEEE 23rd International Conference on Software Quality, Reliability, and Security (QRS). IEEE, 202… [cited by examiner]
White, Jules, et al. “A prompt pattern catalog to enhance prompt engineering with chatgpt.” arXiv preprint arXiv:2302.11382 (2023). (Year: 2023). [cited by examiner]
Nashid, Noor, Mifta Sintaha, and Ali Mesbah. “Retrieval-based prompt selection for code-related few-shot learning. ” 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE). IEEE, 2023. (Year: 2023). [cited by examiner]
Youtube: “60DAC Tech Talk: What ChatGPT and Generative AI means for Semiconductor Design and Development,” Dactv, Retrieved from Link: https://www.youtube.com/watch?v=VJdQV87H1O4, Retrieved on Oct. 23, 2024, 2 pages. [cited by applicant]
U.S. Appl. No. 18/731,124, filed May 31, 2024. [cited by applicant]
U.S. Appl. No. 18/731,139, filed May 31, 2024. [cited by applicant]
U.S. Appl. No. 18/731,025, filed May 31, 2024. [cited by applicant]
Non-Final Office Action mailed on Apr. 29, 2026, in U.S. Appl. No. 18/731,139, 16 Pages. [cited by applicant]