Class TrajectoryEvaluator.Builder

java.lang.Object
dev.dokimos.core.conversation.TrajectoryEvaluator.Builder
Enclosing class:
TrajectoryEvaluator

public static class TrajectoryEvaluator.Builder extends Object
Builder for constructing trajectory evaluators.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public TrajectoryEvaluator.Builder name(String name)
      Sets the evaluator name.
      Parameters:
      name - the evaluator name
      Returns:
      this builder
    • threshold

      public TrajectoryEvaluator.Builder threshold(double threshold)
      Sets the minimum score threshold for success.
      Parameters:
      threshold - the threshold value
      Returns:
      this builder
    • judge

      public TrajectoryEvaluator.Builder judge(JudgeLM judge)
      Sets the JudgeLM to use for evaluation.
      Parameters:
      judge - the JudgeLM instance
      Returns:
      this builder
    • criterion

      public TrajectoryEvaluator.Builder criterion(EvaluationCriterion criterion)
      Adds an evaluation criterion.
      Parameters:
      criterion - the criterion to add
      Returns:
      this builder
    • criteria

      Sets all evaluation criteria.
      Parameters:
      criteria - the list of criteria
      Returns:
      this builder
    • aggregationStrategy

      public TrajectoryEvaluator.Builder aggregationStrategy(AggregationStrategy strategy)
      Sets the score aggregation strategy.
      Parameters:
      strategy - the aggregation strategy
      Returns:
      this builder
    • trajectoryKey

      public TrajectoryEvaluator.Builder trajectoryKey(String key)
      Sets the key used to retrieve the trajectory from actualOutputs.

      Default is "trajectory".

      Parameters:
      key - the key name
      Returns:
      this builder
    • includePerCriterionScores

      public TrajectoryEvaluator.Builder includePerCriterionScores(boolean include)
      Sets whether to include per-criterion scores in the result metadata.

      Default is true.

      Parameters:
      include - true to include per-criterion scores
      Returns:
      this builder
    • build

      public TrajectoryEvaluator build()
      Builds the trajectory evaluator.
      Returns:
      a new trajectory evaluator
      Throws:
      IllegalStateException - if required fields are not set