Package dev.dokimos.core.conversation
Record Class EvaluationCriterion
java.lang.Object
java.lang.Record
dev.dokimos.core.conversation.EvaluationCriterion
- Record Components:
name- the name of this evaluation criteriondescription- detailed instructions for how to evaluate this criterionweight- the weight for score aggregation (default: 1.0)
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 Summary
ConstructorsConstructorDescriptionEvaluationCriterion(String name, String description, double weight) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.static EvaluationCriterionCreates a criterion with default weight of 1.0.final StringtoString()Returns a string representation of this record class.doubleweight()Returns the value of theweightrecord component.withWeight(double weight) Creates a new criterion with a different weight.
-
Constructor Details
-
EvaluationCriterion
Compact constructor with validation.
-
-
Method Details
-
of
Creates a criterion with default weight of 1.0.- Parameters:
name- the criterion namedescription- the evaluation description- Returns:
- a new criterion with weight 1.0
-
withWeight
Creates a new criterion with a different weight.- Parameters:
weight- the new weight- Returns:
- a new criterion with the specified weight
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-