Package com.tnsai.evaluation.spi
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionEvaluationInput(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 aEvaluationInputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactualToolSequencerecord component.Returns the value of theagentResponserecord component.builder()doublecostUsd()Returns the value of thecostUsdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpectedOutputrecord component.Returns the value of theexpectedToolSequencerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theinputTokensrecord component.Returns the value of theinstructionsrecord component.longReturns the value of thelatencyMsrecord component.metadata()Returns the value of themetadatarecord component.intReturns the value of theoutputTokensrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserInputrecord component.
-
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 aEvaluationInputrecord class.- Parameters:
userInput- the value for theuserInputrecord componentagentResponse- the value for theagentResponserecord componentexpectedOutput- the value for theexpectedOutputrecord componentexpectedToolSequence- the value for theexpectedToolSequencerecord componentactualToolSequence- the value for theactualToolSequencerecord componentinstructions- the value for theinstructionsrecord componentlatencyMs- the value for thelatencyMsrecord componentcostUsd- the value for thecostUsdrecord componentinputTokens- the value for theinputTokensrecord componentoutputTokens- the value for theoutputTokensrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
builder
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
userInput
Returns the value of theuserInputrecord component.- Returns:
- the value of the
userInputrecord component
-
agentResponse
Returns the value of theagentResponserecord component.- Returns:
- the value of the
agentResponserecord component
-
expectedOutput
Returns the value of theexpectedOutputrecord component.- Returns:
- the value of the
expectedOutputrecord component
-
expectedToolSequence
Returns the value of theexpectedToolSequencerecord component.- Returns:
- the value of the
expectedToolSequencerecord component
-
actualToolSequence
Returns the value of theactualToolSequencerecord component.- Returns:
- the value of the
actualToolSequencerecord component
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
latencyMs
public long latencyMs()Returns the value of thelatencyMsrecord component.- Returns:
- the value of the
latencyMsrecord component
-
costUsd
public double costUsd()Returns the value of thecostUsdrecord component.- Returns:
- the value of the
costUsdrecord component
-
inputTokens
public int inputTokens()Returns the value of theinputTokensrecord component.- Returns:
- the value of the
inputTokensrecord component
-
outputTokens
public int outputTokens()Returns the value of theoutputTokensrecord component.- Returns:
- the value of the
outputTokensrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-