@@ -165,6 +165,25 @@ export type Evaluators = {
165
165
competitors : string [ ] ;
166
166
} ;
167
167
} ;
168
+ "langevals/exact_match" : {
169
+ settings : {
170
+ /**
171
+ * @description True if the comparison should be case-sensitive, False otherwise
172
+ * @default false
173
+ */
174
+ case_sensitive : boolean ;
175
+ /**
176
+ * @description True if the comparison should trim whitespace, False otherwise
177
+ * @default true
178
+ */
179
+ trim_whitespace : boolean ;
180
+ /**
181
+ * @description True if the comparison should remove punctuation, False otherwise
182
+ * @default true
183
+ */
184
+ remove_punctuation : boolean ;
185
+ } ;
186
+ } ;
168
187
"langevals/llm_answer_match" : {
169
188
settings : {
170
189
/**
@@ -1109,6 +1128,42 @@ This evaluator implements LLM-as-a-judge with a function call approach to check
1109
1128
} ,
1110
1129
} ,
1111
1130
} ,
1131
+ "langevals/exact_match" : {
1132
+ name : `Exact Match Evaluator` ,
1133
+ description : `
1134
+ A simple evaluator that checks if the output matches the input exactly, with some
1135
+ extra bells and whistles to help with whitespace related shenanigans.
1136
+ ` ,
1137
+ category : "quality" ,
1138
+ docsUrl : "" ,
1139
+ isGuardrail : false ,
1140
+ requiredFields : [ ] ,
1141
+ optionalFields : [ "input" , "output" ] ,
1142
+ settings : {
1143
+ case_sensitive : {
1144
+ description :
1145
+ "True if the comparison should be case-sensitive, False otherwise" ,
1146
+ default : false ,
1147
+ } ,
1148
+ trim_whitespace : {
1149
+ description :
1150
+ "True if the comparison should trim whitespace, False otherwise" ,
1151
+ default : true ,
1152
+ } ,
1153
+ remove_punctuation : {
1154
+ description :
1155
+ "True if the comparison should remove punctuation, False otherwise" ,
1156
+ default : true ,
1157
+ } ,
1158
+ } ,
1159
+ envVars : [ ] ,
1160
+ result : {
1161
+ passed : {
1162
+ description :
1163
+ "True if the output matched the input exactly, False otherwise" ,
1164
+ } ,
1165
+ } ,
1166
+ } ,
1112
1167
"langevals/llm_answer_match" : {
1113
1168
name : `LLM Answer Match` ,
1114
1169
description : `
0 commit comments