Microsoft Patents an AI Team That Rewrites Chatbot Instructions Until They're Safe
Microsoft describes a team of AI helpers that rewrite a chatbot's instructions over and over, and one of them is a dedicated safety tester. Whenever a draft fails its checks, safety counts for more in how the next draft is judged.

- Publication number
- US 2026/0368488 A1(US20260368488A1)
- Applicant
- Microsoft Technology Licensing, LLC
- Filed · Published
- May 19, 2025 · Nov 19, 2026
- Inventors
- Emmanuel ABOAH BOATENG, Ehimwenma NOSAKHARE, Sarah ZHANG
- Status when we published
- Waiting for an examiner
- Document
- 20 claims
- US classification
- 706/27
What Microsoft's prompt-polishing AI team does
Right now, getting a chatbot to behave usually means a person typing instructions, testing them, tweaking the wording, and testing again. It's slow trial and error. And when a company switches to a different AI model, those carefully tuned instructions often have to be rewritten from scratch.
Microsoft's patent application describes a team of AI helpers that does this tuning loop for you. You describe the job in plain language, or hand over a first draft of the instructions. One helper rewrites them. Another checks how well the chatbot does the job. A third tries to catch safety problems, such as the chatbot spilling private data or being tricked into breaking its rules.
The helpers repeat the cycle many times, and each round's draft gets a combined score for quality and safety. When the loop finishes, you get the polished instructions back. The filing also describes a check for moving to a newer model without losing the old one's style or safety record.
… execute a plurality of machine learning (ML) agents that iteratively modify the prompt over a plurality of prompt refinement iterations …
Translation: It runs a team of AI agents that repeatedly rewrite the prompt over and over.
How the safety checker and scorer steer each draft
The system starts with a prompt (the written instructions that steer a chatbot-style language model). You can give it a plain-language task description or a first draft, plus example questions and answers, or let a helper invent synthetic examples. Then a loop runs. Each round, the model is tried with the current draft, and specialized AI agents (software helpers, each powered by a language model) go to work:
- A performance agent scores how well the answers hold up, and can also track things like response time.
- A security agent probes for risks such as jailbreaks (tricks that make a model ignore its rules), leaked confidential data, hallucinations (made-up facts) and insecure code.
- A prompt-writing agent rewrites the draft using the combined score plus written feedback from the other two.
The two scores merge into one weighted number. A critic agent adjusts the weights as it goes: if a draft fails a security check, security counts for more in the next round. An orchestrator agent (a coordinator) decides which helpers run and when, and the loop stops once preset goals are met.
For model switches, extra checks compare the new model with the old one for lower quality, changed style, and weakened security.
Why switching chatbots could get less painful
If you use a customer-service bot or a workplace assistant, the instructions behind it shape how helpful and how safe it is. Today those instructions are often written by hand and checked for safety late in the process, which is slow and easy to get wrong. Building safety testing into every rewrite means problems like leaked private data could be caught while the instructions are still being drafted, rather than after the bot is built.
The model-switching piece may matter just as much. AI models get replaced often, and a swap can change a bot's tone or weaken its protections. A tool that checks the new model against the old one could make upgrades less disruptive for the companies running them, and for you as the person chatting with the bot.
This is the 49th Microsoft filing we've tracked since May on AI models working in teams, building on an AI coach that grades itself and testing AI setups before committing.
Source: US 2026/0368488 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.
We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.
The drawings · 10 sheets
10 drawing sheets from US 2026/0368488 A1 · click any drawing to enlarge

No comments yet