Get the newsletter
Microsoft · AI / ML · Filed May 19, 2025 · USPTO published Nov 19, 2026 · This week's release

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.

Specialized programs work together to review chatbot instructions for safety and accuracy, continuously editing them until they pass every test. Drawing from patent filing US 2026/0368488 A1.
Specialized programs work together to review chatbot instructions for safety and accuracy, continuously editing them until they pass every test.All 10 drawings ↓
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.

From the filing · CLAIM 1
… 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.

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

10 drawing sheets from US 2026/0368488 A1 · click any drawing to enlarge

How specialized AI agents collaborate to refine chatbot instructions, drawing sheet 1 from US 2026/0368488 A1
Sheet 1 How specialized AI agents collaborate to refine chatbot instructions
Setting initial goals and test data for the AI, drawing sheet 2 from US 2026/0368488 A1
Sheet 2 Setting initial goals and test data for the AI
Running automated checks to evaluate chatbot safety and performance, drawing sheet 3 from US 2026/0368488 A1
Sheet 3 Running automated checks to evaluate chatbot safety and performance
Prioritizing safety scoring whenever a chatbot fails a security test, drawing sheet 4 from US 2026/0368488 A1
Sheet 4 Prioritizing safety scoring whenever a chatbot fails a security test
Checking that switching AI models preserves existing behavior and safety, drawing sheet 5 from US 2026/0368488 A1
Sheet 5 Checking that switching AI models preserves existing behavior and safety
Steps for repeatedly tweaking instructions until quality goals are met, drawing sheet 6 from US 2026/0368488 A1
Sheet 6 Steps for repeatedly tweaking instructions until quality goals are met
Gathering human guidelines and generating fake test examples, drawing sheet 7 from US 2026/0368488 A1
Sheet 7 Gathering human guidelines and generating fake test examples
Testing a new AI model to prevent mistakes, drawing sheet 8 from US 2026/0368488 A1
Sheet 8 Testing a new AI model to prevent mistakes
Show the other 2 sheets
Raising security priorities when a chatbot fails a safety test, drawing sheet 9 from US 2026/0368488 A1
Sheet 9 Raising security priorities when a chatbot fails a safety test
Hardware parts that run the prompt rewriting system, drawing sheet 10 from US 2026/0368488 A1
Sheet 10 Hardware parts that run the prompt rewriting system
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.