Microsoft · Filed Jun 12, 2026 · Published Oct 15, 2026

Microsoft Files Patent for an AI Code Reviewer That Decides What to Look For First

Before Microsoft's AI writes a word of feedback on your code, a second AI guesses what kind of mistake a human reviewer would flag. That guess then steers the whole review.

Sample text showing computer programming edits alongside plain instructions that tell an AI what specific problems to look for. Drawing from patent filing US 2026/0319790 A1.
Sample text showing computer programming edits alongside plain instructions that tell an AI what specific problems to look for.
See all 9 drawings from this filing ↓
Publication number US 2026/0319790 A1 US20260319790A1
Applicant Microsoft Technology Licensing, LLC
Filing date Jun 12, 2026
Publication date Oct 15, 2026
Inventors Shengyu FU, Neelakantan SUNDARESAN, Alexey SVYATKOVSKIY, Shuo ZHANG
US classification 717/123
Status when we published Waiting for an examiner (Jul 14, 2026)
Parent application is a Continuation of 18372059 (filed 2023-09-23)
Document 20 claims

What Microsoft's AI code reviewer actually does

Imagine you've just finished a batch of changes to a piece of software, and a teammate has to check them before they go live. Reading someone else's work takes time, and tired reviewers can miss obvious mistakes while fussing over harmless ones.

Microsoft's patent application describes an AI helper that takes a first pass. Before it writes any feedback, a smaller AI model looks at your changes and guesses which type of problem a human reviewer would most likely raise: a missing safety check, messy formatting, a missing test, and so on.

That guess goes to a large chatbot-style AI, along with the changed code and background from the rest of your project. Because it knows what to look for, its feedback should come out sharper. You then see a few suggested comments and pick the one worth sending.

From the filing · CLAIM 1
… determining, using a trained neural model, an inferred intent associated with the code changes, the inferred intent characterizing a type of issue relevant to code review …

Translation: An AI figures out what kind of potential problem the programmer might have introduced.

How the intent label steers the review prompt

The system starts with a pull request (a developer's proposal to merge changed code into the main project). It converts the changes into a diff hunk (a compact view of removed, added, and unchanged lines), swapping the usual plus and minus marks for special tokens labeled [ADD], [DEL], and [KEEP].

That diff goes to an intent classifier, built from the encoder half of a transformer model (the part of a language model that reads and summarizes text). It was trained on code review data and fine-tuned on code changes labeled with an intent. The classifier gives a probability for each candidate intent and the system picks the highest. The filing's examples include:

  • Missing null checks
  • Code formatting and cleanup
  • Unit testing
  • Exception handling and error logging
  • Thread locking problems

Next, the system gathers context. File-level context covers import statements, the class the change sits in, nearby methods, and the signatures of other methods in the file. Repository-level context adds method signatures from other files. The filing says it finds the right spot by parsing the file into a syntax tree (a map of the code's structure).

Finally, a prompt combines plain-language task instructions, the diff, the intent, and the context. A large language model returns one or more candidate comments, which appear in a user interface. The chosen comment goes into the pull request. The filing says the large language model itself is not fine-tuned and may sit on a remote server reached through a web API.

From the filing · THE ABSTRACT
The intent represents an issue with the code changes from a code reviewer's perspective and is predicted from a neural classifier given the code changes in a code diff format …

Translation: The system guesses the human reviewer's main concern by looking at the lines of code that changed.

Why Microsoft skips retraining the big model

If you write software, review is often the slow part: your changes sit waiting while a colleague works out what to check. A tool that names the likely problem first and then drafts comments could cut that wait. The filing also says that giving the AI the intent means fewer back-and-forth prompts from you to get a useful comment.

There's a cost angle too. The filing says it avoids fine-tuning the large language model, which it calls costly in time, resources, and money, and claims comparable accuracy by adding the intent to the prompt instead. Even if you never touch code, the apps you use get checked this way before they ship. The filing gives no accuracy numbers, so treat its claims as the company's own.

Microsoft's 41st filing we've tracked on our AI models working in teams since May builds on earlier applications like chat that thinks while talking and search answers from multiple models.

Editorial take

Claim 1 casts a wide net. It lists six steps: take in code changes, prepare them for a model, have a trained model name the type of issue, feed that label plus context from the program to a large language model, generate a comment, and hand it to a developer. Nothing in it requires the special diff markers, the specific model design, or the list of issue types. Those details appear only in later claims.

In practice, any tool that uses its own trained model to label the problem type and then asks a chatbot-style AI for feedback with project context fits the wording. A tool that skips the labeling step, or leaves it to a person typing in a focus, falls outside the words as written.

It's a sensible, modest idea wrapped in broad language. Whether it would be granted that wide is an open question, and the filing offers no accuracy numbers, so the "more accurate" promise rests on the company's word.

Get our take in your Top Stories

Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time Microsoft patent news breaks.

There are more where this came from

We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.

The drawings

9 drawing sheets from US 2026/0319790 A1 · click any drawing to enlarge

Automated software review setup, drawing sheet 1 from US 2026/0319790 A1
Sheet 1 Automated software review setup
Sample instructions for AI, drawing sheet 2 from US 2026/0319790 A1
Sheet 2 Sample instructions for AI
Teaching an AI model, drawing sheet 3 from US 2026/0319790 A1
Sheet 3 Teaching an AI model
Inside the language model, drawing sheet 4 from US 2026/0319790 A1
Sheet 4 Inside the language model
Model parts for classifying, drawing sheet 5 from US 2026/0319790 A1
Sheet 5 Model parts for classifying
Training steps for AI, drawing sheet 6 from US 2026/0319790 A1
Sheet 6 Training steps for AI
Creating feedback on programs, drawing sheet 7 from US 2026/0319790 A1
Sheet 7 Creating feedback on programs
Cloud software checking system, drawing sheet 8 from US 2026/0319790 A1
Sheet 8 Cloud software checking system
Show the other 1 sheets
Microsoft Files Patent for an AI Code Reviewer That Decides What to Look For First patent drawing, sheet 9
Sheet 9
Browse all the drawings 9 drawing sheets
Patent filing page

Source. Full patent text and figures from the official USPTO publication PDF.
Reader comments

Be the first to weigh in

Start the discussion

Real name or a handle, either is fine. Comments are read by a person before they appear, so allow a little time. Keep it about the filing.