Class MetricConfig
java.lang.Object
com.google.genkit.plugins.evaluators.MetricConfig
Configuration for a specific evaluation metric.
This class allows configuring individual metrics with their required dependencies like judge models and embedders.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricConfig.Builderbuilder()getJudge()static MetricConfigof(GenkitMetric metricType) Creates a simple metric configuration with just the metric type.static MetricConfigwithJudge(GenkitMetric metricType, String judge) Creates a metric configuration with a judge model.static MetricConfigwithJudgeAndEmbedder(GenkitMetric metricType, String judge, String embedder) Creates a metric configuration with a judge model and embedder.
-
Method Details
-
builder
-
of
Creates a simple metric configuration with just the metric type.- Parameters:
metricType- the type of metric- Returns:
- a new MetricConfig
-
withJudge
Creates a metric configuration with a judge model.- Parameters:
metricType- the type of metricjudge- the judge model name- Returns:
- a new MetricConfig
-
withJudgeAndEmbedder
public static MetricConfig withJudgeAndEmbedder(GenkitMetric metricType, String judge, String embedder) Creates a metric configuration with a judge model and embedder.- Parameters:
metricType- the type of metricjudge- the judge model nameembedder- the embedder name- Returns:
- a new MetricConfig
-
getMetricType
-
getJudge
-
getJudgeConfig
-
getEmbedder
-
getEmbedderOptions
-
getStatusOverrideFn
-