Package com.google.genai.types
Class LLMBasedMetricSpec
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.LLMBasedMetricSpec
Specification for an LLM based metric.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for LLMBasedMetricSpec. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional.static LLMBasedMetricSpec.Builderbuilder()Instantiates a builder for LLMBasedMetricSpec.static LLMBasedMetricSpecDeserializes a JSON string to a LLMBasedMetricSpec object.abstract Optional<AutoraterConfig>Optional configuration for the judge LLM (Autorater).Template for the prompt sent to the judge model.abstract Optional<PredefinedMetricSpec>Dynamically generate rubrics using a predefined spec.abstract Optional<RubricGenerationSpec>Dynamically generate rubrics using this specification.Use a pre-defined group of rubrics associated with the input.System instruction for the judge model.abstract LLMBasedMetricSpec.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
LLMBasedMetricSpec
public LLMBasedMetricSpec()
-
-
Method Details
-
metricPromptTemplate
Template for the prompt sent to the judge model. -
systemInstruction
System instruction for the judge model. -
judgeAutoraterConfig
Optional configuration for the judge LLM (Autorater). -
rubricGroupKey
Use a pre-defined group of rubrics associated with the input. Refers to a key in the rubric_groups map of EvaluationInstance. -
predefinedRubricGenerationSpec
Dynamically generate rubrics using a predefined spec. -
rubricGenerationSpec
Dynamically generate rubrics using this specification. -
additionalConfig
Optional. Optional additional configuration for the metric. -
builder
Instantiates a builder for LLMBasedMetricSpec. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a LLMBasedMetricSpec object.
-