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.

@FunctionalInterface public interface JudgePolicy
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:

Since:
0.2.3
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluate(String agentId, Object output, JudgeContext context)
    Evaluates an agent's output and produces a verdict.
  • Method Details

    • evaluate

      JudgeVerdict evaluate(String agentId, Object output, JudgeContext context)
      Evaluates an agent's output and produces a verdict.
      Parameters:
      agentId - the identifier of the agent whose output is being judged
      output - the output to evaluate (type depends on coordination pattern)
      context - iteration state and history
      Returns:
      a verdict with decision, score, and optional feedback