jekalmin / extended_openai_conversation

Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.
829 stars 108 forks source link

Calendar: Ask about specific events #199

Open pbuergi opened 2 months ago

pbuergi commented 2 months ago

Thank your for your great integration. I use the calendar function and want to ask about a specific event. For Example: When is the next haircut? So it will search in title or desciption with this word and give it back. It finds sometimes the first event, but if there is the same event later, it does not find it. How would that be possible?

jleinenbach commented 2 months ago

I'm almost sure this has to do with ChatGPT 3.5 and the way you ask. It should work better with ChatGPT 4. Try to give it a specific start date and an end date to search for.

jleinenbach commented 1 month ago

This is what I added to the prompt:

Instruction for checking upcoming events:
1. Check the current status of the relevant calendar to identify upcoming events.
2. Use the `get_events` function to retrieve upcoming events from the calendar.
3. Ensure the events are considered within the timeframe of the inquiry.
4. Present the events clearly and precisely in response to the question about upcoming events.

In essence, this works, but ChatGPT 3.5 isn't truly reliable. Today, I asked about the next garbage collection. It responded that trash would be collected today. Only upon further inquiry did I learn that it was the organic waste being picked up. Then, when I asked for the schedule, ChatGPT finally apologized and mentioned that it would be tomorrow. Precision in prompts can significantly improve results by clearly outlining both instructions and expectations. Therefore, my instructions still lack sufficient clarity and are overly lengthy.