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):