πŸ“„ Metric TemplateΒΆ

templates.rag_eval.answer_correctness.metric_template

type: InputOutputTemplateWithCustomTarget
input_format: "Question: {question}\nGround-truth answer: {ground_truths}\nPrediction: {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.