Class FaithfulnessEvaluator.Builder

java.lang.Object
dev.dokimos.core.evaluators.FaithfulnessEvaluator.Builder
Enclosing class:
FaithfulnessEvaluator

public static class FaithfulnessEvaluator.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      Sets the evaluator name.
      Parameters:
      name - the evaluator name
      Returns:
      this builder
    • evaluationParams

      public FaithfulnessEvaluator.Builder evaluationParams(List<EvalTestCaseParam> params)
      Sets which test case parameters to use for the evaluation.
      Parameters:
      params - the parameters to use for the evaluation
      Returns:
      this builder
    • threshold

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

      public FaithfulnessEvaluator.Builder contextKey(String contextKey)
      Sets the context key to use.
      Parameters:
      contextKey - the context key to use
      Returns:
      this builder
    • judge

      public FaithfulnessEvaluator.Builder judge(JudgeLM judge)
      Sets the model to use for the evaluation.
      Parameters:
      judge - the model
      Returns:
      this builder
    • includeReason

      public FaithfulnessEvaluator.Builder includeReason(boolean includeReason)
      Sets the flag whether to provide a reason or not.
      Parameters:
      includeReason - true, if a reason should be provided
      Returns:
      this builder
    • build

      public FaithfulnessEvaluator build()