Gemini API finishReason RECITATION - Google Cloud Community
Hi all, I use Gemini through its API on generativelanguage.googleapis.com. I sometimes get 0 candidates, with a finishReason = RECITATION. What should be the parameters in the POST query if I don't want it to stop for that reason but still answer? I see that there is a Github Issue about that, here: github.com/google/generative-ai-docs. Thank you!
If I prompt Gemini via the API with this, I hit the RECITATION issue. But if I paste it on the Gemini website, I get my answer: gemini.google.com. I think this is unfair...

Stream the response if you are not already, it will detect way less recitation than if you get it all in once.
With simple queries like, it fails with vertexai.generative_models._generative_models.ResponseValidationError: The model response did not completed successfully. Finish reason: 4. Gemini Ultra is totally unusable.

I'm also encountering the block reason RECITATION error when using gemini-1.0-pro-001; setting: BOCK_NONE with temperature=0.2 & t-top=0.6. I've narrowed down the issue to a specific day of data. Interestingly, I was able to get the needed response by Adjusting the number of JSON objects sent, Modifying multiprocessing settings, Running the code repeatedly for that day. However, this seems like a workaround, and the root cause of the error remains unclear.
Same issue here by simply asking it to explain a simple concept. Do I need to stream responses for simple chat interactions?

I've ceased attempts to utilize Google language models through Vertex AI as they proved to be non-functional. No feedback from google.
Did you manage to get anywhere with this? I'm trying to build RAG on top of this, but it keeps showing this error randomly. It's so frustrating.
Nope, my company just stopped trying to use Vertex AI. It was a terrible experience.

Still facing the same issue with gemini-1.5-flash!
Same here. As soon as the gemini-1.5-flash model flipped to production, it all my prompts broke and are returning this Recitation error. Am asking the model to parse and categorize info from the text of a job description, but it fails ~95% of the time because it finds web sources with part or all of the job description in its training data. This is insane behavior. Has anyone from this site actually gotten Google to help with similar issues?
For anyone else experiencing this issue, it appears there is an open issue here: issuetracker.google.com. Please +1 it to help drive attention. Unfortunately, while it is assigned, it's been open 2 months and does not appear to have any updates from google posted to it. So, not sure if we can expect a resolution any time soon. I may just have to go the way of @Nayjesy and abandon gemini.




















