Skip to content

fix: PrefEval classifier counts failed or lowercase judge answers as "Personalized Response" #2396

Description

@jiangwu25

classify_error_type() in evaluation/scripts/PrefEval/pref_eval.py returns Personalized Response for inputs that do not match its error checks. This includes failed judge calls and valid answers that should count as errors.

Three examples reproduce the problem. Each cell below is the answer value under that key in evaluation_results:

violate_preference acknowledge_preference hallucinate_preference helpful_response Expected result
"" "" "" "" Judge Failure
"yes" "no" "No" "yes" Preference-Unaware Violation
"Yes" "No" "No" "No" Unhelpful Response

The current function returns Personalized Response for all three rows.

The first case can occur after an API error: call_gpt4o_mini_async() returns an empty string, and parse_xml_response() also returns an empty answer. The classifier has no check for this failure.

The second case fails because the checks require exact Yes and No strings. The third fails because the unhelpful branch also requires violate_preference == "No".

These cases can inflate the reported Personalized Response percentage. Failed judge answers should have a separate result, case should not affect the label, and an unhelpful response should remain unhelpful even if it also violates a preference.

Proposed fix: #2397.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:coreMOS 编排层 / 框架底座 / 跨模块问题status:needs-triageNeeds initial triage | 需要初步判断 & 问题复现

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions