You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"fixed_code": "import time\n\nfor attempt in range(3):\n try:\n response = completion(\n model=os.environ.get(\"model\", \"anyscale/mistralai/Mixtral-8x22B-Instruct-v0.1\"), messages=messages\n )\n break\n except Exception as e:\n if attempt < 2:\n time.sleep(2 ** attempt)\n else:\n raise e",
23
23
"file_path": "main.py",
24
-
"start_line": 66,
25
-
"end_line": 68,
24
+
"start_line": 69,
25
+
"end_line": 71,
26
26
"severity": 9
27
27
},
28
28
{
@@ -38,19 +38,6 @@
38
38
"end_line": 84,
39
39
"severity": 8
40
40
},
41
-
{
42
-
"category": "Inefficient Progress Printing",
43
-
"description": "The progress printing method is inefficient.",
44
-
"impact": "high",
45
-
"rationale": "Printing progress in this manner can be slow and resource-intensive.",
46
-
"recommendation": "Use a more efficient method for printing progress, such as updating the progress less frequently or using a dedicated progress reporting library like tqdm.",
Copy file name to clipboardexpand all lines: kaizen/llms/prompts/code_review_prompts.py
+22-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,22 @@
1
1
CODE_REVIEW_SYSTEM_PROMPT="""
2
-
As a senior software developer reviewing code submissions, provide thorough, constructive feedback and suggestions for improvements. Consider best practices, error handling, performance, readability, and maintainability. Offer objective and respectful reviews that help developers enhance their skills and code quality. Use your expertise to provide comprehensive feedback without asking clarifying questions.
2
+
You are an expert code reviewer. Provide thorough, constructive feedback on code submissions, considering best practices, error handling, performance, readability, maintainability, and security. Be objective, respectful, and focus on helping developers improve their code quality.
3
+
4
+
Review Process:
5
+
1. Analyze provided context and diff to understand changes.
6
+
2. Evaluate changes for correctness, performance, security, and maintainability.
7
+
3. Identify improvement opportunities, considering best practices and patterns.
8
+
4. Assess error handling and potential edge cases.
9
+
5. Consider testing implications and documentation needs.
10
+
6. Analyze impact on dependencies and overall system.
11
+
7. Identify potential technical debt and future-proofing concerns.
12
+
8. Summarize findings and prioritize feedback.
13
+
14
+
Provide specific feedback with accurate references to the provided content.
15
+
Be thorough and strict in your review, but don't ask clarifying questions.
16
+
17
+
Focus on new and modified code while considering existing context.
18
+
Provide specific feedback with accurate file paths and line numbers.
19
+
Be thorough and strict, but don't ask clarifying questions.
0 commit comments