Microsoft · Filed Apr 2, 2025 · Published Oct 8, 2026

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.
See all 7 drawings from this filing ↓
Publication number US 2026/0310980 A1
Applicant Microsoft Technology Licensing, LLC
Filing date Apr 2, 2025
Publication date Oct 8, 2026
Inventors Shanu KUMAR, Shubhanshu KHANDELWAL, Akhila YESANTARAO VENKATA, Manish GUPTA, Parag AGRAWAL
US classification 706/25
Status when we published Waiting for an examiner (May 9, 2025)
Document 20 claims

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.

Editorial take

This sits close to shippable because it needs no new hardware. It is software that calls AI models a company already runs. The description says the critic, the aggregator and the scorer are each an AI model handed a written instruction.

The shortest route to a product is a developer tool that takes a draft set of instructions plus a spreadsheet of test questions with right answers, then hands back a better version. That test data is the real prerequisite, since every score depends on it. Each round also means many AI calls, which costs money, and the filing says the work may need repeating for each AI model.

The document reports no results, so how much better the rewritten instructions score, and how cheaply, stays open. Until that is answered, it reads as a practical, routine filing with a short path into internal tools.

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 drawing sheets from US 2026/0310980 A1 · click any drawing to enlarge

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.