Package dev.dokimos.core.evaluators
Class LLMJudgeEvaluator.Builder
java.lang.Object
dev.dokimos.core.evaluators.LLMJudgeEvaluator.Builder
- Enclosing class:
LLMJudgeEvaluator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the evaluator.Sets the evaluation criteria.evaluationParams(List<EvalTestCaseParam> params) Sets which test case parameters to include in the prompt.Sets the model to use for the evaluation.Sets the evaluator name.scoreRange(double min, double max) Sets the expected score range for the LLM response.threshold(double threshold) Sets the minimum score threshold for success.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the evaluator name.- Parameters:
name- the evaluator name- Returns:
- this builder
-
criteria
Sets the evaluation criteria.- Parameters:
criteria- the criteria description- Returns:
- this builder
-
evaluationParams
Sets which test case parameters to include in the prompt.- Parameters:
params- the parameters to evaluate- Returns:
- this builder
-
threshold
Sets the minimum score threshold for success.- Parameters:
threshold- the threshold value- Returns:
- this builder
-
scoreRange
Sets the expected score range for the LLM response.- Parameters:
min- the minimum score valuemax- the maximum score value- Returns:
- this builder
-
judge
Sets the model to use for the evaluation.- Parameters:
judge- the model- Returns:
- this builder
-
build
Builds the evaluator.- Returns:
- a new LLM judge evaluator
- Throws:
IllegalStateException- if required fields are not set
-