Microsoft · Filed May 18, 2026 · Published Sep 17, 2026 · verified — real USPTO data

Microsoft Patents a System That Automatically Rewrites Its Own AI Prompts

Getting useful answers from an AI often comes down to how well the question is written. Microsoft is patenting a way to let the AI figure that out itself, so nobody has to.

A user interacts with a computer, which sends prompts through an optimization and generation system to a generative language model. Drawing from patent filing US 2026/0277977 A1.
A user interacts with a computer, which sends prompts through an optimization and generation system to a generative language model.
See all 5 drawings from this filing ↓
Publication number US 2026/0277977 A1
Applicant Microsoft Technology Licensing, LLC
Filing date May 18, 2026
Publication date Sep 17, 2026
Inventors Saravanakumar RAJMOHAN, Drishti GOEL, Akshay Uttama NAMBI, Xuchao ZHANG, Chetan BANSAL, Supriyo GHOSH, Prathamesh Subodh DESHPANDE, Raghav MAGAZINE
CPC classification 707/713
Grant likelihood Medium
Examiner CENTRAL, DOCKET (Art Unit OPAP)
Status Docketed New Case - Ready for Examination (Jun 11, 2026)
Parent application is a Continuation of 19072695 (filed 2025-03-06)
Document 20 claims

What Microsoft's auto-prompt rewriting actually does for you

Imagine you're using an AI assistant at work and it keeps giving you answers that are just slightly off. The problem isn't the AI itself, it's the instructions someone wrote to tell the AI what to do. Those instructions, called prompts, matter enormously, and right now, getting them right is a slow, manual job.

Microsoft's patent describes a system where one AI writes variations of a prompt, another AI grades each version against real examples, and the best one gets refined through targeted feedback. This cycle repeats until the prompt stops improving. No human has to sit there tweaking wording and testing results.

The system also pulls in relevant past examples to help the AI understand new tasks faster. It's designed to work with both large, powerful AI models and smaller, cheaper ones, so it isn't locked to expensive hardware. For you, that could mean AI tools that work better out of the box, without months of manual tuning behind the scenes.

From the filing · CLAIM 1
… generating an optimized prompt instruction by iteratively applying, with a prompt optimization system that uses one or more generative language models, a plurality of mutation operations and a plurality of refinement operations to the initial prompt instruction …

Translation: The system continuously tweaks and improves user instructions using automated trial and error.

How the mutator-critic loop refines each prompt

The patent describes a three-part pipeline that treats prompt-writing as an engineering problem rather than a creative guessing game.

Step one: mutation. A dedicated AI model (called the mutator) takes an existing prompt instruction and generates several rewritten versions of it. Think of this as brainstorming alternatives automatically.

Step two: scoring. A second AI model (called the critic) tests each version against a set of training samples (real examples of what a good output looks like) and assigns a score to each candidate. The highest scorer moves forward.

Step three: refinement. The critic then writes specific feedback about what the winning version got right and wrong. The prompt is adjusted based on that feedback, and the whole mutation-scoring-refinement loop starts again. It repeats until the scores stop improving, what the patent calls a convergence criterion.

Alongside this loop, a separate context management service keeps a searchable database of past examples stored as embedding vectors (a way of encoding meaning numerically so similar examples can be found quickly). When a new task comes in, the system retrieves the most relevant past examples and folds them into the final prompt automatically.

From the filing · THE ABSTRACT
A context management service maintains a vector database of historical examples pre-encoded as embedding vectors, enabling efficient retrieval of semantically similar examples for new tasks.

Translation: Past examples are stored as digital vectors so the AI can quickly find relevant past data for new jobs.

What this means for AI tools that talk to you every day

Right now, Microsoft has been filing around AI infrastructure and enterprise tooling since at least 2023, and this patent fits a pattern: making AI systems that require less human babysitting to perform well. For anyone using an AI-powered product, that means fewer situations where the tool gives weirdly generic or off-topic responses because whoever deployed it didn't spend enough time tuning the instructions.

The practical payoff is most visible in business software, customer-service bots, or coding assistants where the same AI task gets run thousands of times a day. A better prompt, found automatically, can improve every single one of those interactions. The design's support for smaller, cheaper AI models also suggests Microsoft is thinking about cost at scale, not just raw performance.

Microsoft's 28th filing we've tracked since May on AI models working together builds on earlier work like one on rewriting failed prompts and one on catching AI errors early.

Editorial take

For most people, this patent describes something they'll never see directly but might notice in how much better an AI product feels after an update. The difference between a well-tuned prompt and a bad one is the difference between an AI assistant that actually helps and one that answers the wrong question with total confidence.

The mutation-and-critic loop is a real engineering contribution here. Using one AI to generate candidates and a separate AI to evaluate them is a cleaner separation of concerns than having a single model grade its own work, which tends to produce self-flattering results.

The honest caveat is that the system still depends on having good training samples to score against. If the examples you start with are mediocre, the optimizer will converge on a mediocre prompt more efficiently. Automation speeds up the process; it doesn't fix the inputs.

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

5 drawing sheets from US 2026/0277977 A1 · click any drawing to enlarge

Patent filing page

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