From 322b2bec807794e2c11eb467a339bf13c51553df Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Wed, 12 Feb 2025 13:45:49 -0800 Subject: [PATCH] Reiterate in evaluator system prompt that if no blocks are available, return end --- blocks/blocks/evaluator.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/blocks/blocks/evaluator.ts b/blocks/blocks/evaluator.ts index 8fa940fe8b..b657635ba0 100644 --- a/blocks/blocks/evaluator.ts +++ b/blocks/blocks/evaluator.ts @@ -81,14 +81,18 @@ ${evaluationCriteria}` if (!targetBlocks || targetBlocks.length === 0) { return `${basePrompt} +IMPORTANT: When there are no target blocks, you must use exactly "end" as the decision value. Do not use any other word. + Response Format: Return a JSON object with the following structure: { - "decision": "end", + "decision": "end", // You must use exactly "end" here - this is a required system keyword "justification": "Brief explanation of the pure evaluation of the content. DO NOT include any information about the target blocks." } -Remember: Your response must be ONLY the JSON object - no additional text, formatting, or explanation.` +Remember: +1. Your response must be ONLY the JSON object - no additional text, formatting, or explanation. +2. The "decision" field MUST be exactly "end" - this is a required keyword that the system expects.` } const targetBlocksInfo = `