Get the newsletter
Microsoft · AI / ML · Filed Jul 15, 2026 · USPTO published Nov 12, 2026 · This week's release

Microsoft Files Patent for Giving AI Coding Helpers Better Background Reading

An AI coding assistant can read only a small amount of your code before it answers, and this patent is about choosing that reading list well. Microsoft's filing scores each candidate using real project facts like build settings and code connections, so a similar-looking file doesn't automatically win.

Computer systems that gather details about a developer's active project to build better background notes for an AI helper. Drawing from patent filing US 2026/0359016 A1.
Computer systems that gather details about a developer's active project to build better background notes for an AI helper.All 3 drawings ↓
Publication number
US 2026/0359016 A1(US20260359016A1)
Applicant
Microsoft Technology Licensing, LLC
Filed · Published
Jul 15, 2026 · Nov 12, 2026
Inventors
Benjamin John MCMORRAN, Ion TODIREL, Bogdan Ionut MIHALCEA
Status when we published
Waiting for an examiner
Document
20 claims
US classification
717/113
Parent application
Continuation of 18/380,113 (filed Oct 13, 2023)(18380113)

How Microsoft decides what its AI coder reads

Ever asked someone for help and watched them read the documents that sound most like your problem, instead of the ones actually tied to it? AI coding assistants can make the same mistake. When you ask one a question about your code, it can only take in a limited amount of background material, so something has to decide what goes in.

A common way to decide is to pick the snippets that look most similar to your question. Microsoft's patent adds a second check: what your own project reveals. That includes which files depend on which, which settings you've changed, and what you've been building or debugging lately. A snippet that looks unrelated but is wired into your code can get in, and a lookalike with no real connection can get left out.

The goal is to hand the AI better background so its answers fit your actual project.

From the filing · CLAIM 1
… select a portion of potential prompt content from a plurality of portions of the potential prompt content based on a determined relevance of the portion of the potential prompt content to code development information …

Translation: The system picks the most useful background details to add to the AI prompt.

How a build-aware score ranks code snippets

The system starts with a prompt (the written request sent to an AI model) that asks for a task involving source code. It then looks at a pool of potential extra material, such as files, functions and settings, and scores each piece. The score can blend embedding similarity (a numerical fingerprint of a text's meaning, used to measure how alike two snippets are) with code development information, meaning facts about your project.

That project information can include:

  • Static analysis results (a tool's map of which code calls or depends on which)
  • Development tool history and status, such as build or debug runs
  • Project settings and environment variables

The filing gives a sample formula: 0.6 times the similarity, plus 0.4 times a flag for whether code analysis links the snippet to your code, with a cutoff of 0.6. In another example, a compiler search path override means the file in a "special" folder scores 40 out of 100 while the default folder's file scores zero, even though the default file looks more like the question.

The chosen material is added to the original request to form a second prompt, which goes to the model. The score can also set where the material is placed, such as in a background section, and the prompt can state how the material connects to your code.

From the filing · THE ABSTRACT
Code development information includes static analysis results, project settings, development tool history or status data, and other software development data which augments training data previously embedded in the language model.

Translation: The AI gets extra context from project files and past coding activity.

Why this matters for C++ teams using AI help

If you write software, this is about getting better answers from the AI built into your editor. An assistant that reads the right files suggests code that fits your project, and the filing says grounding the choice in real project facts should cut down on made-up answers (it calls them fabulations). Microsoft's examples center on C++, where codebases run large and the filing says some AI models have seen less C++ in training.

The filing lists inputs such as Microsoft's IntelliSense and IntelliCode autocompletion data, plus build, debug and test history. If you never write code, the takeaway is simpler: an AI answer often depends on what got put in front of it, and this patent is about that choosing step. It also saves space, since a prompt holds only a small amount of text.

Microsoft's 20th filing we've tracked since June on our AI assistants that remember you watchlist follows earlier applications like saving idle chats to cheaper storage and one briefing late meeting joiners.

Source: US 2026/0359016 A1 at the USPTO (PDF). Full patent text and figures are in the official publication.

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 · 3 sheets

3 drawing sheets from US 2026/0359016 A1 · click any drawing to enlarge

Computers picking the best project details for coding AI, drawing sheet 1 from US 2026/0359016 A1
Sheet 1 Computers picking the best project details for coding AI
Programming clues and scoring formulas used to filter background data, drawing sheet 2 from US 2026/0359016 A1
Sheet 2 Programming clues and scoring formulas used to filter background data
How the system feeds project history into an AI, drawing sheet 3 from US 2026/0359016 A1
Sheet 3 How the system feeds project history into an AI
Patent filing page

More in AI assistant & agent

All 413 AI assistant & agent patents →

Watchlists this filing belongs to

All watchlists →
Reader comments

No comments yet

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.