From 0d49850833d2840b6f15dc6d90c1a61e4f8a17a0 Mon Sep 17 00:00:00 2001 From: Craig Walls Date: Sat, 26 Oct 2024 15:56:39 -0600 Subject: [PATCH] Refine FactCheckingEvaluator prompt to specify yes/no answer. --- .../springframework/ai/evaluation/FactCheckingEvaluator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java b/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java index 77bd676ed3d..ac21210781c 100644 --- a/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java +++ b/spring-ai-core/src/main/java/org/springframework/ai/evaluation/FactCheckingEvaluator.java @@ -64,6 +64,9 @@ public class FactCheckingEvaluator implements Evaluator { private static final String DEFAULT_EVALUATION_PROMPT_TEXT = """ + Evaluate whether or not the following claim is supported by the provided document. + Respond with "yes" if the claim is supported, or "no" if it is not. + Document: \\n {document}\\n Claim: \\n {claim} """;