Class ToolEfficiencyEvaluator

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

public class ToolEfficiencyEvaluator extends BaseEvaluator
Measures how efficiently an agent used its tools by detecting redundant calls.

This is a deterministic, glass-box evaluator (no LLM). Two calls are redundant when they share a name and their arguments match under the configured ArgumentMatcher (default ArgumentMatcher.tolerant()). The score is the ratio of distinct calls to total calls, so 1.0 means no redundancy. Consecutive identical calls are additionally flagged as a loop signal in the result metadata. An empty tool-call list scores 1.0.

Efficiency is a signal, not a hard correctness gate: a legitimately repeated call (for example a retry) lowers the score. Tune the threshold accordingly.

  • Method Details