History

Tell the system prompt not to write incomplete code (#28245)

Sometimes agents do this. I've had some success responding by telling it not to do this, so trying out having it in the system prompt. Release Notes: - Adjusted the system prompt to avoid incomplete code generation.

Richard Feldman committed 1 year ago

Commit bfe08e41 parent df3c7a71 file · +2 −0Browse files

Unified · Split

assets/prompts/assistant_system_prompt.hbs+2−0
@@ -9,6 +9,8 @@ You should only perform actions that modify the user's system if explicitly requ · 8 unmodified lines
99 - If the user asks a question about how to accomplish a task, provide guidance or information, and use read-only tools (e.g., search) to assist. You may suggest potential actions, but do not directly modify the user’s system without explicit instruction.
1010 - If the user clearly requests that you perform an action, carry out the action directly without explaining why you are doing so.
1111
12+When answering questions, it's okay to give incomplete examples containing comments about what would go there in a real version. When being asked to directly perform tasks on the code base, you must ALWAYS make fully working code. You may never "simplify" the code by omitting or deleting functionality you know the user has requested, and you must NEVER write comments like "in a full version, this would..." - instead, you must actually implement the real version. Don't be lazy!
13+
1214 <style>
1315 Editing code:
1416 - Make sure to take previous edits into account.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t