Need help with Google Generative AI


The response I got is completely inaccurate. I think the prompt template from the Options is not being sent to the AI.
Or am I missing something?

Here are the options:

Here’s the prompt and response:


I don’t follow… what did it get wrong?

1 Like

Everything. Nothing in that response is accurate.

Well, it is an AI, so prone to hallucinations. My guess is that it probably didn’t get the template rendered properly for some reason. I only use mine for responses for TTS.

Does it give the same response if you run it again? Can you try the template in Developer Tools > Templates and see if it renders properly?

1 Like

Not even it’s “Summary” ( Overall ) ? … I Mean If Google AI , have that impression , it could be because it doesn’t have much “experience” to Compare against

1 Like

Great idea, checking the template in Developer Tools, it does render properly. It lists all the devices in their areas. It does not include device states.

I tried a few times and each response was fairly different. None were correct.

Response 1

text: >-

  • Kitchen: Warm white light is on at 50% brightness.

  • Living room: Accent lights are off.

  • Bedroom: Nightstand lamp is on at 25% brightness with a warm glow.

Heating and Cooling:

  • Thermostat: Set to 72°F for heating.

  • Smart thermostat: Currently maintaining a temperature of 70°F.


  • Door lock: Front door is locked.

  • Motion sensors: No motion detected in the last hour.

  • Security camera: Streaming live footage from the front porch.


  • Smart TV: Currently paused on a movie at the 30-minute mark.

  • Sound system: Playing background music at a low volume.


  • Refrigerator: Temperature is set to 38°F.

  • Dishwasher: Not running.

  • Washer and dryer: Both are idle.


  • Smart blinds: Kitchen blinds are fully open.

  • Smart fan: Ceiling fan in the living room is off.

  • Smart plug: Coffee maker is plugged in but not currently in use.

Note: This state is for illustrative purposes only and may not reflect the
actual state of a smart home.

Response 2

text: |-
Smart Home State:


  • Kitchen: On (40% brightness)
  • Living Room: On (60% brightness)
  • Bedroom: Off
  • Bathroom: Dimmed (20% brightness)
  • Porch: On (Auto-motion sensor)

Temperature Control:

  • Thermostat: Set to 72°F (Cooling)
  • Smart Vent: Open (50%) in the living room, closed in other rooms


  • Front Door: Locked
  • Back Door: Unlocked (Temporary for delivery)
  • Motion Sensors: Armed (All areas)
  • Smart Lock: Status unknown (Check battery)


  • TV: Off
  • Smart Speaker: Playing music (Volume 4)
  • Gaming Console: Idle


  • Refrigerator: Running
  • Dishwasher: Empty
  • Washer: Complete (Needs unloading)
  • Dryer: Running


  • Smart Shades: Closed (Bedroom)
  • Air Purifier: On (Auto)
  • Pet Feeder: 50% full (Scheduled to dispense at 5 pm)


  • Back door unlocked for package delivery. Lock after delivery.
  • Washer completed cycle. Unload immediately to prevent wrinkles.
  • Smart lock battery may be low. Check and replace if necessary.

Honestly, the best I got in this situation is AI gonna AI. Like I said, I use it for clever/sometimes witty TTS response messages and that’s it. It does fairly well at those.

I put your question in ChatGPT, this is what I got in response. (ps, it may not be accurate because ChatGPT could not read the screenshots):

It seems like you’re having issues with configuring Google Generative AI. Here are some steps you can follow to troubleshoot and improve the accuracy of the responses you’re getting:

1. Check Your Configuration Settings:

Ensure that all configuration settings are correct. This includes API keys, model versions, and any custom settings that might affect the output.

2. Review Your Prompt:

  • Clarity: Ensure your prompt is clear and concise.
  • Context: Provide enough context to guide the AI in generating a relevant response.
  • Specificity: Ask specific questions or provide detailed instructions to narrow down the possible responses.

3. Model Selection:

Verify that you are using the appropriate model for your task. Different models have varying strengths and might be better suited for different types of queries.

4. Training Data:

If you have the ability to fine-tune the model, make sure your training data is accurate and relevant to the responses you want.

5. Prompt Engineering:

Experiment with different ways of phrasing your prompt. Sometimes small changes in how you ask a question can lead to significantly better responses.

6. Response Feedback:

Use the feedback loop to improve responses. If the platform allows, provide feedback on the accuracy of responses to help improve the model’s performance over time.

7. Documentation and Support:

Refer to Google Generative AI’s official documentation for specific configuration options and troubleshooting tips. If needed, reach out to Google support for personalized assistance.

Example of a Detailed Prompt:

Instead of a generic prompt like “Tell me about climate change,” you might try:
“Explain the primary causes of climate change and how they contribute to global warming, focusing on industrial activities and greenhouse gas emissions.”

Example Configuration Check:

  • API Key: Ensure it is correctly set and has the necessary permissions.
  • Model: Verify you are using the intended version of the model.
  • Parameters: Adjust parameters like temperature, max tokens, and top_p to refine responses.

Common Configuration Parameters:

  • Temperature: Controls the randomness of the output. Lower values make the output more focused.
  • Max Tokens: Limits the length of the generated response.
  • Top_p (Nucleus Sampling): Limits the set of tokens considered at each step to those with the highest probability.


By carefully reviewing and adjusting these aspects, you should be able to improve the accuracy and relevance of the responses from Google Generative AI. If you provide more specific details about your current configuration and the exact prompt you’re using, I can offer more tailored advice.


AKA, what happens if you put Google Generative AI into ChatGPT… AKA, what happens if you type Google into Google. :rofl:

1 Like

So, put the ChatGPT response into Google Generative AI.

I feel a loop coming on!

YOU WILL BREAK THE INTERNET (it’s on top of Big Ben) and the Internet elders will be very angry.


It is like the clocktower being struck by lightning.

Nothing good can come from that.

This was not helpful. Thanks anyway.


Done. As shown in the original post.

Asking the AI to describe my smart home should be easy enough since it’s provided with the areas and devices.

All good.

This does not help me.

Done. As mentioned in a previous reply.

This does not help me with my current problem.

I don’t believe this is a Google problem. Which is why I asked for help on here and not on a Google forum.

Please don’t pay any attention to my friends - they get over excited. I’m going to take them to have a nice lie down now… :grin:


Well, your question was not much related to Home Assistant. Your prompt was sent to the AI and you got your answer from an AI. What do you expect us to say? AI isn’t perfect?


I expect that…

If you want a good AI answer, ask the same question 20 times. Then tell it to respond again using those 20 responses as the only base information.
I expect the answer to be a poem (or haiku) that follows the path of an M.C. Escher print.


The google_generative_ai_conversation.generate_content isn’t tied to a config entry so not to any prompt. [Code owner needs] to clarify this in the docs. You should use conversation.process if you want to use the prompt in the configure page.

1 Like