Interface LoopEvaluator


public interface LoopEvaluator
Evaluates whether an LoopTerminationStrategy.EVALUATOR loop should terminate after the current iteration.

Kept as an interface so that the evaluator can be backed by an agent call without the loop strategy having to know the full LLM pipeline.

  • Method Details

    • shouldTerminate

      boolean shouldTerminate(String evaluatorAgentId, int iteration, LoopEvaluationContext context)
      Parameters:
      evaluatorAgentId - id of the agent registered in the repository
      iteration - current iteration number, 1-based
      context - the run's current state and active workflow id
      Returns:
      true if the loop should terminate, false to continue iterating