Azure OpenAI False Positive Content Filter Issue When Parsing PDFs with Images

Hungry Scripter 0 Reputation points
2025-03-06T18:11:32.3466667+00:00

When attempting to parse a PDF document with Azure Open AI, it returns the following error for one of the pages that contains a family photo:

Error processing page: Error code: 400 - {'error': {'inner_error': {'code': 'ResponsibleAIPolicyViolation', 'content_filter_results': {'sexual': {'filtered': True, 'severity': 'high'}, 'violence': {'filtered': False, 'severity': 'safe'}, 'hate': {'filtered': False, 'severity': 'safe'}, 'self_harm': {'filtered': False, 'severity': 'safe'}}}, 'code': 'content_filter', 'message': "The response was filtered due to the prompt triggering Azure OpenAI's content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: \r\nhttps://go.microsoft.com/fwlink/?linkid=2198766.", 'param': 'prompt', 'type': None}}

Our product needs to parse PDF files with photos, so we need to solve for this use case. Also, the photo didn't contain any sexual content, so this seems to be a false positive and it happened multiple times when we kept attempting to parse the document.

We checked our "Safety+Security" content filters and the values for all parameters were already set to high for both input and output filters.

Can anybody help us with this?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,092 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SriLakshmi C 6,250 Reputation points Microsoft External Staff Moderator
    2025-03-11T11:48:02.85+00:00

    Hello Hungry Scripter,

    The error occurring in Azure OpenAI while processing a PDF with a family photo seems to be a false positive triggered by content filtering policies. The system incorrectly flagged the content as potentially containing sexual material, even though you have confirmed that it does not.

    To address the issue of false positives when processing PDFs with Azure OpenAI, you can take several steps to mitigate content filtering errors.

    Review the flagged content to confirm that it does not contain elements that could be misinterpreted by the content filter. Since your severity settings for input and output filters are already set to high, consider experimenting with different configurations to see if the filtering behavior changes.

    Additionally, preprocessing the PDF before sending it such as adjusting image quality or format may help avoid misclassification.

    If the issue persists, document key details of the false positive, including a description of the flagged content (such as the family photo), the context in which it appears within the PDF, the specific reason provided by Azure AI Content Safety for flagging it, and an explanation of why it should not be considered a violation.

    Reviewing Azure’s content filtering policies and severity definitions can provide insights into how the system categorizes content. Understanding these policies may help in making necessary adjustments to prevent false positives and ensure smooth document processing.

    Please refer this Mitigate false results in Azure AI Content Safety, Default content safety policies.

    I Hope this helps. Do let me know if you have any further queries.

    Thank you!

    0 comments No comments

Your answer

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