Class EvaluatorsPluginOptions

java.lang.Object
com.google.genkit.plugins.evaluators.EvaluatorsPluginOptions

public class EvaluatorsPluginOptions extends Object
Configuration options for the GenkitEval plugin.

Allows configuring the default judge model, embedder, and the list of metrics to enable.

  • Method Details

    • builder

      public static EvaluatorsPluginOptions.Builder builder()
    • withMetrics

      public static EvaluatorsPluginOptions withMetrics(MetricConfig... metrics)
      Creates plugin options with the specified metrics using defaults for judge and embedder.
      Parameters:
      metrics - the metrics to enable
      Returns:
      plugin options
    • withMetricTypes

      public static EvaluatorsPluginOptions withMetricTypes(GenkitMetric... metricTypes)
      Creates plugin options with simple metric types (no per-metric configuration).
      Parameters:
      metricTypes - the metric types to enable
      Returns:
      plugin options
    • getMetrics

      public List<MetricConfig> getMetrics()
    • getJudge

      public String getJudge()
    • getJudgeConfig

      public Map<String,Object> getJudgeConfig()
    • getEmbedder

      public String getEmbedder()
    • getEmbedderOptions

      public Map<String,Object> getEmbedderOptions()
    • resolveJudge

      public String resolveJudge(MetricConfig config)
      Resolves the judge for a specific metric, falling back to the global default.
      Parameters:
      config - the metric configuration
      Returns:
      the resolved judge model name
    • resolveJudgeConfig

      public Map<String,Object> resolveJudgeConfig(MetricConfig config)
      Resolves the judge config for a specific metric, falling back to the global default.
      Parameters:
      config - the metric configuration
      Returns:
      the resolved judge configuration
    • resolveEmbedder

      public String resolveEmbedder(MetricConfig config)
      Resolves the embedder for a specific metric, falling back to the global default.
      Parameters:
      config - the metric configuration
      Returns:
      the resolved embedder name
    • resolveEmbedderOptions

      public Map<String,Object> resolveEmbedderOptions(MetricConfig config)
      Resolves the embedder options for a specific metric, falling back to the global default.
      Parameters:
      config - the metric configuration
      Returns:
      the resolved embedder options