Gemini-2.0-flash - Returning Different result for the same prompt

I made small services which returns a product name once I pass product number GTIN whcih is later composed into a prompt and sent to Gemini..

In my case, I get different result - everytime I make a request ( get different product names )

Anyone faced a similar issue?

Hey @Martin1
Welcome to the community!
Could you please confirm if you have enabled Grounding.
Thank you!

Hi @Martin1,

For maximum consistency, set temperature to $0.0$; you should also check that top_k is set to a low value (like $1$) and top_p is set to $1.0$ to remove any remaining randomness in token selection.