java.lang.Object
com.google.genkit.plugins.evaluators.metrics.RegexMetric

public class RegexMetric extends Object
Regex metric evaluator.

Evaluates whether the output matches a regular expression pattern provided in the reference field.

  • Constructor Details

    • RegexMetric

      public RegexMetric()
  • Method Details

    • evaluate

      public EvalResponse evaluate(EvalDataPoint dataPoint)
      Evaluates whether the output matches the regex pattern in the reference.
      Parameters:
      dataPoint - the evaluation data point
      Returns:
      the evaluation response