#2350·Qwen

extract_choice() unbounded fuzzy-match fallback scores degenerate/refusal chat replies as a real MMLU/C-Eval answer letter

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

extract_choice()'s unguarded thefuzz.process.extractOne(gen, choice_list) fallback (no score_cutoff, no score check) turns any chat reply that doesn't match its four letter-extraction regexes -- empty output, a refusal, off-topic text, or truncated/failed generation -- into a manufactured A/B/C/D guess that eval_subject grades as a normal answer, with a deterministic bias toward option A on zero-signal input (confirmed by running the actual code against thefuzz 0.22.1). This is present identically in eval/evaluate_chat_mmlu.py (extract_choice at lines 62-86, fallback return at line 85) and eval/evaluate_chat_ceval.py (extract_choice at lines 68-92, fallback return at line 91 -- correct the write-up's '73-91' citation to '68-92'). The repo's own evaluate_gsm8k.py already shows the right pattern (INVALID_ANS sentinel on unparseable output, lines 14/58-69); extract_choice should follow it by passing score_cutoff to extractOne or checking its returned score and returning a sentinel instead of choice_list[0]'s letter. One caveat for the PR: QwenLM/Qwen's README states the repo is no longer actively maintained in favor of QwenLM/Qwen2 (though it isn't formally archived), and the successor repos dropped this thefuzz-based harness entirely rather than patching it -- so the fix is legitimate but may sit unmerged; worth checking whether the maintainers would rather you note it as a known limitation than take a PR against an eval harness they've already superseded.

Note on repo status

This repo's README points at QwenLM/Qwen2 as the successor, though QwenLM/Qwen itself isn't formally archived and its issue tracker is open. The successor dropped this thefuzz-based eval harness entirely rather than patching it, so this fix may have nowhere to land upstream. Filing it anyway since the original repo is still live and the defect is real on it; happy to have this closed as "superseded" if that's the maintainers' call, or to open the PR here if it's welcome.