Skip to content

Commit 520c98d

Browse files
committed
feat: added more info in prompt for better code reviews
1 parent 257d9ce commit 520c98d

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

kaizen/llms/prompts/code_review_prompts.py

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,27 @@
4141
- "Potential Issues"
4242
- "Improvements"
4343
44+
Make sure to look for the following issues in the code logic:
45+
[
46+
"Syntax Errors",
47+
"Logic Errors",
48+
"Off-by-one Errors",
49+
"Infinite Loops",
50+
"Null or Undefined Values",
51+
"Resource Leaks",
52+
"Race Conditions",
53+
"Integration Issues",
54+
"Performance Issues",
55+
"Security Vulnerabilities"
56+
]
57+
4458
For "request_for_change", only make it true when topic is part of "Improvements" or "Potential Issues" or something which you think needs attention of the developer.
4559
60+
For "solution" make sure to point out whats wrong and how to fix it in current code. Try to be as precise as possible.
61+
4662
Generate all relevant and actionable feedback. Avoid duplicate feedbacks for same line, try to merge them.
4763
For each piece of feedback, clearly reference the specific file(s) and line number(s) of code being addressed for each comment. Use markdown code blocks to quote relevant snippets of code when necessary.
48-
Keep comments concise but make sure they have actionable points pointing to the code or line having the issue. Avoid duplicate feedback, merge when necessary.
64+
Keep comments concise but make sure they have actionable and useful points pointing to the code or line having the issue. Avoid generic comments. Avoid duplicate feedback, merge when necessary.
4965
5066
If there is no feedback, return an empty JSON object: {{"review": []}}
5167
@@ -94,11 +110,27 @@
94110
- "Potential Issues"
95111
- "Improvements"
96112
113+
Make sure to look for the following issues in the code logic:
114+
[
115+
"Syntax Errors",
116+
"Logic Errors",
117+
"Off-by-one Errors",
118+
"Infinite Loops",
119+
"Null or Undefined Values",
120+
"Resource Leaks",
121+
"Race Conditions",
122+
"Integration Issues",
123+
"Performance Issues",
124+
"Security Vulnerabilities"
125+
]
126+
97127
For "request_for_change", only make it true when topic is part of "Improvements" or "Potential Issues" or something which you think needs attention of the developer.
98128
129+
For "solution" make sure to point out whats wrong and how to fix it in current code. Try to be as precise as possible.
130+
99131
Generate all relevant and actionable feedback. Avoid duplicate feedbacks for same line, try to merge them.
100132
For each piece of feedback, clearly reference the specific file(s) and line number(s) of code being addressed for each comment. Use markdown code blocks to quote relevant snippets of code when necessary.
101-
Keep comments concise but make sure they have actionable points pointing to the code or line having the issue. Avoid duplicate feedback, merge when necessary.
133+
Keep comments concise but make sure they have actionable and useful points pointing to the code or line having the issue. Avoid generic comments. Avoid duplicate feedback, merge when necessary.
102134
103135
If there is no feedback, return an empty JSON object: {{"review": []}}
104136

0 commit comments

Comments
 (0)