Class StepEfficiencyEvaluator
java.lang.Object
com.tnsai.evaluation.evaluators.agent.StepEfficiencyEvaluator
- All Implemented Interfaces:
Evaluator
Agent-tier metric: did the agent reach the goal without burning extra
tool calls?
Compares the actual tool-call count against an expected minimum.
The expected minimum may come from either expectedToolSequence
(when the caller has a known-correct trace) or from a numeric
expected_steps entry in metadata (when the caller
only knows the budget, not the exact tools).
Score is expected / max(expected, actual) — perfect efficiency
when actual ≤ expected, then linearly degrades as the agent
burns extra steps. Returns a passing score with a "no benchmark"
note when neither expected source is populated.
This is the deterministic counterpart to the LLM-judged
PlanAdherenceEvaluator / ToolCorrectnessEvaluator —
cheap, repeatable, suitable for CI gates and dashboards.
- Since:
- 0.10.1 (TNS-373)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tnsai.evaluation.spi.Evaluator
Evaluator.EvaluationInput -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(Evaluator.EvaluationInput context) Evaluates agent behavior for a single interaction.name()Unique name for this evaluator.