-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Refine coder prompt #15358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine coder prompt #15358
Conversation
fixed #15357
function calls on the same file, so you need exactly one successful call with all proposed changes per changed file. The changes will be presented as a applicable diff to \ | ||
the user in any case.' : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrase 'applicable diff' doesn't seem very natural to me. Although applicable < apply, it's almost only used to mean 'relevant.'
Maybe
Regardless of replacement method, the changes will be presented to the user in a comparative diff view highlighting changed regions.
4o says: Here's a summary of the instructions, key points, and how I would choose between the functions: 🔍 Understanding the InstructionsThere are two functions used to propose file changes to the user:
Both functions result in a diff being shown to the user, regardless of which is used. ✅ Important Points
🤔 How I Would Choose Between the Functions
Situation | Function to Use | Reason
-- | -- | --
Small, targeted edits (e.g. changing a line, fixing typos, updating a method) | ~{changeSet_replaceContentInFile} | It's more precise and efficient for small edits.
replaceContentInFile fails repeatedly (e.g. can't find the pattern) | ~{changeSet_writeChangeToFile} | Ensures changes still get proposed even if pattern matching is unreliable.
Making large-scale edits (e.g. replacing the entire content, restructuring) | ~{changeSet_writeChangeToFile} | More practical and safer for large or ambiguous changes.
|
Claude: Based on the instructions provided, I understand you're asking about two functions for proposing file changes: ~{changeSet_writeChangeToFile}: Used to propose file changes to users Key points about using these functions: Both functions allow you to suggest modifications to files Would you like me to explain more about how to choose between these functions or provide more specific guidance on when to use each one? |
We have evaluate the current version in practise, so if it is not "wrong" from your POV, I would go with it now and imporve the wording later, but we should first evaluate any new wording |
fixed #15357
What it does
Improve Coder prompt.
Clarifies, that the changes are presented in a diff to the user. Otherwise, some LLMs tend to avoid search/replace, as they assume it i hard to read for the user.
How to test
Reset the Coder prompt and check that this sentence is there:
"The changes will be presented as a applicable diff to the user in any case."
Follow-ups
Breaking changes
Attribution
Review checklist
Reminder for reviewers