πŸ“„ Mt Bench Multi TurnΒΆ

templates.response_assessment.rating.mt_bench_multi_turn

DialogTemplate(
    dialog_fields=[
        DialogFieldsData(
            dialog_field="dialog",
            assistant_role_label="### Assistant A:",
            user_role_label="### User:",
            system_role_label="### System:",
        ),
    ],
    turns_separator="

",
    label_separator="
",
    instruction="Please act as an impartial judge and evaluate the quality of the response provided by an AI assistant to the user question displayed below. Your evaluation should consider factors such as the helpfulness, relevance, accuracy, depth, creativity, and level of detail of the response. You evaluation should focus on the assistant's answer to the second user question. Begin your evaluation by providing a short explanation. Be as objective as possible. After providing your explanation, you must rate the response on a scale of 1 to 10 by strictly following this format: "[[rating]]", for example: "Rating: [[5]]".

",
    input_format="<|The Start of Assistant A's Conversation with User|>

{dialog}

<|The End of Assistant A's Conversation with User|>",
    output_format="[[{rating}]]",
    postprocessors=[
        "processors.extract_mt_bench_rating_judgment",
    ],
)
[source]

from unitxt.templates import DialogFieldsData

References: processors.extract_mt_bench_rating_judgment

Read more about catalog usage here.