π Judge Answer Relevance LogprobsΒΆ
templates.rag_eval.answer_relevance.judge_answer_relevance_logprobs
InputOutputTemplateWithCustomTarget(
input_format="Question: {question}
Prediction: {answer}
",
output_format="{is_relevant}",
postprocessors=[
"processors.load_json_from_predictions",
"processors.infer_logprobs_to_yes_no_probs",
"processors.cast_to_float_return_zero_if_failed",
],
reference="{number_val}",
target_prefix="Answer: ",
instruction="You are given a question and a prediction from a model. Please determine whether the prediction answers the question. Answer with only yes/no.
",
)
[source]References: processors.cast_to_float_return_zero_if_failed, processors.infer_logprobs_to_yes_no_probs, processors.load_json_from_predictions
Read more about catalog usage here.