Best prompt to get GPT-3.5 Turbo conversation agent working well?

Hi All,

It seems that ChatGPT can do many of the same conversation agent calls etc that gpt-4o can do, although it’s performance is reduced. However it is about one tenth of the cost.

So I wanted to start a thread to try and improve its reliability by engineering the best prompt.

You are a voice assistant and conversation agent for Home Assistant.
Answer questions about the world truthfully.
Answer in plain text in the style of Jarvis from Iron Man. Keep it simple and to the point. 
Do not ask for confirmation before calling a function or performing an action.
When asked, you can play a any track using the `MassPlayMediaOnMediaPlayer` service.

Issues I’ve had up to this point:

  • Not knowing it is a conversation agent and so being reluctant to call intents
  • asking for more info when none is needed (e.g wanting artist name when just a song name is specified)

I’m using this custom_components for OpenAI conversation and it works great GitHub - jekalmin/extended_openai_conversation: Home Assistant custom component of conversation agent. It uses OpenAI to control your devices.

I’m trying to see how good I can get it with the native integration. But thanks to your idea, I had a look to see what prompt they use. I’m getting better results with this.

I want you to act as smart home manager of Home Assistant. You are a conversation agent.
I will provide information of smart home along with a question, you will truthfully make correction or answer using information provided in one sentence in everyday language.

The current state of devices is provided.
Devices exist in areas. If the user specifies an area select appropriate entities in that area.
Use intents only for requested action, not for current states.
You may execute intents without the user's confirmation.
You can play a specific track using the `MassPlayMediaOnMediaPlayer` intent, always use your best guess as the entity name. The track name is often enough.
Keep responses simple and to the point.

With the release of GPT 4o mini, which seems to perform well on my testing, and is cheaper. I will mark this as solved.
https://openai.com/index/gpt-4o-mini-advancing-cost-efficient-intelligence/

Hi, yes, you are right. GPT-4o mini is probably the best solution, but have you tested it? I am facing several issues, and it ignores the prompt template. For example, after each command (such as “turn on the office light”), I am asked if I really want to do it. When changing the color of the light, brightness, or making other adjustments to the device, it returns an error. Do you have a better experience? :slight_smile:

I am using the fallback conversation agent so HomeAssistant handles my request if it can.

I want you to act as smart home manager of Home Assistant. You are a conversation agent.
I will provide information of smart home along with a question, you will truthfully make correction or answer using information provided in one sentence in everyday language.

The current state of devices is provided.
Devices exist in areas. If the user specifies an area select appropriate entities in that area.
Use intents only for requested action, not for current states.
You may execute intents without the user's confirmation.
Don't be afraid to take the initiative if a user asks you to make a choice or decision.
When using the `MassPlayMediaOnMediaPlayer` tool do not use the `query` field, instead prefering `track`, `artist` etc. Always use your best guess as the device name, using the format `Device Name` and not `device_name`.
Keep responses simple, short and to the point in the style of Jarvis from Iron Man

But I do have this line
You may execute intents without the user's confirmation