Class RegexMetric
java.lang.Object
com.google.genkit.plugins.evaluators.metrics.RegexMetric
Regex metric evaluator.
Evaluates whether the output matches a regular expression pattern provided in the reference field.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(EvalDataPoint dataPoint) Evaluates whether the output matches the regex pattern in the reference.
-
Constructor Details
-
RegexMetric
public RegexMetric()
-
-
Method Details
-
evaluate
Evaluates whether the output matches the regex pattern in the reference.- Parameters:
dataPoint- the evaluation data point- Returns:
- the evaluation response
-