Class ToolTrajectoryEvaluator

java.lang.Object
dev.dokimos.core.BaseEvaluator
dev.dokimos.core.evaluators.agents.ToolTrajectoryEvaluator
All Implemented Interfaces:
Evaluator

public class ToolTrajectoryEvaluator extends BaseEvaluator
Evaluates an agent's tool-call trajectory against an expected trajectory using a selectable match mode.

This is a deterministic, glass-box evaluator. It compares the sequence of tool calls the agent made against an expected sequence, where two calls match when their names are equal and their arguments match under an ArgumentMatcher. Argument matching is configurable per tool via ToolTrajectoryEvaluator.Builder.argumentMatcher(String, ArgumentMatcher); the default matcher compares arguments tolerantly (ArgumentMatcher.tolerant()). Use ToolTrajectoryEvaluator.Builder.argumentMatcher(ArgumentMatcher) with ArgumentMatcher.of(ArgMatchMode.IGNORE) to compare names only.

Match modes:

The unordered modes use a maximum bipartite matching, so repeated tool names are counted optimally even with a stricter per-tool argument matcher. No LLM is required.
  • Method Details