Microsoft patents AI method for building code by fixing broken parts
Microsoft has filed a patent for a system that uses large language models to write computer programs by breaking tasks into smaller pieces. If a generated code snippet fails, the system keeps the working parts, asks the AI to fix the broken section, and combines them back together until the program works correctly.
In the filing’s own words
Methods, systems, and computer storage media for providing compositional program synthesis using a compositional program synthesis engine in an artificial intelligence (AI) system are described. Compositional program synthesis in this context is guided by a Large Language Model (LLL) and refers to the iterative process of using the LLM to generate, refine, and compose program segments, addressing errors by systematically breaking down tasks, salvaging correct parts, and synthesizing subprograms that are integrated using composition operators until a program satisfies the given specification. The compositional program synthesis engine iteratively generates, refines, and integrates program components by leveraging program decomposition, synthesis of subprograms, and composition operators to construct a program that meets the specified requirements. Compositional program synthesis engine supports several decomposition strategies associated with refining suffixes, refining prefixes, and IfThenElse distinct cases; and for synthesizing the new candidate programs the engine supports program composition operators including sequential composition and conditional composition.
What exactly they claim (claim 1)
1. A computerized system comprising: one or more computer processors; computer memory storing computer-useable instructions that, when used by the one or more computer processors, cause the one or more computer processors to perform operations, the operations comprising: generating an original candidate program based on an original specification; generating original candidate program results based on executing the original candidate program; based on the original candidate program results, determining that the original candidate program does not satisfy the original specification; based on determining that the original candidate program does not satisfy the original specification, generating an extracted segment of the original candidate program; using a Large Language Model (LLM), synthesizing a new subprogram based on the original specification and the extracted segment of the original candidate program; and using the LLM, synthesizing a new candidate program based on combining the extracted segment of the original candidate program and the new subprogram with a program composition operation.
Facts
- Company
- Microsoft (Microsoft Technology Licensing, LLC)
- Official title
- COMPOSITIONAL PROGRAM SYNTHESIS ENGINE IN AN ARTIFICIAL INTELLIGENCE SYSTEM
- Publication number
- US20260259708A1
- Application number
- 19067689
- Filed
- Feb 28, 2025
- Published
- Sep 3, 2026
- Inventors
- 4
- 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.