CopilotChat.nvim icon indicating copy to clipboard operation
CopilotChat.nvim copied to clipboard

Prompt too aggressive.

Open bechampion opened this issue 8 months ago • 6 comments

https://github.com/CopilotC-Nvim/CopilotChat.nvim/blob/main/lua/CopilotChat/config/prompts.lua#L7

We should rephrase this , or allow it to be configurable , maybe replace "software engineering" with "technology" ?

bechampion avatar Mar 30 '25 15:03 bechampion

Big part of the prompt was copied from the default copilot chat prompt from vscode, but I agree, I dont think we need half of that stuff there by default, especially in the base prompt. System prompt is already configurable but you still always want the generation part from base prompt at least so yea

deathbeam avatar Mar 30 '25 15:03 deathbeam

I can put up a PR if all of you agree , we leave what it is as default but we lift it in opts or something ?

bechampion avatar Mar 31 '25 08:03 bechampion

I think line 5 6 and 7 can probably just be completely removed as the important part is in COPILOT_INSTRUCTIONS anyway. I dont think anything at all needs to be extracted to configuration as system_prompt is already configurable anyway.

If you want to, feel free to PR removal of those lines I guess for now

deathbeam avatar Mar 31 '25 08:03 deathbeam

"If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, violent, or completely irrelevant to software engineering, only respond with "Sorry, I can't assist with that.""

Can we just remove "or completely irrelevant to software engineering" from the default?

codymikol avatar Mar 31 '25 13:03 codymikol

We could but I dont see point in having rest as well as that should be handled on the api side anyway. Even though I guess instead of response you just get error instead most likely (which is imo better as it do not wastes tokens at least)

deathbeam avatar Mar 31 '25 13:03 deathbeam

Sounds good to me 👍

codymikol avatar Mar 31 '25 14:03 codymikol