πŸ“„ Metric TemplateΒΆ

Note

ID: templates.rag_eval.answer_correctness.metric_template | Type: InputOutputTemplateWithCustomTarget

{
    "__type__": "input_output_template_with_custom_target",
    "input_format": "Question: {question}\nGround-truth answer: {ground_truths}\nPrediction: {answer}",
    "instruction": "",
    "output_format": "{is_correct}",
    "postprocessors": [
        "processors.to_string_stripped",
        "processors.cast_to_float_return_zero_if_failed"
    ],
    "reference": "{number_val}",
    "target_prefix": "Answer: "
}

References: processors.to_string_stripped, processors.cast_to_float_return_zero_if_failed

Read more about catalog usage here.