Record Class Evaluator.EvaluationInput

java.lang.Object
java.lang.Record
com.tnsai.evaluation.spi.Evaluator.EvaluationInput
Enclosing interface:
Evaluator

public static record Evaluator.EvaluationInput(String userInput, String agentResponse, String expectedOutput, List<String> expectedToolSequence, List<String> actualToolSequence, String instructions, long latencyMs, double costUsd, int inputTokens, int outputTokens, Map<String,Object> metadata) extends Record
Input context provided to evaluators.
  • Constructor Details

    • EvaluationInput

      public EvaluationInput(String userInput, String agentResponse, String expectedOutput, List<String> expectedToolSequence, List<String> actualToolSequence, String instructions, long latencyMs, double costUsd, int inputTokens, int outputTokens, Map<String,Object> metadata)
      Creates an instance of a EvaluationInput record class.
      Parameters:
      userInput - the value for the userInput record component
      agentResponse - the value for the agentResponse record component
      expectedOutput - the value for the expectedOutput record component
      expectedToolSequence - the value for the expectedToolSequence record component
      actualToolSequence - the value for the actualToolSequence record component
      instructions - the value for the instructions record component
      latencyMs - the value for the latencyMs record component
      costUsd - the value for the costUsd record component
      inputTokens - the value for the inputTokens record component
      outputTokens - the value for the outputTokens record component
      metadata - the value for the metadata record component
  • Method Details

    • builder

      public static Evaluator.EvaluationInput.Builder builder()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • userInput

      public String userInput()
      Returns the value of the userInput record component.
      Returns:
      the value of the userInput record component
    • agentResponse

      public String agentResponse()
      Returns the value of the agentResponse record component.
      Returns:
      the value of the agentResponse record component
    • expectedOutput

      public String expectedOutput()
      Returns the value of the expectedOutput record component.
      Returns:
      the value of the expectedOutput record component
    • expectedToolSequence

      public List<String> expectedToolSequence()
      Returns the value of the expectedToolSequence record component.
      Returns:
      the value of the expectedToolSequence record component
    • actualToolSequence

      public List<String> actualToolSequence()
      Returns the value of the actualToolSequence record component.
      Returns:
      the value of the actualToolSequence record component
    • instructions

      public String instructions()
      Returns the value of the instructions record component.
      Returns:
      the value of the instructions record component
    • latencyMs

      public long latencyMs()
      Returns the value of the latencyMs record component.
      Returns:
      the value of the latencyMs record component
    • costUsd

      public double costUsd()
      Returns the value of the costUsd record component.
      Returns:
      the value of the costUsd record component
    • inputTokens

      public int inputTokens()
      Returns the value of the inputTokens record component.
      Returns:
      the value of the inputTokens record component
    • outputTokens

      public int outputTokens()
      Returns the value of the outputTokens record component.
      Returns:
      the value of the outputTokens record component
    • metadata

      public Map<String,Object> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component