π Judge Answer RelevanceΒΆ
templates.rag_eval.answer_relevance.judge_answer_relevance
type: InputOutputTemplateWithCustomTarget
input_format: "Question: {question}\n\nPrediction: {answer}\n"
output_format: {is_relevant}
postprocessors:
- processors.take_first_word
- processors.lower_case
- processors.predictions_yes_1_else_0
- 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.\n\n"
[source]References: processors.cast_to_float_return_zero_if_failed, processors.predictions_yes_1_else_0, processors.take_first_word, processors.lower_case
Read more about catalog usage here.