From 480c943a21268616903a4ae8d606e6f0f1653a9d Mon Sep 17 00:00:00 2001 From: mattprodani Date: Sat, 21 Dec 2024 16:40:07 -0500 Subject: [PATCH] Update `suggest_edits` prompt to clarify usage of `` when using update/create operations. - Add a mention that `old_text` is required for all but create - Change definition of `create` operation to also mean overwrite, as some models heavily prefer rewrites. - Remove mention of entire range being used as `old_text` when not specified. --- assets/prompts/suggest_edits.hbs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/prompts/suggest_edits.hbs b/assets/prompts/suggest_edits.hbs index 9a5fba43d5..c2f74ebf88 100644 --- a/assets/prompts/suggest_edits.hbs +++ b/assets/prompts/suggest_edits.hbs @@ -13,15 +13,15 @@ You must describe the change using the following XML structure: - (optional) - An arbitrarily-long comment that describes the purpose of this edit. - (optional) - An excerpt from the file's current contents that uniquely - identifies a range within the file where the edit should occur. If this tag is not - specified, then the entire file will be used as the range. + identifies a range within the file where the edit should occur. Required for all operations + except `create`. - (required) - The new text to insert into the file. - (required) - The type of change that should occur at the given range of the file. Must be one of the following values: - `update`: Replaces the entire range with the new text. - `insert_before`: Inserts the new text before the range. - `insert_after`: Inserts new text after the range. - - `create`: Creates a new file with the given path and the new text. + - `create`: Creates or overwrites a file with the given path and the new text. - `delete`: Deletes the specified range from the file.