From c6ce75df86136e2f8dfaf700c0558bc45fa2a839 Mon Sep 17 00:00:00 2001 From: aasavari Date: Fri, 25 Oct 2024 22:23:36 +0000 Subject: [PATCH] adding context recall Signed-off-by: aasavari --- .../ragaaf/prompt_templates/context_recall.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 evals/metrics/ragaaf/prompt_templates/context_recall.py diff --git a/evals/metrics/ragaaf/prompt_templates/context_recall.py b/evals/metrics/ragaaf/prompt_templates/context_recall.py new file mode 100644 index 00000000..fbbb6dbe --- /dev/null +++ b/evals/metrics/ragaaf/prompt_templates/context_recall.py @@ -0,0 +1,13 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + + +class ContextRecall: + name = "context_recall" + required_columns = ["context", "ground_truth"] + template = """- Context Recall: context recall measures how well ground truth is supported by the context. + - Score 1: None of facts/steps/aspects in the ground truth are supported by the context. + - Score 2: Only a small part of facts/steps/aspects in the ground truth are supported by the context. + - Score 3: About half of facts/steps/aspects in the ground truth are supported by the context. + - Score 4: All main/important facts/steps/aspects in the ground truth are supported by the context but some of the details are not supported by the context. + - Score 5: All of facts/steps/aspects in the ground truth are supported by the context. """