Skip to content

Commit db31ea3

Browse files
authored
Merge pull request #126
Optimize default prompts to greatly reduce token usage and improve efficiency.
2 parents 88b46f3 + 98caa70 commit db31ea3

42 files changed

Lines changed: 536 additions & 2882 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
.idea
2-
.vscode
3-
.venv
41
.env
5-
*.db
2+
.venv/
3+
.idea/
4+
.vscode/
5+
__pycache__/
6+
.ruff_cache/

ac_mode_and_fan_control_full_llm.yaml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blueprint:
2-
name: Voice - Control AC Mode, Temp & Fan Speed
2+
name: Control AC Mode, Temp & Fan Speed
33
author: luuquangvu
44
source_url: https://github.com/luuquangvu/tutorials/blob/main/ac_mode_and_fan_control_full_llm.yaml
55
description: |-
@@ -70,41 +70,41 @@ blueprint:
7070
input:
7171
ac_entities_prompt:
7272
name: AC Entities Prompt
73-
description: The prompt which will be used for the LLM can provide the name of ACs for controlling.
73+
description: The prompt used by the AI to identify the AC units to control
7474
selector:
7575
text:
7676
multiline: true
7777
default: |-
78-
Required: AC names to control. Separate multiple with semicolon (;).
78+
AC names; separate with semicolon (;)
7979
hvac_mode_prompt:
8080
name: HVAC Mode Prompt
81-
description: The prompt which will be used for the LLM can provide the AC mode.
81+
description: The prompt used by the AI to identify the desired AC mode
8282
selector:
8383
text:
8484
multiline: true
8585
default: |-
86-
AC mode (`auto`, `cool`, `heat`, `dry`, `fan_only`, `off`). Only if requested. Error if unsupported; no guessing.
86+
AC mode. Only if requested
8787
temperature_prompt:
8888
name: Temperature Prompt
89-
description: The prompt which will be used for the LLM can provide the target temperature.
89+
description: The prompt used by the AI to identify the target temperature
9090
selector:
9191
text:
9292
multiline: true
9393
default: |-
94-
Target temp as number (e.g. `24`). Convert F to C. No units. Only if requested.
94+
Target temp (number). Convert F to C. Only if requested
9595
fan_mode_prompt:
9696
name: Fan Mode Prompt
97-
description: The prompt which will be used for the LLM can provide the fan speed/mode of the AC.
97+
description: The prompt used by the AI to identify the fan speed or mode
9898
selector:
9999
text:
100100
multiline: true
101101
default: |-
102-
Fan speed (`auto`, `low`/`1`, `lowmid`/`2`, `mid`/`3`, `highmid`/`4`, `high`/`5`). Map to closest. Only if requested. No guessing.
102+
Fan speed. Map to closest. Only if requested
103103
mode: parallel
104104
max_exceeded: silent
105-
description: Controls mode, temperature, and fan speed for air conditioners. Supports auto, cool, heat, dry, and fan_only modes.
105+
description: Controls AC mode, temperature, and fan speed
106106
variables:
107-
version: 20260222
107+
version: 20260409
108108
fields:
109109
ac_entities:
110110
name: AC Entities
@@ -116,7 +116,14 @@ fields:
116116
name: HVAC Mode
117117
description: !input hvac_mode_prompt
118118
selector:
119-
text:
119+
select:
120+
options:
121+
- "auto"
122+
- "cool"
123+
- "heat"
124+
- "dry"
125+
- "fan_only"
126+
- "off"
120127
temperature:
121128
name: Temperature
122129
description: !input temperature_prompt
@@ -126,7 +133,14 @@ fields:
126133
name: Fan Mode
127134
description: !input fan_mode_prompt
128135
selector:
129-
text:
136+
select:
137+
options:
138+
- "auto"
139+
- "low"
140+
- "lowmid"
141+
- "mid"
142+
- "highmid"
143+
- "high"
130144
sequence:
131145
- variables:
132146
entity_aliases: !input entity_aliases

advanced_google_search_full_llm.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blueprint:
2-
name: Voice - Perform Google Search
2+
name: Perform Google Search
33
author: luuquangvu
44
source_url: https://github.com/luuquangvu/tutorials/blob/main/advanced_google_search_full_llm.yaml
55
description: |-
@@ -51,25 +51,25 @@ blueprint:
5151
input:
5252
query_string_prompt:
5353
name: Query String Prompt
54-
description: The prompt which will be used for the LLM can provide the search string for the query.
54+
description: The search string used by the AI to find information on Google
5555
selector:
5656
text:
5757
multiline: true
5858
default: |-
59-
Required: Search query. Silence-correct misspellings. No clarification.
59+
Search query. Silence-correct misspellings. No clarification
6060
language_prompt:
6161
name: Language Prompt
62-
description: The prompt which will be used for the LLM can provide the language for the query.
62+
description: The language tag (e.g., en-US) used by the AI for the Google search results
6363
selector:
6464
text:
6565
multiline: true
6666
default: |-
67-
Required: Language tag (e.g. `en-US`). Match user language.
67+
Language tag (e.g. en-US). Match user language
6868
mode: parallel
6969
max_exceeded: silent
70-
description: Searches Google to retrieve real-time information, facts, or answers from the web. Use when local knowledge is insufficient.
70+
description: Searches Google to retrieve real-time information or answers from the web
7171
variables:
72-
version: 20260207
72+
version: 20260409
7373
fields:
7474
query_string:
7575
name: Query String

