From 788411b680b0bdaf797983f537e8e40d7959aa49 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Thu, 14 Nov 2024 22:33:20 -0500 Subject: [PATCH] categorical score for llm as judge --- .../scoring/llm_as_judge/scoring_fn/llm_as_judge_scoring_fn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_stack/providers/inline/scoring/llm_as_judge/scoring_fn/llm_as_judge_scoring_fn.py b/llama_stack/providers/inline/scoring/llm_as_judge/scoring_fn/llm_as_judge_scoring_fn.py index f5e528189..857b8a653 100644 --- a/llama_stack/providers/inline/scoring/llm_as_judge/scoring_fn/llm_as_judge_scoring_fn.py +++ b/llama_stack/providers/inline/scoring/llm_as_judge/scoring_fn/llm_as_judge_scoring_fn.py @@ -75,7 +75,7 @@ class LlmAsJudgeScoringFn(BaseScoringFn): for regex in rating_regexes: match = re.search(regex, content) if match: - judge_rating = int(match.group(1)) + judge_rating = match.group(1) break return {