Microsoft patents AI tool to convert database code between systems
Microsoft has been granted a patent for a system that uses artificial intelligence to translate database commands from one software format to another. The method uses a technique called retrieval-augmented generation to find similar examples and instructions, guiding the AI to fix errors in the code step by step.
In the filing’s own words
A method, computer program product, and computing system for processing a request to migrate a database command query in a source dialect to a target dialect. An example of the target dialect is obtained by processing the database command query in the source dialect using retrieval-augmented generation (RAG) with the plurality of examples of the target dialect. An instruction is obtained for instructing a generative artificial intelligence (AI) model to translate the database command query in the source dialect to the target dialect by processing the database command query in the source dialect using RAG with the plurality of instructions. A prompt is generated for the generative AI model using the database command query in the source dialect, the example, and the instruction. A candidate database command query is generated by prompting the generative AI model with the prompt to migrate the database command query in the source dialect to the target dialect.
What exactly they claim (claim 1)
1. A computer-implemented method, executed on a computing device, comprising: receiving a request to migrate a database command query in a source dialect to a target dialect; obtaining an example of the target dialect from a plurality of examples of the target dialect by processing the database command query in the source dialect using retrieval-augmented generation (RAG) with the plurality of examples of the target dialect; obtaining an instruction from a plurality of instructions for instructing a generative artificial intelligence (AI) model to translate the database command query in the source dialect to the target dialect by processing the database command query in the source dialect using RAG with the plurality of instructions, wherein the plurality of instructions formulates the translation as an incremental error correction; generating a prompt for the generative AI model using the database command query in the source dialect, the example, and the instruction, wherein the prompt instructs the generative AI model to treat the database command query as an erroneous query in the target dialect; and generating a candidate database command query by prompting the generative AI model with the prompt to migrate the database command query in the source dialect to the target dialect, wherein generating the candidate database command query comprises iteratively correcting errors of the database command query with respect to the target dialect.
Facts
- Company
- Microsoft (Microsoft Technology Licensing, LLC)
- Official title
- System and method for database command query migration
- Patent number
- US12762118B2
- Application number
- 18982259
- Filed
- Dec 16, 2024
- Granted
- Oct 13, 2026
- Inventors
- 13
- Claims
- 20
Classified under
G06F 16/2452 Physics & computingG06F 16/2433 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.
