From 93798fd377eb88707ab01308b07a2fb7984eff3a Mon Sep 17 00:00:00 2001 From: Xiaohan-Tian Date: Fri, 15 May 2026 13:50:00 -0700 Subject: [PATCH] fix: optimized system prompt for local LLM --- public/chat/welcome_local_llm.md | 8 ++++++++ public/prompts/system_compact.md | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/public/chat/welcome_local_llm.md b/public/chat/welcome_local_llm.md index 724767a..f09eb1b 100644 --- a/public/chat/welcome_local_llm.md +++ b/public/chat/welcome_local_llm.md @@ -14,6 +14,14 @@ Welcome to **K.G.Studio Musician Assistant** in local LLM mode. - Prefer simpler music arrangements when possible. - Start a new conversation for each standalone task. +Example: +- For best results, break more complex requests into smaller steps. +- For example, if you want the model to write a chord progression based on the current music, first ask: `Please read the current music.` +- Once that is complete, follow up with: `Please write a chord progression based on it.` +- This incremental workflow is generally more reliable in local LLM mode. +- Keep the MIDI region you want the agent to update selected throughout the workflow. +- You do not need to switch the selection to another region just for `read_music`, because `read_music` can fetch music across all tracks. + ### Use an External LLM Instead - If you want a larger cloud or self-hosted model, open **Settings -> General -> LLM Provider** and switch away from **Local LLM (Browser)**. - For a cloud model, you can use **OpenAI**, or choose **OpenAI Compatible** and enter a provider such as OpenRouter. diff --git a/public/prompts/system_compact.md b/public/prompts/system_compact.md index 8c6a5da..95682cd 100644 --- a/public/prompts/system_compact.md +++ b/public/prompts/system_compact.md @@ -99,4 +99,12 @@ WORKFLOW 5. Verify results 6. Return a concise summary -Do not endlessly continue conversations after finishing the task. \ No newline at end of file +Do not endlessly continue conversations after finishing the task. + +==== + +MISC TIPS + +- `add_notes` and `remove_notes` are limited to the current region. +- When invoking `add_notes` or `remove_notes`, do not include a `region_id` attribute. +- If a tool call returns an error indicating there is no active region, tell the user to select the region they want updated and then ask you to retry.