advanced_youtube_search_full_llm.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blueprint:
2-
name: Voice - Perform YouTube Search
2+
name: Perform YouTube Search
33
author: luuquangvu
44
source_url: https://github.com/luuquangvu/tutorials/blob/main/advanced_youtube_search_full_llm.yaml
55
description: |-
@@ -66,25 +66,25 @@ blueprint:
6666
input:
6767
query_string_prompt:
6868
name: Query String Prompt
69-
description: The prompt which will be used for the LLM can provide the search string for the query.
69+
description: The search string used by the AI to find YouTube videos
7070
selector:
7171
text:
7272
multiline: true
7373
default: |-
74-
Required: Search query. Silence-correct misspellings. Use ordinals for results, omit Media IDs. Confirm if ambiguous.
74+
Search query. Silence-correct misspellings. Use ordinals for results, omit Media IDs. Confirm if ambiguous
7575
page_token_prompt:
7676
name: Page Token Prompt
77-
description: The prompt which will be used for the LLM can provide the page token to get additional videos that could be obtained.
77+
description: The token used by the AI to fetch the next page of YouTube results
7878
selector:
7979
text:
8080
multiline: true
8181
default: |-
82-
Optional: Token to fetch more videos.
82+
Token to fetch more videos
8383
mode: parallel
8484
max_exceeded: silent
85-
description: Searches YouTube for videos and returns a list of matching results with titles and descriptions. Use to find specific content or playlists.
85+
description: Searches YouTube for videos and returns matching results
8686
variables:
87-
version: 20260207
87+
version: 20260409
8888
fields:
8989
query_string:
9090
name: Query String

calendar_events_lookup_full_llm.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blueprint:
2-
name: Voice - Get Calendar Events
2+
name: Get Calendar Events
33
author: luuquangvu
44
source_url: https://github.com/luuquangvu/tutorials/blob/main/calendar_events_lookup_full_llm.yaml
55
description: |-
@@ -46,41 +46,41 @@ blueprint:
4646
input:
4747
time_period_type_prompt:
4848
name: Time Period Type Prompt
49-
description: The prompt which will be used for the LLM can provide the type for the period (days or hours).
49+
description: The prompt used by the AI to identify the period type (daily or hourly) [Human-only]
5050
selector:
5151
text:
5252
multiline: true
5353
default: |-
54-
Required: `daily` (full days) or `hourly` (partial). Output only day of week and start date.
54+
daily or hourly
5555
time_period_length_prompt:
5656
name: Time Period Length Prompt
57-
description: The prompt which will be used for the LLM can provide the length of the period.
57+
description: The prompt used by the AI to identify the period length [Human-only]
5858
selector:
5959
text:
6060
multiline: true
6161
default: |-
62-
Required: Length in days/hours (e.g. 1, 7, 6).
62+
Length in days (daily) or hours (hourly)
6363
date_prompt:
6464
name: Date Prompt
65-
description: The prompt which will be used for the LLM can provide the start date for the events period.
65+
description: The prompt used by the AI to identify the starting date [Human-only]
6666
selector:
6767
text:
6868
multiline: true
6969
default: |-
70-
Required: Start date (`YYYY-MM-DD`). Default today. `Night` = next day if >= `05:00:00`.
70+
Start date (YYYY-MM-DD). Default today. Night=next day if >=05:00:00
7171
time_prompt:
7272
name: Time Prompt
73-
description: The prompt which will be used for the LLM can provide the start time for the events period.
73+
description: The prompt used by the AI to identify the starting time [Human-only]
7474
selector:
7575
text:
7676
multiline: true
7777
default: |-
78-
Required: Start time (`HH:MM:SS`). Morning=`06:00:00`, Afternoon=`12:00:00`, Evening=`18:00:00`, Night/Full day=`00:00:00`.
78+
Start time (HH:MM:SS)
7979
mode: parallel
8080
max_exceeded: silent
81-
description: Retrieves upcoming or past calendar events for a specific time period. Useful for checking schedules and appointments.
81+
description: Retrieves upcoming or past calendar events for a specific period
8282
variables:
83-
version: 20260222
83+
version: 20260409
8484
fields:
8585
time_period_type:
8686
name: Time Period Type

