Class ToolTrajectoryEvaluator.Builder
java.lang.Object
dev.dokimos.core.evaluators.agents.ToolTrajectoryEvaluator.Builder
- Enclosing class:
ToolTrajectoryEvaluator
Builder for constructing the evaluator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionargumentMatcher(ArgumentMatcher matcher) Sets the default argument matcher applied to every tool unless overridden.argumentMatcher(String toolName, ArgumentMatcher matcher) Overrides the argument matcher for a specific tool by name.build()Builds the evaluator.evaluationParams(List<EvalTestCaseParam> params) Sets which test case parameters to validate.expectedToolCallsKey(String expectedToolCallsKey) Sets the key used to retrieve expected tool calls from expectedOutputs.matchMode(ToolTrajectoryEvaluator.MatchMode matchMode) Sets the trajectory match mode.Sets the evaluator name.threshold(double threshold) Sets the minimum score threshold for success.toolCallsKey(String toolCallsKey) Sets the key used to retrieve actual tool calls from actualOutputs.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the evaluator name.- Parameters:
name- the evaluator name- Returns:
- this builder
-
threshold
Sets the minimum score threshold for success.- Parameters:
threshold- the threshold value- Returns:
- this builder
-
evaluationParams
Sets which test case parameters to validate.- Parameters:
params- the parameters- Returns:
- this builder
-
toolCallsKey
Sets the key used to retrieve actual tool calls from actualOutputs.- Parameters:
toolCallsKey- the key- Returns:
- this builder
-
expectedToolCallsKey
Sets the key used to retrieve expected tool calls from expectedOutputs.- Parameters:
expectedToolCallsKey- the key- Returns:
- this builder
-
matchMode
Sets the trajectory match mode.- Parameters:
matchMode- the match mode (defaultToolTrajectoryEvaluator.MatchMode.IN_ORDER)- Returns:
- this builder
-
argumentMatcher
Sets the default argument matcher applied to every tool unless overridden.Defaults to
ArgumentMatcher.tolerant(), so arguments are compared by default. SupplyArgumentMatcher.of(ArgMatchMode.IGNORE)to compare tool names and order only.- Parameters:
matcher- the default argument matcher- Returns:
- this builder
-
argumentMatcher
Overrides the argument matcher for a specific tool by name.- Parameters:
toolName- the tool namematcher- the argument matcher to use for that tool- Returns:
- this builder
-
build
Builds the evaluator.- Returns:
- a new evaluator
-