issue with Analyze and Reason on Multimodal Data with Gemini: Challenge Lab

On the deep dive with Gemini 2.5 flash section, check my progress says I have an error. I’ve attached my code for that section below, which produces a reasonable output but fails the auto grader. Could you help me resolve this issue?

 

Instructions

# 1. Construct the prompt for Gemini # TODO: Write a prompt that instructs the Gemini model to analyze the customer reviews and social media posts in more detail. # The prompt should include clear instructions to: # - Identify the main factors driving positive and negative sentiment. # - Assess the overall impact of the new athletic apparel line on brand perception. # - Identify three key areas where Cymbal Direct can improve customer satisfaction or product offerings. # - Imagine you are presenting your findings to the Cymbal Direct marketing team and highlight the three most important takeaways.

# 2. Send the prompt to the Gemini Thinking model

# TODO: Use the client.models.generate_content method to send the prompt and text data to the Gemini model. # TODO: Make sure to specify the MODEL_ID and the thinking_mode_prompt as parameters. # TODO: Also, pass the config object to enable thinking mode. # TODO: Store the response from the model in a variable named thinking_model_response.

# 3. Print thoughts and answer

# 4. Save the text analysis to a file

Code:

thinking_mode_prompt = f""" Read the provided doc of customer reviews and social media posts, then answer the following questions: {text_data}. Identify the main factors driving positive and negative sentiment. Assess the overall impact of the new athletic apparel line on brand perception. Identify three key areas where Cymbal Direct can improve customer satisfaction or product offerings. Imagine you are presenting your findings to the Cymbal Direct marketing and highlight the three most important takeaways. """

thinking_model_response = client.models.generate_content( model=MODEL_ID, contents=thinking_mode_prompt, config=types.GenerateContentConfig(thinking_config=types.ThinkingConfig(include_thoughts=True,thinking_budget=1024)))

print_thoughts(thinking_model_response)

with open('analysis/text_analysis.md', 'w') as f: f.write(thinking_model_response.text)

 

1 0 84
0 REPLIES 0
Top Labels in this Space