JudgeEvaluator/RMBEvaluator score judge replies that never state a verdict, by reading the first character of the raw unparsed text

Author: shaurya416Created Sep 24, 2026Updated Sep 24, 2026

opencompass/openicl/icl_evaluator/icl_judge_evaluator.py:19-20 (JudgeEvaluator.score), duplicated at :79-80 (RMBEvaluator.score, in calculate_pair_accuracy/calculate_bon_accuracy's caller):

python
choice = prediction.split("\"Choice\": \"Model ")[-1][0] if len(
    prediction) != 0 else None
gold_winner = reference.get('winner', '')
...
if choice == gold_winner:
    correct += 1
    detail['correct'] = True

When the judge's raw reply does not contain the literal substring "Choice": "Model , str.split returns a one-element list holding the entire unmodified reply, so [-1] is the whole raw text and [0] is just its first character — not a parse of any field. That character is then compared directly against gold_winner.

What happens (reproduced on the real module)

JudgeEvaluator.score (icl_judge_evaluator.py:19-20) and RMBEvaluator.score (:79-80) extract the verdict letter with prediction.split("\"Choice\": \"Model ")[-1][0]. When the marker is absent, split returns the whole raw string as its only element, so [0] is the first character of arbitrary judge prose, and that character is compared directly against gold_winner.

Reproduction, against main at commit c496666 (2026-09-23):

  • Importing the real, unmodified module and running four cases gives 100.0/True, 0.0/False, 100.0/True, 0.0/False.

For reference, the same file's Judgerbenchv2Evaluator.extract_winner is at lines 264-270, with its if choice is not None: gate at line 299.

Reachability:

  • judgebench.py, rewardbench.py and rmb.py wire JudgeEvaluator/RMBEvaluator with GenInferencer and no pred_postprocessor.
  • Raw judge-model text therefore flows unmodified through openicl_eval.py's _evaluate_predictions -> evaluate -> score chain (kwargs are filtered by signature(evaluator.score).parameters) straight into the split.
  • rewardbench.py's subset list includes refusals-dangerous and xstest-should-refuse, benchmarks designed to elicit refusal-shaped judge replies, which is exactly the no-marker case.

Related work:

  • PR #2522 (open, unmerged) only guards the empty-split-tail IndexError. Applying its diff by hand, the defect case still scores 100.0/True, so the two issues are distinct and #2522 does not fix this one.
  • There is no test file in tests/openicl/ for either evaluator on current HEAD.
  • I found no other issue or PR reporting this specific defect.

Happy to open the PR.

Source: open-compass/opencompass