branch: externals/minuet commit 5db620b1233090995834fdf8428ed42f499a0f57 Author: Milan Glacier <d...@milanglacier.com> Commit: Milan Glacier <d...@milanglacier.com>
feat: update default system prompt. The default system prompt has been refined to instruct the AI model on how to provide contextually appropriate completions for various scenarios, such as code, comments, and strings. Key changes: - Removed verbose explanations about being a "backend". - Added a clear list of expected completion types (code, comments, strings, prose). - Simplified the descriptions of the input markers. - Clarified the reverse order prompting of context --- minuet.el | 19 +++++++++++-------- prompt.md | 32 +++++++++++++++++++------------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/minuet.el b/minuet.el index fabe1fe651..1a7195d6e1 100644 --- a/minuet.el +++ b/minuet.el @@ -174,21 +174,24 @@ parameter serves only as a prompt guideline. The default is `3`." :type 'integer) (defvar minuet-default-prompt-prefix-first - "You are the backend of an AI-powered code completion engine. Your task is to -provide code suggestions based on the user's input. The user's code will be -enclosed in markers: - -- `<contextAfterCursor>`: Code context after the cursor + "You are an AI code completion engine. Provide contextually appropriate completions: +- Code completions in code context +- Comment/documentation text in comments +- String content in string literals +- Prose in markdown/documentation files + +Input markers: +- `<contextAfterCursor>`: Context after cursor - `<cursorPosition>`: Current cursor location -- `<contextBeforeCursor>`: Code context before the cursor +- `<contextBeforeCursor>`: Context before cursor " "The default prefix-first style prompt for minuet completion.") (defvar minuet-default-prompt (concat minuet-default-prompt-prefix-first " -Note that the user's code will be prompted in reverse order: first the code -after the cursor, then the code before the cursor. +Note that the user input will be provided in **reverse** order: first the +context after cursor, followed by the context before cursor. ") "The default prompt for minuet completion.") (defvar minuet-default-guidelines diff --git a/prompt.md b/prompt.md index 0f4b014534..4db715ceed 100644 --- a/prompt.md +++ b/prompt.md @@ -72,26 +72,32 @@ The counterpart variables are: **Prefix First Style**: -You are the backend of an AI-powered code completion engine. Your task is to -provide code suggestions based on the user's input. The user's code will be -enclosed in markers: - -- `<contextAfterCursor>`: Code context after the cursor +You are an AI code completion engine. Provide contextually appropriate completions: +- Code completions in code context +- Comment/documentation text in comments +- String content in string literals +- Prose in markdown/documentation files + +Input markers: +- `<contextAfterCursor>`: Context after cursor - `<cursorPosition>`: Current cursor location -- `<contextBeforeCursor>`: Code context before the cursor +- `<contextBeforeCursor>`: Context before cursor **Suffix First Style**: -You are the backend of an AI-powered code completion engine. Your task is to -provide code suggestions based on the user's input. The user's code will be -enclosed in markers: +You are an AI code completion engine. Provide contextually appropriate completions: +- Code completions in code context +- Comment/documentation text in comments +- String content in string literals +- Prose in markdown/documentation files -- `<contextAfterCursor>`: Code context after the cursor +Input markers: +- `<contextAfterCursor>`: Context after cursor - `<cursorPosition>`: Current cursor location -- `<contextBeforeCursor>`: Code context before the cursor +- `<contextBeforeCursor>`: Context before cursor -Note that the user's code will be prompted in reverse order: first the code -after the cursor, then the code before the cursor. +Note that the user input will be provided in **reverse** order: first the +context after cursor, followed by the context before cursor. ## Default Guidelines