Imagine an agentic LLM model that is integrated with an IDE, like VSCode. How do I tell…
- User
Imagine an agentic LLM model that is integrated with an IDE, like VSCode. How do I tell it to stop leaving comments in the generated code? For example, I might ask it to generate an algorithm that integrates within the current project I might have. Problem is, instead of re-writing, it leaves comments like:
function foo(): /* code is same as before */
function foo2(): /* keep code as before */
How do i tell it to stop repeating this behavior, in a single concise instruction?
Assistant
To instruct the agentic LLM model to stop leaving comments in the generated code, you can use the following concise instruction:
"Regenerate without preservation comments."
Alternatively, you can also try:
- "Overwrite existing code"
- "Replace existing implementation"
- "Generate without comments"
- "Do not preserve original code"
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.