#How do I get my LLM to use the correct location to answer weather related questions?

1 messages · Page 1 of 1 (latest)

candid crypt
#

I have two weather entities exposed to the assist pipeline, the regular met.no one as well as the Buienradar (NL) weather integration. I have the blueprint script installed that @runic barn created (find it https://community.home-assistant.io/t/blueprints-for-voice-commands-weather-calendar-music-assistant/838071 here), and this is also exposed to said assist pipeline, and the LLM associated with it. Note that this LLM is ollama running on a Pi4, so not particularly powerful, but it does the job most of the time.

However, whenever I request weather information for say, next Wednesday, the answer I get is seemingly random (so, hallucinated?) weather information, with temperatures and wind directions being completely wrong. In some cases I get answers of a temperature being off by about 25 degrees C. So so far this is not particularly useful.

Most times the LLM also responds with the fact that it doesn't have access to real-time weather data. But it should because I exposed both the weather entities as well as that blueprint script to it.

Is there something I'm missing in that you need to specify to the LLM where it's located?

runic barn
#

For the blueprint to work, you actually don't need to expose a weather entity, it will use the weather enitty which you selected when setting up the blueprint

#

if you look at the trace of the script, you will see which data was entered by the LLM

#

and also which data it received as response data from the script

#

so the trace will help in debugging this

candid crypt
#

Okay, then something else is wrong, because the script has never been called so far, and there's no traces

#

does such a script require assist control to be enabled?

#

because I cannot enable control without any non-ha-assist request just failing

runic barn
#

yes, for the LLM to be able to use the script as a tool, it needs to have local access enabled

#

probably the model is too small , and it will be overloaded with all the data about your HA instance

#

I need some find some time to create an Option 2 variant, but that will be an automation

#

it will work with trigger sentences like option 1 does, but it will use the LLM to get the right date input

#

so it will be more flexible as option 1, but not as flexible as option 3

#

and you won't be able to ask questions like do I need to bring an umbrella for my dinner date tomorrow evening

autumn talon
#

With Pi4 you won't get working LLM with Assist control. It's just not powerful enough.

I was creating intent scripts for this, and used LLM only to refine information. But now, for the weather, I just use intent script, and define answer myself (it was pretty unstable with llama3.2 3B, so I ditched that).

candid crypt
#

okay, so that does explain it. I'm running tinyllama at the moment and it's sure not fast but the output is... entertaining. And sometimes even right