Package com.tnsai.coordination.judge
Interface JudgePolicy
- All Known Implementing Classes:
LLMJudgePolicy,ThresholdJudgePolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface for evaluating coordination cycle output.
Implementations decide whether an agent's output meets quality criteria.
The JudgeCoordinator calls this at the end of each cycle to determine
whether to approve, reject, or retry.
Two built-in implementations are provided:
ThresholdJudgePolicy— simple numeric threshold checkLLMJudgePolicy— LLM-based evaluation with natural language criteria
- Since:
- 0.2.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionevaluate(String agentId, Object output, JudgeContext context) Evaluates an agent's output and produces a verdict.
-
Method Details
-
evaluate
Evaluates an agent's output and produces a verdict.- Parameters:
agentId- the identifier of the agent whose output is being judgedoutput- the output to evaluate (type depends on coordination pattern)context- iteration state and history- Returns:
- a verdict with decision, score, and optional feedback
-