π Metric TemplateΒΆ
templates.rag_eval.answer_correctness.metric_template
InputOutputTemplateWithCustomTarget(
input_format="Question: {question}
Ground-truth answer: {ground_truths}
Prediction: {answer}",
output_format="{is_correct}",
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.