File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
evaluators/langevals/langevals_langevals Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ class LLMAnswerMatchSettings(LLMEvaluatorSettings):
26
26
27
27
28
28
class LLMAnswerMatchResult (EvaluationResult ):
29
- passed : bool = Field (default = True )
29
+ passed : bool = Field (
30
+ description = "Whether the predicted answer matches the gold answer" , default = True
31
+ )
30
32
details : Optional [str ] = Field (default = None )
31
33
32
34
@@ -58,7 +60,7 @@ class LLMAnswerMatchEvaluator(
58
60
59
61
def evaluate (self , entry : LLMAnswerMatchEntry ) -> SingleEvaluationResult :
60
62
total_tokens = len (
61
- litellm .encode ( # type: ignore
63
+ litellm .encode ( # type: ignore
62
64
model = self .settings .model ,
63
65
text = f"{ entry .input } { entry .output } { entry .expected_output } " ,
64
66
)
Original file line number Diff line number Diff line change @@ -1225,7 +1225,11 @@ Uses an LLM to check if the generated output answers a question correctly the sa
1225
1225
} ,
1226
1226
} ,
1227
1227
envVars : [ ] ,
1228
- result : { } ,
1228
+ result : {
1229
+ passed : {
1230
+ description : "Whether the predicted answer matches the gold answer" ,
1231
+ } ,
1232
+ } ,
1229
1233
} ,
1230
1234
"langevals/llm_boolean" : {
1231
1235
name : `LLM-as-a-Judge Boolean Evaluator` ,
You can’t perform that action at this time.
0 commit comments