Microsoft · Filed Dec 12, 2024 · Published Jun 18, 2026 · verified — real USPTO data

Microsoft's New Patent Fights Hackers Who Hide Attacks Inside AI Chatbot Instructions

Every time you send a message to an AI chatbot, you're also sending hidden instructions the app set up in advance — and attackers have learned how to hijack those instructions. Microsoft's new patent is aimed squarely at that problem.

Microsoft Patent: AI Prompt Security Threat Detection — figure from US 2026/0170124 A1
FIG. 1A — rendered from the official USPTO publication PDF.
Publication number US 2026/0170124 A1
Applicant Microsoft Technology Licensing, LLC
Filing date Dec 12, 2024
Publication date Jun 18, 2026
Inventors Shimon EZRA, Slava REZNITSKY, Andrey KARPOVSKY, Shiran HOREV
CPC classification 706/12
Grant likelihood Medium
Examiner CENTRAL, DOCKET (Art Unit OPAP)
Status Docketed New Case - Ready for Examination (Jan 22, 2025)
Document 20 claims

What Microsoft's two-part AI prompt scanner actually does

When a company builds a product on top of an AI model — think a customer service bot or a document assistant — it feeds the AI a secret set of instructions called a system prompt. Those instructions tell the AI how to behave. You, the user, then add your own message on top. Attackers have figured out that by crafting a sneaky user message, they can sometimes override the company's instructions and make the AI do things it shouldn't. This is called prompt injection.

Microsoft's patent describes a security system that treats those two pieces — the company's instructions and your input — as separate objects. Each is converted into a kind of numeric fingerprint, then those fingerprints are compared and analyzed. If your message looks wildly out of place compared to what the app was designed to handle, the system flags it as suspicious and can block it or raise an alert.

The idea is to catch attacks before the AI ever acts on a malicious prompt, rather than cleaning up the damage afterward.

How the system separates and compares prompt embeddings

The patent describes a pipeline with a few distinct steps:

  • Prompt splitting: When a prompt arrives, the system separates the meta prompt (the developer's pre-written system instructions) from the input prompt (what the end user typed).
  • Encoding into vectors: Each part is run through an encoder that converts it into an embedding vector — a long list of numbers that captures the semantic meaning of the text in a form computers can compare mathematically.
  • Anomaly detection: The system then checks whether the two vectors make sense together. One approach uses the meta prompt's vector to classify what kind of app this is (say, a legal document tool vs. a coding assistant), then checks the user's message against what that class of app would normally see. Another approach simply measures the mathematical distance between the two vectors — if the user's message is semantically far from the app's stated purpose, something may be off.
  • Security action: If the prompt is flagged as anomalous, the system can block the request, log it, or escalate it for review.

The core insight is that most prompt-injection attacks stand out because the malicious content is semantically misaligned with the legitimate app instructions — and math can catch that misalignment faster than rule-based filters.

What this means for businesses running AI-powered apps

Prompt injection is one of the most actively exploited weaknesses in AI applications right now. As companies pour money into AI-powered tools for customers and employees, the attack surface grows. Traditional security tools — firewalls, input sanitization — weren't designed with AI prompts in mind, and they miss a lot.

If Microsoft builds this into Azure AI services or its Copilot infrastructure, it could offer developers a meaningful layer of protection without requiring them to hand-tune threat rules for every possible attack pattern. For you as an end user, it means the AI products you rely on at work would be less likely to get quietly manipulated into leaking data or ignoring their own guidelines.

Editorial take

This is a genuinely practical patent in a space that urgently needs better tooling. Prompt injection attacks are real, documented, and increasing — and most AI platforms are still patching them with ad-hoc filters. A vector-distance approach that treats the system prompt and user input as structurally separate objects is a defensible architectural move, not just a marketing reframe of existing ideas.

Get one Big Tech patent every Sunday

Plain English, intelligent commentary, no hype. Free.

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

Editorial commentary on a publicly published patent application. Not legal advice.