lm-eval Pitfall: Chatty Models Break Letter-Only Prompts, Regex Grabs Wrong Answers

mancubus77 · reddit · 2026-11-05

While benchmarking LLMs on a domain-specific multiple-choice task with lm-eval, the poster hit a real issue: despite a prompt saying "respond with ONLY the answer letter," heavily instruction-tuned models often return full explanations instead. The ([A-F]) regex then grabs the first matching letter anywhere in the prose — often from an unrelated word like "designed" — so the benchmark ends up measuring which model puts a letter near the start of its response, not actual domain knowledge. The poster is asking the community for established fixes.

Original post →

More from coding & agent

coding & agent channel →