Microsoft patents AI system that finds code examples to help write verification tools
Microsoft describes a system that uses a large language model to help write code for checking software correctness. When a user asks for code, the system searches a database of existing examples, picks the most relevant ones that fit the model's memory limit, and sends them to the AI to generate a new solution.
In the filing’s own words
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.
What exactly they claim (claim 1)
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.
Facts
- Company
- Microsoft (Microsoft Technology Licensing, LLC)
- Official title
- Scalable generative AI-based tool infrastructure
- Patent number
- US12748791B2
- Application number
- 18680991
- Filed
- May 31, 2024
- Granted
- Sep 29, 2026
- Inventors
- 3
- Claims
- 20
Classified under
G06F 16/3347 Physics & computingG06F 11/362 Physics & computingG06F 16/338 Physics & computingG06F 30/31 Physics & computingG06F 30/3323 Physics & computingG06F 30/398 Physics & computingMore from Microsoft in AI & software
- Microsoft patents method to check AI answers against verified facts Oct 20, 2026
- Microsoft patents AI that presents PowerPoint slides for you Sep 3, 2026
- Microsoft patents method to check if LLM answers are based on real data Sep 10, 2026
- Microsoft patents system to blend multiple AI agents into one chat Oct 1, 2026
- Microsoft patents system that answers questions using your screen history Oct 15, 2026
Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.
