Share via

BadrequestError

Jun 0 Reputation points
2024-03-21T18:24:55.9966667+00:00

Created a chatbot to query company document, it works fine until the query contains some molecule ID, and system shows the error below:

how to solve this issue? the document is medicine development purpose and did not contain any violence content.

I am using GPT-4 with openAI_API_version:2023-03-15-preview

BadRequestError: Error code: 400 - {'error': {'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: https://go.microsoft.com/fwlink/?linkid=2198766", 'type': None, 'param': 'prompt', 'code': 'content_filter', 'status': 400, 'innererror': {'code': 'ResponsibleAIPolicyViolation', 'content_filter_result': {'hate': {'filtered': False, 'severity': 'safe'}, 'self_harm': {'filtered': False, 'severity': 'safe'}, 'sexual': {'filtered': False, 'severity': 'safe'}, 'violence': {'filtered': True, 'severity': 'medium'}}}}}

During handling of the above exception, another exception occurred:
Azure OpenAI in Foundry Models

2 answers

Sort by: Most helpful
  1. navba-MSFT 27,625 Reputation points Microsoft Employee Moderator
    2024-03-22T07:19:20.9066667+00:00

    @Jun Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    You can follow the below action plan to address this:

    Plan 1:
    Try to modify the input prompt, such as adding a description to tell the model that the following is not true, or removing the centered sensitive word through preprocessing. Please note that this method may not be applicable in all scenarios.

    Plan 2:

    If the above doesn't help. You need to request an opt-out of the content moderation mechanism. If your application scenario will inevitably encounter sensitive words, it is recommended that you apply directly and withdraw from the review mechanism, this method will be more stable, and we do not need to modify the prompt due to changes in user input.

    Please note that this application is manually reviewed by the Microsoft CSGATE team, so please be sure to fill it out carefully.

    You need to request to modify content filtering and/or abuse monitoring by submitting the form at https://aka.ms/oai/modifiedaccess

    After you submit this form, we review it and respond in approximately 10 business days. Some reviews may take longer than 10 business days for a final decision.

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    Was this answer helpful?

    0 comments No comments

  2. Azar 31,720 Reputation points MVP Volunteer Moderator
    2024-03-21T18:38:00.4866667+00:00

    Hey there Jun

    Thanks for posting the question in QandA platform\

    So based on the error message you gave, I see that the content filtering policy is blocking content related to "violence." The error message specifically states that the content related to violence has been filtered with a severity level of "medium."

    I understand you are using good data and prompt but still that contains elements or references related to violence, which is being flagged by the content filtering policy.

    I suggest you to review and modify the query prompt to remove or adjust any language or references that could be interpreted as promoting or containing violent content.

    Ill drop the link to the azure ai content filtering document. go through them for more details.

    https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/content-filter?tabs=warning%2Cpython-new

    If this helps kindly accept the answer thanks much.,

    Was this answer helpful?


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.