πŸ“„ Adherence With FormatΒΆ

metrics.llm_as_judge.direct.criteria.adherence_with_format

CriteriaWithOptions(
    name="adherence_with_format",
    description="The response aligns with the requested structure, style, or format (e.g., bullet points, headings, specific phrasing).",
    options=[
        CriteriaOption(
            name="Excellent",
            description="The response perfectly aligns with the requested structure, style, or format, with no deviations.",
        ),
        CriteriaOption(
            name="Good",
            description="The response aligns well with the requested structure, style, or format, with minor deviations that do not affect clarity or usability.",
        ),
        CriteriaOption(
            name="mediocre",
            description="The response generally follows the requested structure, style, or format, but noticeable inconsistencies or omissions are present.",
        ),
        CriteriaOption(
            name="Bad",
            description="The response only partially aligns with the requested structure, style, or format, with significant inconsistencies or a lack of adherence.",
        ),
        CriteriaOption(
            name="Very Bad",
            description="The response fails to align with the requested structure, style, or format.",
        ),
    ],
    option_map={
        "Excellent": 1.0,
        "Good": 0.75,
        "mediocre": 0.5,
        "Bad": 0.25,
        "Very Bad": 0,
    },
)
[source]

from unitxt.llm_as_judge_constants import CriteriaOption

Read more about catalog usage here.