Class InstructionFollowingEvaluator

java.lang.Object
com.tnsai.evaluation.evaluators.InstructionFollowingEvaluator
All Implemented Interfaces:
Evaluator

public final class InstructionFollowingEvaluator extends Object implements Evaluator
Evaluates whether the agent followed given instructions.

Checks for:

  • Format compliance (e.g., "respond in JSON", "use bullet points")
  • Constraint adherence (e.g., "max 100 words", "include code example")
  • Instruction keyword coverage
Since:
0.1.0
  • Constructor Details

    • InstructionFollowingEvaluator

      public InstructionFollowingEvaluator()
  • Method Details

    • name

      public String name()
      Description copied from interface: Evaluator
      Unique name for this evaluator.
      Specified by:
      name in interface Evaluator
    • evaluate

      public EvaluationResult evaluate(Evaluator.EvaluationInput context)
      Description copied from interface: Evaluator
      Evaluates agent behavior for a single interaction.
      Specified by:
      evaluate in interface Evaluator
      Parameters:
      context - evaluation context containing input, output, tool calls, etc.
      Returns:
      evaluation result