Class JsonataMetric
java.lang.Object
com.google.genkit.plugins.evaluators.metrics.JsonataMetric
JSONata metric evaluator.
Evaluates the output using a JSONata expression provided in the reference. The expression should return a truthy value for pass, falsy for fail.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(EvalDataPoint dataPoint) Evaluates the output using the JSONata expression in the reference.
-
Constructor Details
-
JsonataMetric
public JsonataMetric()
-
-
Method Details
-
evaluate
Evaluates the output using the JSONata expression in the reference.- Parameters:
dataPoint- the evaluation data point- Returns:
- the evaluation response
-