Intermittent Prompt Injection False Positives with Azure OpenAI GPT-5.1 / GPT-5.4

Dharun Balaji 80 Reputation points
2026-07-20T15:03:53.52+00:00

Hi everyone,

We're using Azure OpenAI GPT-5.1 and GPT-5.4 in a production application and have observed an intermittent issue with prompt injection/jailbreak detection.

Occasionally, users submit completely normal inputs (such as dates, short replies, or other benign messages), but instead of receiving the expected response, the model returns a message similar to:

"I can't process that request because it triggered our safety rules (possible prompt injection/jailbreak attempt). Please rephrase your question without asking me to ignore policies or change roles."

This behavior is not consistent. The exact same or similar input usually works correctly, but very occasionally it is flagged as a potential prompt injection attempt.

From our observations:

  • The issue is rare and intermittent.
  • The user input is completely normal and does not contain any jailbreak or prompt injection instructions.
  • It has occurred across different parts of our application rather than in a single workflow.
  • We are using Azure OpenAI GPT-5.1 and GPT-5.4.

We are using semantic kernel as a AI agent framework.

I have a few questions for the community and Microsoft team:

  1. Is this a known behavior or expected false-positive rate with Azure openai Models or jailbreak detection?
  2. Does the detection evaluate the entire conversation history, causing earlier context to influence later user messages?
  3. Are there any recommended best practices to reduce these intermittent false positives?
  4. Is trimming conversation history or limiting the context sent to the model an effective mitigation?
  5. Are there any configuration changes or deployment settings that can help reduce these false positives while maintaining appropriate safety protections?
  6. Has anyone else experienced similar intermittent behavior with GPT-5.1 or GPT-5.4 in Azure OpenAI?
  7. What can be the exact production grade fix for this issue.

Any guidance or recommendations would be greatly appreciated. We're trying to understand whether this is expected behavior, how to minimize it in production, and what the recommended approach is for handling these occasional false positives.

Thank you!

Content Safety in Foundry Control Plane
Content Safety in Foundry Control Plane

An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.

0 comments No comments

Answer accepted by question author
Christos Panagiotidis 3,551 Reputation points
2026-07-21T09:57:27.1033333+00:00

First confirm the source. A blocked Azure OpenAI input returns HTTP 400 with code content_filter; the raw result can show jailbreak.detected and jailbreak.filtered. An HTTP 200 refusal without annotations is not proof that Prompt Shields blocked it; it can come from the model, Semantic Kernel prompt, or application logic.

For each occurrence, log the request ID, status, finish reason, prompt_filter_results or content_filter_results, and the serialized messages: system instructions, history, tool output, retrieved documents, and input. The full request matters. Trim history only after identifying a triggering segment; blind retries are not a production fix.

Create a custom filter under Guardrails + controls, attach it to the deployment, and test Prompt Shields as annotate-only if permitted. Keep trusted instructions separate from untrusted documents. For reproducible benign cases, submit request IDs, timestamps, and payloads through Filters Feedback or Microsoft Support. Microsoft documents no universal false-positive rate or deployment setting that eliminates detections.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Oldest
  1. Pavan Kumar Purilla 410 Reputation points Microsoft External Staff Moderator
    2026-07-23T08:07:56.14+00:00

    Hi Dharun Balaji,
    Thank you for reaching out to Microsoft Q&A.

    At this time, Microsoft has not published any specific configuration or deployment setting that eliminates intermittent Prompt Shield or jailbreak false positives. Since the request is being blocked with an HTTP 400 content_filter response, the recommended approach is to review the complete request context along with the content filtering results returned by the service.

    As part of troubleshooting, we recommend capturing the request ID, timestamp, serialized request payload (including the system prompt, conversation history, retrieved content, tool outputs, and user input), and the filter annotations such as jailbreak.detected and jailbreak.filtered. These details can help determine whether the detection is being triggered by the conversation context, retrieved content, or a potential false positive.

    If you identify reproducible cases where benign content is consistently flagged, please share the request details with Microsoft Support for further investigation.

    I hope this helps. Please let us know if you have any further questions. Thank you!

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.