From 8532b9dc983e2c14ef44dd57d8a8d43e7abaa695 Mon Sep 17 00:00:00 2001 From: Anselm Coogan Date: Tue, 20 May 2025 22:59:06 -0400 Subject: [PATCH] Fix regex for grading response extraction --- browsecomp_eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browsecomp_eval.py b/browsecomp_eval.py index 4485e8fb..3cc05dc6 100644 --- a/browsecomp_eval.py +++ b/browsecomp_eval.py @@ -90,7 +90,7 @@ def grade_sample(self, question: str, correct_answer: str, response: str) -> str grading_response = sampler_response.response_text match = re.search(r"correct: (yes|no)", grading_response) - return match.group(0) if match else "no" # Default to "no" if no match + return match.group(1) if match else "no" # Default to "no" if no match def __call__(self, sampler: SamplerBase) -> EvalResult: def fn(row: dict):