From 738ef20d3b3d5ee12778f00fba68f0772e7eb42b Mon Sep 17 00:00:00 2001 From: Vasiliki Doropoulou Date: Tue, 23 Jul 2024 12:34:30 +0200 Subject: [PATCH] Update review prompt for concise feedback with code example --- review_script.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/review_script.py b/review_script.py index 1ef6792..6db44ea 100644 --- a/review_script.py +++ b/review_script.py @@ -31,10 +31,10 @@ def analyze_code(file_content, previous_comments): prompt = f"""{HUMAN_PROMPT} As a senior developer, provide a brief, easy-to-read code review for the following changes. Focus on: 1. Key improvements or good practices implemented -2. The most important suggestion for further improvement +2. The most important suggestion for further improvement, with a short code example Guidelines: -- Be concise. Limit your review to 2-3 short paragraphs. +- Be concise. Limit your review to 3-4 short paragraphs. - Prioritize the most impactful feedback. - Avoid repeating suggestions from previous reviews unless they're critical and unaddressed. @@ -47,7 +47,8 @@ def analyze_code(file_content, previous_comments): Provide your review in this format: 1. Positive point(s): [Very brief mention of good changes] 2. Top suggestion: [One key suggestion with a very short explanation] -3. Overall: [One-sentence summary of the code quality] +3. Example: [A brief code snippet illustrating the suggestion] +4. Overall: [One-sentence summary of the code quality] {AI_PROMPT}"""