Get the newsletter
Microsoft · Security · Filed Feb 26, 2025 · USPTO published Aug 27, 2026 · Aug 27 release

Microsoft Patent: AI Chatbots That Automatically Rewrite Security Rules Against Manipulation

Every AI chatbot runs on a hidden instruction sheet called a system prompt, and right now, keeping that sheet secure is almost entirely a manual job. Microsoft wants to automate it.

Network architecture connecting servers, storage, and user devices for prompt management. Drawing from patent filing US 2026/0252707 A1.
Network architecture connecting servers, storage, and user devices for prompt management.All 7 drawings ↓
Publication number
US 2026/0252707 A1(US20260252707A1)
Applicant
Microsoft Technology Licensing, LLC
Filed · Published
Feb 26, 2025 · Aug 27, 2026
Inventors
Asaf HARARI, Idan HEN, Ariel BRUKMAN, Ron KELLER
Status when we published
Examiner raised objections; the company can respond
Document
20 claims
US classification
726/1
Examiner
FARROW, FELICIA (Art Unit 2437)

How Microsoft's auto-prompt security fix actually works

Every time a user sends a message to an AI assistant, that assistant is following a set of background rules its developers wrote. Those rules, called a system prompt, tell the AI what it can and can't do. The problem is that bad actors have learned to send cleverly worded messages that trick the AI into ignoring those rules, and patching the vulnerabilities usually means a developer has to notice the attack, figure out what went wrong, and rewrite the instructions by hand.

Microsoft's patent describes a system that does that patching work automatically. It watches the conversation happening between your application and an AI model, spots patterns that look like a security problem, and then generates an updated set of instructions to block that kind of attack going forward.

The result is that an AI assistant could defend itself against manipulation without anyone having to manually rewrite its rules every time a new trick shows up. That's a meaningful shift for any company running an AI product that talks to the public.

From the filing · CLAIM 1
… identify, based on the first data, a first security vulnerability of the application, generate a system prompt comprising instructions specifying how the generative AI model is to respond to a second user prompt, the instructions comprising a first rule for mitigating the first security vulnerability …

Translation: The system detects a security flaw and automatically writes new instructions to prevent the AI from being tricked again.

How the system scans sessions and rewrites prompt rules

The system works in a loop. First, it ingests data from a live or recorded session between an application and a generative AI model, such as a customer-facing chatbot. It analyzes that data to identify a security vulnerability, which in AI terms often means a prompt injection attack (a case where a user's input is crafted to override the AI's original instructions).

Once a vulnerability is identified, the system generates or updates a system prompt: the behind-the-scenes instruction text that tells the AI how to behave. Crucially, the new system prompt includes a specific rule targeting the vulnerability that was just found, not just a generic warning.

The updated prompt is then automatically delivered to the application, which passes it to the AI model. From that point forward, the AI responds to user messages according to the new, tightened rules. The patent also describes a version where the AI model itself helps determine what the new rule should say, essentially asking the model to help write its own security patch.

Key components described include:

  • A vulnerability-detection step that reads session data
  • An automated prompt-generation step that produces targeted fix rules
  • A delivery mechanism that pushes the updated prompt back into the live application
  • An optional loop where the AI model participates in generating its own guardrails
From the filing · THE ABSTRACT
Techniques are disclosed for automatically generating and/or updating system prompts for applications that interface with generative artificial intelligence (AI) models. In an aspect, data associated with an application for facilitating interactions with a generative AI model is received.

Translation: Microsoft is patenting a way for software to rewrite its own security instructions when it talks to AI models.

What this means for businesses running AI assistants

For any business that has plugged an AI assistant into a customer-facing product, keeping that assistant from being manipulated is a constant, labor-intensive problem. Right now, the standard practice is closer to a fire drill: someone notices an exploit, escalates it, and a developer rewrites the system prompt manually. Microsoft's approach, if it works as described, would compress that cycle from days to near real-time.

The security AI space is moving fast, and Microsoft is well-positioned to bake this kind of protection into Azure AI services or Microsoft Copilot deployments, though nothing announced yet confirms that path. For readers tracking new Big Tech patents in AI security and enterprise software, this filing fits a clear pattern of companies racing to make AI deployments safer to operate at scale.

That makes this Microsoft's 16th filing we've tracked since July in our AI safety guardrails watch, following one on tricking AI into leaking secrets and one on bots that probe AI for flaws.

Source: US 2026/0252707 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 the new patents from Big Tech, carmakers and more and send you the ones worth knowing. Plain English, free, every week.

The drawings · 7 sheets

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

System architecture network diagram, drawing sheet 1 from US 2026/0252707 A1
Sheet 1 System architecture network diagram
Vulnerability remediation workflow, drawing sheet 2 from US 2026/0252707 A1
Sheet 2 Vulnerability remediation workflow
Security rule generation sequence, drawing sheet 3 from US 2026/0252707 A1
Sheet 3 Security rule generation sequence
Attack detection flowchart, drawing sheet 4 from US 2026/0252707 A1
Sheet 4 Attack detection flowchart
Template selection process, drawing sheet 5 from US 2026/0252707 A1
Sheet 5 Template selection process
Session security management workflow, drawing sheet 6 from US 2026/0252707 A1
Sheet 6 Session security management workflow
Computing hardware infrastructure diagram, drawing sheet 7 from US 2026/0252707 A1
Sheet 7 Computing hardware infrastructure diagram
Patent filing page

Watchlists this filing belongs to

All watchlists →