From bf2661b56d2502608f1f57884c9c589270d9caf2 Mon Sep 17 00:00:00 2001 From: Harjot Gill Date: Wed, 19 Apr 2023 22:01:10 -0700 Subject: [PATCH] update scoring prompt (#213) --- dist/index.js | 24 +++++++++++++++++------- src/options.ts | 22 ++++++++++++++++------ 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/dist/index.js b/dist/index.js index 346c847c..8a624a6b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5863,13 +5863,23 @@ class Prompts { render_summarize_file_diff(inputs) { const prompt = `${this.summarize_file_diff} -Below the summary, I would also like you to classify the -complexity of the diff as \`COMPLEX\` or \`SIMPLE\` based -on whether the diff is a simple change that looks good as it -is or a complex change that needs thorough review. - -Use the following format to classify the complexity of the -diff and add no additional text: +Below the summary, I would also like you to classify the complexity +of the diff as \`COMPLEX\` or \`SIMPLE\` based on the following +criteria: + +- If the diff introduces new functionality, modifies existing logic + significantly, or has potential security implications, + classify it as \`COMPLEX\`. +- If the diff only contains minor changes, such as fixing typos, + formatting, or updating documentation, classify it as \`SIMPLE\`. + +Please evaluate the diff thoroughly and take into account factors +such as the number of lines changed, the potential impact on the +overall system, and the likelihood of introducing new bugs or +security vulnerabilities. + +Use the following format to classify the complexity of the diff +and add no additional text: [COMPLEXITY]: `; return inputs.render(prompt); diff --git a/src/options.ts b/src/options.ts index 637402cd..8e094a2e 100644 --- a/src/options.ts +++ b/src/options.ts @@ -29,13 +29,23 @@ export class Prompts { render_summarize_file_diff(inputs: Inputs): string { const prompt = `${this.summarize_file_diff} -Below the summary, I would also like you to classify the -complexity of the diff as \`COMPLEX\` or \`SIMPLE\` based -on whether the diff is a simple change that looks good as it -is or a complex change that needs thorough review. +Below the summary, I would also like you to classify the complexity +of the diff as \`COMPLEX\` or \`SIMPLE\` based on the following +criteria: -Use the following format to classify the complexity of the -diff and add no additional text: +- If the diff introduces new functionality, modifies existing logic + significantly, or has potential security implications, + classify it as \`COMPLEX\`. +- If the diff only contains minor changes, such as fixing typos, + formatting, or updating documentation, classify it as \`SIMPLE\`. + +Please evaluate the diff thoroughly and take into account factors +such as the number of lines changed, the potential impact on the +overall system, and the likelihood of introducing new bugs or +security vulnerabilities. + +Use the following format to classify the complexity of the diff +and add no additional text: [COMPLEXITY]: `