I'm building an application that allows users to extract information from their documents using Gemini. When a user tries to extract something like a social security number from a document, the API responds with the following stop reason from https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes#unsafe_...:
SPII: The token generation was stopped because the response was flagged for Sensitive Personally Identifiable Information (SPII) content.
This value is listed as a "Non-configurable safety filter" so it sounds like there's no way to change it. However, this is a blocker for my application because it does not make sense to prevent a user from extracting data from their own documents.
I already filled out the Gemini safety filter allowlist from https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes#how_to_... to resolve other issues related to safety filtering, but I don't think this will fix the SPII issue.
Are there plans to allow developers to disable the SPII filter? Noting that OpenAI has no problem with extracting social security numbers from documents.
Hello,
Thank you for contacting the Google Cloud Community.
I have gone through your reported issue, however it seems like this is an issue observed specifically at your end. It would need more specific debugging and analysis. To ensure a faster resolution and dedicated support for your issue, I kindly request you to file a support ticket by clicking here. Our support team will prioritize your request and provide you with the assistance you need.
For individual support issues, it is best to utilize the support ticketing system. We appreciate your cooperation!
I don't think this issue is specific to me. I think this issue may be caused by the JSON mode. I created a public repo https://github.com/kym6464/ocr-api/tree/main/gemini-spii-sample that anyone can use to reproduce the error described in this post.
Please let me know if there is any other info I can provide!