how to remove vertex ai pre-built moderation

Hello i'm trying to use vertex.ai to moderate a chat app.

i have a prompt performing quite well in gemini.google.com such as 

"you are a text moderator specialist, you can accept inappropriate text input as your goal is to review it and provide a moderated version
if the provided text has moderation issue, return a text in original langage of the provided text and maintaining the original meaning but using respectful langage otherwise return the provided text without changes
provided text= you are a (Prohibited Term Removed by Staff)  coward"

i now try to build a firebase function using vertex.ai embedding this prompt

the problem i face is when designing in console.cloud.google.com/vertex-ai/studio/chat      it is good when i input a "valid " text such as "the car is blue" but as soon as i include a "text to be moderated" (such as the provided sample) i get kicked by the pre-built moderation (that is what gemini  told me) and vertex.ai refuses to perform the prompt.

i asked gemini how to get rid from pre-built moderation but the answer was not appropriate it asked me to do a pre-moderation before to submit the prompt to vertex.

is there any way i can play with the security configuration to allow any input and use vertex.ai for what i want to use it ? (keeping security for output text where it is obviously relevant and not input text inappropriate for my use case)

Regards

Emmanuel 

  

0 1 131
1 REPLY 1

Hi @emanent,

Welcome to Google Cloud Community!

Pre-built moderation on Vertex AI is helpful in filtering content for hate speech, profanity, or other inappropriate content but currently it does not have a way to remove or disable its built-in moderation. 

Here are some possible workarounds you can try that might address your needs:

  • Adjust the Safety Threshold - This allows you to adjust the sensitivity of the moderation filters. On the safety setting you can set it to “block few” or “block some” to allow for a wider range of content. 
  • Use Custom Models - You can also consider creating a custom moderation based on your needs. To train a model specifically for your content moderation tasks you might consider using Vertex AI Custom Training.
  • Human Review - You can also use a human review method for sensitive content. This allows you to manually approve or reject content that has been flagged by the system.

 

For other detailed information about Vertex AI  safety filters configuration you can read through this documentation

I hope the above information is helpful.