Package com.tnsai.evaluation.evaluators
Class AbstractJudgeEvaluator
java.lang.Object
com.tnsai.evaluation.evaluators.AbstractJudgeEvaluator
- All Implemented Interfaces:
Evaluator
- Direct Known Subclasses:
AnswerRelevancyEvaluator,BiasEvaluator,ContextualRecallEvaluator,ConversationCompletenessEvaluator,FaithfulnessEvaluator,HallucinationEvaluator,KnowledgeRetentionEvaluator,PlanAdherenceEvaluator,TaskCompletionEvaluator,ToolCorrectnessEvaluator,ToxicityEvaluator,TurnRelevancyEvaluator
Base for single-call LLM-as-judge evaluators: build one prompt, send it to the
LLMJudge once, parse the verdict.
Captures the skeleton that every such evaluator repeated — the judge
field and its non-null contract, the name(), and the
"LLM judge error: " + e.getMessage() failure when the judge throws — so a
concrete evaluator supplies only its prompt, its
verdict parsing, and (optionally) its input
preconditions.
The judge is invoked exactly once. Multi-step judges (e.g. G-Eval's
chain-of-thought → score, which calls the judge twice) do not fit this template
and implement Evaluator directly.
- Since:
- 0.13.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tnsai.evaluation.spi.Evaluator
Evaluator.EvaluationInput -
Method Summary
Modifier and TypeMethodDescriptionfinal EvaluationResultEvaluates agent behavior for a single interaction.final Stringname()Unique name for this evaluator.