Get the newsletter
Microsoft · AI / ML · Filed Apr 2, 2025 · USPTO published Oct 8, 2026 · Oct 8 release

Microsoft Files Patent for AI That Rewrites the Instructions Given to Other AI

Behind many AI apps sits a long, hidden set of written instructions, and a bad set ruins the answers. Microsoft's patent application describes one AI that critiques those instructions and another that rewrites them, round after round.

AI instructions split into structured pieces so a secondary program can analyze and rewrite them for better performance. Drawing from patent filing US 2026/0310980 A1.
AI instructions split into structured pieces so a secondary program can analyze and rewrite them for better performance.All 7 drawings ↓
Publication number
US 2026/0310980 A1(US20260310980A1)
Applicant
Microsoft Technology Licensing, LLC
Filed · Published
Apr 2, 2025 · Oct 8, 2026
Inventors
Shanu KUMAR, Shubhanshu KHANDELWAL, Akhila YESANTARAO VENKATA, Manish GUPTA, Parag AGRAWAL
Status when we published
Waiting for an examiner
Document
20 claims
US classification
706/25

What Microsoft's self-editing AI instructions do

Every time you ask an app to summarize an email or answer a customer question, an AI is following a long script of written instructions that you never see. Developers write those scripts by hand, and a poorly ordered or wordy one produces poor answers.

Microsoft's patent application describes a way to fix those scripts automatically. The system breaks the script into labeled sections, like an outline, then runs it on sample questions that have known right answers. One AI, the critic, reads where the answers went wrong and writes notes. A second AI, the actor, edits only the sections those notes point to.

The system produces several rewritten versions, scores each one, and keeps the best to try again. It can also trim wordy instructions so the AI has less to read.

From the filing · CLAIM 1
… providing the hierarchical prompt tree, a large language model (LLM) output generated in response to the prompt combined with an input, and an expected output to a critic model, wherein the input includes actual values that are inserted in placeholders within the prompt; generating, at the critic model, a reflection; …

Translation: The system checks the AI's actual performance against the expected goal to figure out what went wrong.

How the critic and actor trade notes on a draft

The system first turns the instruction text into a hierarchical prompt tree: an outline where each box (a node) holds one piece, such as an instruction, heading, example or list. Lines show which box sits inside which, so one section can change without disturbing the rest.

The instructions often contain placeholders, blanks like {name} that get filled with real data. The system fills them with test inputs, runs the AI, and compares its answers with known right ones. The tree and the wrong answers go to a critic model, which writes feedback called reflections. Some judge clarity before any testing, some diagnose a specific error, and some flag text that can be shortened.

An actor model then edits the tree, limited to pre-defined moves such as reordering sections, adding or deleting examples, merging boxes or pruning one. Several revised versions are scored on test questions, and a method called Upper Confidence Bound (it mostly picks top scorers but sometimes tries weaker ones) chooses which seed the next round.

The filing also covers chains of instructions, where one AI's answer feeds the next, with each prompt getting its own branch.

From the filing · THE ABSTRACT
The optimization process involves converting the prompt into a hierarchical prompt tree, which organizes the prompt into distinct sections and subsections. This structured format allows for systematic refinements targeting specific components without altering the entire prompt.

Translation: Breaking instructions into structured outlines lets the system fix specific parts without rewriting everything.

Why long, hidden AI instructions need a tune-up

If you use an app powered by AI, the quality of its hidden instructions shapes every answer you get. Today, developers tune those instructions by hand, which the filing calls cumbersome and demanding of human effort. Automating that work could mean fewer clumsy replies, and shorter instructions could mean faster, cheaper responses, which the filing says matters for settings like customer service and data analysis.

There is a catch the document itself points out: instructions tuned for one AI model may need to be tuned again for a different one. So it would be a tool to run again whenever the model changes. It also needs test questions with known right answers to score against, so a company has to supply that data first.

Microsoft's 38th filing we've tracked since May in our AI agents working together watchlist follows hiding agents behind one window and catching bugs in bug tools.

Source: US 2026/0310980 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 · 7 sheets

7 drawing sheets from US 2026/0310980 A1 · click any drawing to enlarge

Network connecting users to AI, drawing sheet 1 from US 2026/0310980 A1
Sheet 1 Network connecting users to AI
System rewriting AI instructions, drawing sheet 2 from US 2026/0310980 A1
Sheet 2 System rewriting AI instructions
AI prompt broken into pieces, drawing sheet 3 from US 2026/0310980 A1
Sheet 3 AI prompt broken into pieces
Steps for rewriting instructions, drawing sheet 4 from US 2026/0310980 A1
Sheet 4 Steps for rewriting instructions
Steps for combining AI feedback, drawing sheet 5 from US 2026/0310980 A1
Sheet 5 Steps for combining AI feedback
Steps for chaining multiple prompts, drawing sheet 6 from US 2026/0310980 A1
Sheet 6 Steps for chaining multiple prompts
Standard computer hardware parts, drawing sheet 7 from US 2026/0310980 A1
Sheet 7 Standard computer hardware parts
Patent filing page

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.