Class HallucinationEvaluator.Builder

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

public static class HallucinationEvaluator.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 HallucinationEvaluator.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 HallucinationEvaluator.Builder threshold(double threshold)
      Sets the maximum score threshold for success. Since the score represents hallucination ratio, lower scores are better.
      Parameters:
      threshold - the threshold value
      Returns:
      this builder
    • contextKey

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

      Sets the model to use for the evaluation.
      Parameters:
      judge - the model
      Returns:
      this builder
    • includeReason

      public HallucinationEvaluator.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 HallucinationEvaluator build()