Microsoft patents two-step search to help AI write better code
Microsoft describes a system that finds helpful code examples in two stages before an AI model writes new code. It first searches one database for relevant snippets, then uses those results to search a second database for more specific details. The AI combines these findings to generate code that matches the user's request.
In the filing’s own words
Methods, computer systems, and computer storage media are provided for identifying relevant code resource data for code generation using enhanced data retrieval. In embodiments, a first set of code resource data relevant to an input is identified from a first corpus of code resource data. Thereafter, the input and the first set of code resource data are used to identify, from a second corpus of code resource data, a second set of code resource data relevant to the input and the first set of code resource data. An indication of the input, the first set of code resource data, and the second set of code resource data is used by one or more generative artificial intelligence models to generate code relevant to the input. Such generated code may be provided for display and/or implemented to execute a desired task or functionality indicated in the input.
What exactly they claim (claim 1)
1. A computing system comprising: a processor; and computer storage memory having computer-executable instructions stored thereon that, when executed by the processor, configure the computing system to perform operations comprising: identifying, from a first corpus of code resource data, a first set of code resource data relevant to an input; using the input and the first set of code resource data identified from the first corpus of code resource data to identify, from a second corpus of code resource data, a second set of code resource data relevant to the input and the first set of code resource data; and generating, using one or more generative artificial intelligence models, code relevant to the input using an indication of the input and at least a portion of the first set of code resource data from the first corpus of code resource data and the second set of code resource data from the second corpus of code resource data.
Facts
- Company
- Microsoft (Microsoft Technology Licensing, LLC)
- Official title
- IDENTIFYING RELEVANT CODE RESOURCE DATA FOR CODE GENERATION USING ENHANCED DATA RETRIEVAL
- Publication number
- US20260277563A1
- Application number
- 19080711
- Filed
- Mar 14, 2025
- Published
- Sep 17, 2026
- Inventors
- 5
- Claims
- 20
Classified under
G06F 8/35 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.