camera_snapshot_full_llm.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blueprint:
2-
name: Voice - Capture Camera Snapshot
2+
name: Capture Camera Snapshot
33
author: luuquangvu
44
source_url: https://github.com/luuquangvu/tutorials/blob/main/camera_snapshot_full_llm.yaml
55
description: |-
@@ -95,17 +95,17 @@ blueprint:
9595
input:
9696
camera_name_prompt:
9797
name: Camera Name Prompt
98-
description: The prompt which will be used for the LLM can provide the camera name.
98+
description: The friendly name of the camera to capture a snapshot from, provided by the AI
9999
selector:
100100
text:
101101
multiline: true
102102
default: |-
103-
Required: Camera friendly name. Multiple cameras = multiple calls. Returns local image path.
103+
Camera name. Returns local image path. Multiple cameras = multiple calls
104104
mode: parallel
105105
max_exceeded: silent
106-
description: Captures and saves a camera snapshot. Returns the local file path for analysis or messaging tools. Useful for visual verification of a scene.
106+
description: Captures a camera snapshot and returns the file path
107107
variables:
108-
version: 20260207
108+
version: 20260409
109109
fields:
110110
camera_name:
111111
name: Camera Name

control_music_full_llm.yaml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blueprint:
2-
name: Voice - Control Music
2+
name: Control Music
33
author: luuquangvu
44
source_url: https://github.com/luuquangvu/tutorials/blob/main/control_music_full_llm.yaml
55
description: |-
@@ -76,76 +76,76 @@ blueprint:
7676
input:
7777
media_type_prompt:
7878
name: Media Type Prompt
79-
description: The prompt that the LLM will use to provide the media_type.
79+
description: The type of media (track, album, artist, etc.) used by the AI to filter results
8080
selector:
8181
text:
8282
multiline: true
8383
multiple: false
8484
default: |-
85-
Required: track, album, artist, playlist, radio. Default: `track` for genre/mood/list.
85+
Default: track for genre/mood/list
8686
artist_prompt:
8787
name: Artist Prompt
88-
description: The prompt that the LLM will use to provide the artist.
88+
description: The artist name used by the AI to find music
8989
selector:
9090
text:
9191
multiline: true
9292
multiple: false
9393
default: |-
94-
Requested artist(s). Empty if unknown/multiple.
94+
Requested artist(s). Empty if unknown/multiple
9595
album_prompt:
9696
name: Album Prompt
97-
description: The prompt that the LLM will use to provide the album.
97+
description: The album name used by the AI to find music
9898
selector:
9999
text:
100100
multiline: true
101101
multiple: false
102102
default: |-
103-
Requested album. Empty if unknown/multiple.
103+
Requested album. Empty if unknown/multiple
104104
media_id_prompt:
105105
name: Media ID Prompt
106-
description: The prompt that the LLM will use to provide the media_id.
106+
description: The specific media name or ID used by the AI to identify content
107107
selector:
108108
text:
109109
multiline: true
110110
multiple: false
111111
default: |-
112-
Required: Specific name(s). Tracks/Albums: semicolon separated. Artists/Playlists/Radio: exact name (omit `playlist` keyword).
112+
Specific name(s). Tracks/Albums: semicolon separated. Artists/Playlists/Radio: exact name (omit playlist keyword)
113113
media_description_prompt:
114114
name: Media Description Prompt
115-
description: The prompt that the LLM will use to provide the media description.
115+
description: The descriptive information about the media provided by the AI
116116
selector:
117117
text:
118118
multiline: true
119119
multiple: false
120120
default: |-
121-
Required: Extracted media description from query (e.g. `the best Queen songs`). Omit area/player details.
121+
Extracted media description from query (e.g. the best Queen songs). Omit area/player details
122122
area_prompt:
123123
name: Area Prompt
124-
description: The prompt that the LLM will use to provide the area.
124+
description: The area(s) where the music should be played, provided by the AI
125125
selector:
126126
text:
127127
multiline: true
128128
multiple: false
129129
default: |-
130-
Requested area(s). Default to initiating device area. Omit if player specified.
130+
Requested area(s). Default to initiating device area. Omit if player specified
131131
media_player_prompt:
132132
name: Media Player Prompt
133-
description: The prompt that the LLM will use to provide the media player.
133+
description: The specific media player entity_id(s) where music should be played, provided by the AI
134134
selector:
135135
text:
136136
multiline: true
137137
multiple: false
138138
default: |-
139-
Target Music Assistant `media_player` entity_id(s). ONLY if explicitly mentioned.
139+
Target Music Assistant media_player entity_id(s). ONLY if explicitly mentioned
140140
shuffle_prompt:
141141
name: Shuffle Prompt
142-
description: The prompt that the LLM will use to determine whether to turn on shuffle or not.
142+
description: The shuffle state (on/off) determined by the AI based on the request
143143
selector:
144144
text:
145145
multiline: true
146146
multiple: false
147147
default: |-
148-
Required: `true` or `false`. `true` ONLY if shuffling explicitly requested. No guessing.
148+
true or false. true ONLY if shuffling explicitly requested. No guessing
149149
addition_conditions_actions:
150150
name: Additional actions
151151
icon: mdi:wrench
@@ -163,9 +163,9 @@ blueprint:
163163
default: []
164164
mode: parallel
165165
max_exceeded: silent
166-
description: Plays music via Music Assistant. Supports tracks, albums, artists, playlists, and radio. Requires media type, ID, and shuffle status.
166+
description: Plays music via Music Assistant. Supports tracks, albums, artists, and playlists
167167
variables:
168-
version: 20260222
168+
version: 20260409
169169
fields:
170170
media_type:
171171
selector:

0 commit comments

Comments
 (0)