Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Gemini Advanced 2.0 Flash failing to follow the given output format

Hello Everyone, I was trying out the latest Gemini Advanced 2.0 Flash, and encountered errors when I wanted to get an output in a specified format.

Example:

Input Prompt: """
INSTRUCTION: You are the most celebrated commodity analyst globally. Perform the following TASK.

TASK: Analyze the given NEWS article and assess its relevance to the price of Silver (XAG). Based on your analysis and assessment, provide a single sentiment score (any real number between -1 and +1, where -1 indicates a bearish sentiment towards Silver prices, 0 is neutral, and +1 indicates a bullish sentiment towards Silver prices).
Consider factors like mentions of Silver prices, market trends, geopolitical events, Exchange-traded funds (ETFs) like iShares Silver Trust (SLV),regulatory Tweet affecting the Silver industry, technological developments related to Silver, and the overall economic context. Also, consider the overall context of the NEWS.
You will output a valid JSON object with the following information:

OUTPUT FORMAT:
"Sentiment Score": <A single numerical value between -1 and 1 representing the sentiment on Silver prices>,
"Explanation": <A concise explanation justifying the score and highlighting key factors from the NEWS article supporting your assessment.>

IMPORTANT : Strictly follow the given OUTPUT FORMAT. No long paragraphs necessary. Just stick to the given format.

NEWS: {body}
Output:
"""

Gemini Output: """

Thunderstruck Resources Ltd. announced the conclusion of its earn-in agreement with JOGMEC on the Korokayiu VMS prospect in Fiji, with the latter surrendering its option to acquire 70% of the project. Thunderstruck will now focus on exploring gold and silver targets at Korokayiu, in addition to base metals. The company's properties in Fiji have shown potential for precious metals, and this renewed focus on gold and silver exploration could lead to positive developments for the company and potentially impact silver prices.
"""

An appropriate news article is provided in the given placeholder. Gemini gives out the correct format in few of the cases but in 25% of cases, the output is like the one given in the example. Is it Gemini's fault of understanding, or I am failing to provide an appropriate prompt? Please let me know.
0 0 34
0 REPLIES 0