Record Class EvaluationCriterion

java.lang.Object
java.lang.Record
dev.dokimos.core.conversation.EvaluationCriterion
Record Components:
name - the name of this evaluation criterion
description - detailed instructions for how to evaluate this criterion
weight - the weight for score aggregation (default: 1.0)

public record EvaluationCriterion(String name, String description, double weight) extends Record
Defines a single evaluation dimension for trajectory evaluation.

Each criterion specifies what aspect of the conversation to evaluate and how much weight it should carry in the overall score calculation.

Example:


 EvaluationCriterion criterion = new EvaluationCriterion(
         "User Satisfaction",
         "Evaluate whether the user's concerns were adequately addressed and they seem satisfied by the end of the conversation.",
         1.0);
 
See Also:
  • Constructor Details

    • EvaluationCriterion

      public EvaluationCriterion(String name, String description, double weight)
      Compact constructor with validation.
  • Method Details

    • of

      public static EvaluationCriterion of(String name, String description)
      Creates a criterion with default weight of 1.0.
      Parameters:
      name - the criterion name
      description - the evaluation description
      Returns:
      a new criterion with weight 1.0
    • withWeight

      public EvaluationCriterion withWeight(double weight)
      Creates a new criterion with a different weight.
      Parameters:
      weight - the new weight
      Returns:
      a new criterion with the specified weight
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • weight

      public double weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component