Package dev.braintrust.eval
Record Class EvalCase<INPUT,OUTPUT>
java.lang.Object
java.lang.Record
dev.braintrust.eval.EvalCase<INPUT,OUTPUT>
- Record Components:
input- test inputexpected- expected value- additional tags to apply in the braintrust UImetadata- additional key-value data to apply in the braintrust UI
public record EvalCase<INPUT,OUTPUT> (INPUT input, OUTPUT expected, @Nonnull List<String> tags, @Nonnull Map<String,Object> metadata)
extends Record
A single test case in an LLM eval.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.expected()Returns the value of theexpectedrecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.metadata()Returns the value of themetadatarecord component.static <INPUT,OUTPUT>
EvalCase<INPUT,OUTPUT> of(INPUT input, OUTPUT expected) static <INPUT,OUTPUT>
EvalCase<INPUT,OUTPUT> tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
of
-
of
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
expected
Returns the value of theexpectedrecord component.- Returns:
- the value of the
expectedrecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-