π Metric TemplateΒΆ
templates.rag_eval.answer_relevance.metric_template
InputOutputTemplateWithCustomTarget(
input_format="Question: {question}
Prediction: {answer}",
output_format="{is_relevant}",
postprocessors=[
"processors.to_string_stripped",
"processors.cast_to_float_return_zero_if_failed",
],
reference="{number_val}",
target_prefix="Answer: ",
instruction="",
)
[source]References: processors.cast_to_float_return_zero_if_failed, processors.to_string_stripped
Read more about catalog usage here.