Class Metric

  • All Implemented Interfaces:

    
    public abstract class Metric
    extends JsonSerializable
                        

    The metric used for evaluation.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class Metric.Builder

      Builder for Metric.

    • Constructor Summary

      Constructors 
      Constructor Description
      Metric()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Optional<String> name() The name of the metric.
      abstract Optional<String> promptTemplate() The prompt template for the metric.
      abstract Optional<String> judgeModelSystemInstruction() The system instruction for the judge model.
      abstract Optional<Boolean> returnRawOutput() Whether to return the raw output from the judge model.
      static Metric.Builder builder() Instantiates a builder for Metric.
      abstract Metric.Builder toBuilder() Creates a builder with the same values as this instance.
      static Metric fromJson(String jsonString) Deserializes a JSON string to a Metric object.
      • Methods inherited from class com.google.genai.JsonSerializable

        fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait