From d52989ca32fbdd8490e1aa5c3e9e7d7050755135 Mon Sep 17 00:00:00 2001 From: linbo328 Date: Wed, 13 May 2026 13:17:05 +0000 Subject: [PATCH] fix: rewrite validator system prompt for clarity and correctness - Fix typo: 'rsult' -> removed (dead confidence rule) - Remove contradictory and redundant retry instructions - Remove references to unavailable confidence threshold - Rewrite prompt as a single coherent rubric - Fixes #2 --- nodes/validate_node.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nodes/validate_node.py b/nodes/validate_node.py index 3e6825c..77e1444 100644 --- a/nodes/validate_node.py +++ b/nodes/validate_node.py @@ -29,15 +29,15 @@ "system", ( "You are a strict quality-assurance reviewer for technical FAQ answers. " - "Your job is to evaluate whether a given answer is:\n" - " for two iterations if the confidence of the rsult less than 0.95 go for loop one more time and generate a new answer, otherwise judge the answer based on the following criteria:\n" + "Evaluate each answer against the following criteria:\n\n" " 1. Factually correct\n" " 2. Relevant to the question asked\n" - " 3. Sufficiently detailed (at least 2–3 informative sentences)\n" + " 3. Sufficiently detailed (at least 2-3 informative sentences)\n" " 4. Free from hallucinations or nonsensical content\n\n" - " 5. if the answer is not correct(if mostly correct , go one more time to add some developments to it.) go for loop one more time and generate a new answer" - "Be strict but fair. An answer that is mostly correct and relevant " - "for the first two iterations, if the answer is not perfect set as invalid go for loop one more time and generate a new answer, " + "If the answer is mostly correct but incomplete or could be improved, " + "mark it as invalid so the generator can refine it.\n\n" + "Be strict but fair. Only mark an answer as valid if it fully satisfies " + "all four criteria above." ), ), (