Class LLMJudgeEvaluator.Builder

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

public static class LLMJudgeEvaluator.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

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

      public LLMJudgeEvaluator.Builder criteria(String criteria)
      Sets the evaluation criteria.
      Parameters:
      criteria - the criteria description
      Returns:
      this builder
    • evaluationParams

      public LLMJudgeEvaluator.Builder evaluationParams(List<EvalTestCaseParam> params)
      Sets which test case parameters to include in the prompt.
      Parameters:
      params - the parameters to evaluate
      Returns:
      this builder
    • threshold

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

      public LLMJudgeEvaluator.Builder scoreRange(double min, double max)
      Sets the expected score range for the LLM response.
      Parameters:
      min - the minimum score value
      max - the maximum score value
      Returns:
      this builder
    • judge

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

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