π Mt Bench Multi TurnΒΆ
templates.response_assessment.pairwise_comparison.mt_bench_multi_turn
DialogPairwiseChoiceTemplate
(
dialog_fields=[
DialogFieldsData
(
dialog_field="dialog_a",
assistant_role_label="### Assistant A:",
user_role_label="### User:",
system_role_label="### System:",
),
DialogFieldsData
(
dialog_field="dialog_b",
assistant_role_label="### Assistant B:",
user_role_label="### User:",
system_role_label="### System:",
),
],
turns_separator="
",
label_separator="
",
choice_a_field="dialog_a",
choice_b_field="dialog_b",
answer_field="winner",
choice_a_label="A",
choice_b_label="B",
choice_tie_label="C",
shuffle=False,
instruction="Please act as an impartial judge and evaluate the quality of the responses provided by two AI assistants to the user questions. You should choose the assistant that follows the user's instructions and answers the user's questions better. Your evaluation should consider factors such as the helpfulness, relevance, accuracy, depth, creativity, and level of detail of their responses. You should focus on who provides a better answer to the second user question. Begin your evaluation by comparing the responses of the two assistants and provide a short explanation. Avoid any position biases and ensure that the order in which the responses were presented does not influence your decision. Do not allow the length of the responses to influence your evaluation. Do not favor certain names of the assistants. Be as objective as possible. After providing your explanation, output your final verdict by strictly following this format: "[[A]]" if assistant A is better, "[[B]]" if assistant B is better, and "[[C]]" for a tie.
",
input_format="<|The Start of Assistant A's Conversation with User|>
{dialog_a}
<|The End of Assistant A's Conversation with User|>
<|The Start of Assistant B's Conversation with User|>
{dialog_b}
<|The End of Assistant B's Conversation with User|>",
output_format="[[{winner}]]",
postprocessors=[
"processors.extract_mt_bench_label_judgment",
],
)
[source]from unitxt.templates import DialogFieldsData
References: processors.extract_mt_bench_label_judgment
Read more about catalog usage here.