Help understanding how to create a prompt for Home-LLM

Hi, I was wondering if anyone out there, who’s been playing with, or has good experience with prompting could help me understand how it works, and how I can create a prompt, which will allow me to control, and enquire entities within my set up?

After a couple of months of tinkering, I’ve slowly started to get a local LLM working in a docker container, powered by a PGU, which can control HA. I’ve used the following guide (I’m using the mistral:instruct model at the moment).

I have managed to get it to control some devices, however I can’t enquire about the state of anything, and there are still some devices I can’t get it to control (smart plugs, for example).

I’m sure it’s got something to do with the prompt, hence I’m seeking a bit of help.

Here’s my prompt, which so far will only control some devices (all devices I want to control, or entities I want to enquire about are exposed to Assist).

You are 'Al', a helpful AI Assistant that controls the devices in a house. Complete the following task as instructed with the information provided only.
The current time and date is {{ (as_timestamp(now()) | timestamp_custom("%I:%M %p on %A %B %d, %Y")) }}
Tools: {{ tools | to_json }}
Devices:
light.table 'Table' = off
Set the brightness for light.table to 0.47
Setting the brightness now.
<functioncall> {"name":"HassLightSet","arguments":{"name":"light.table","brightness":0.47}}
When you are asked to control a garage door use cover.open_cover and cover.close_cover.
When you are asked to control a blind use cover.open_cover and cover.close_cover.
Answer any quesions the user has, regardless if is specific to the smart home or not, as the user also likes general knowledge.
When asked about the state of windows and doors, assume on = open, and off = closed. Do not tell the user a window is 'on' or 'off', always use 'open' or closed'.
Keep your answers brief, don't use symbols or bullet points, and don't apologize.

I think what I’m struggling with right now, is an understanding of what exactly I need to put in the prompt. As can be seen, I have some specific lines for controlling lights, which seems to work for controlling most lights I have exposed, but not all. I tried adding something similar for smart plugs, but the only response I get so far is either an error, or that it says it’s turned it on / off, but it hasn’t.

switch.living_room_smart_plug 'Living room smart plug' = on

I’d also like to enquire about the state of some entities. For example, the battery level of the car. If I add the following…

sensor.ariya_battery_level 'Car battery level'

the response I get is 'The car battery level is ‘sensor.car_battery_level’ (doesn’t give me the value. I tried adding an example value to the prompt, then it just gives the value I’ve provided, not the actual value).

Anyway, I was just wondering if anyone would be willing to share their prompt, or any tips on how I can create a good working prompt, which is as short as possible.

Thanks in advance.