Package dev.dokimos.core
Record Class ItemResult
java.lang.Object
java.lang.Record
dev.dokimos.core.ItemResult
- Record Components:
example- the example that was executedactualOutputs- the outputs the task produced, never null (empty map if absent)evalResults- the evaluator results, never null (empty list if absent)metrics- optional metrics for the underlying LLM call, or null if not measured
public record ItemResult(Example example, Map<String,Object> actualOutputs, List<EvalResult> evalResults, CallMetrics metrics)
extends Record
The outcome of executing a single example: the example itself, the actual outputs the task
produced, the evaluator results, and optional metrics describing the underlying LLM call.
-
Constructor Summary
ConstructorsConstructorDescriptionItemResult(Example example, Map<String, Object> actualOutputs, List<EvalResult> evalResults) Creates a result without call metrics.ItemResult(Example example, Map<String, Object> actualOutputs, List<EvalResult> evalResults, CallMetrics metrics) Creates an instance of aItemResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactualOutputsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevalResultsrecord component.example()Returns the value of theexamplerecord component.final inthashCode()Returns a hash code value for this object.metrics()Returns the value of themetricsrecord component.booleansuccess()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemResult
public ItemResult(Example example, Map<String, Object> actualOutputs, List<EvalResult> evalResults, CallMetrics metrics) Creates an instance of aItemResultrecord class.- Parameters:
example- the value for theexamplerecord componentactualOutputs- the value for theactualOutputsrecord componentevalResults- the value for theevalResultsrecord componentmetrics- the value for themetricsrecord component
-
ItemResult
Creates a result without call metrics.- Parameters:
example- the example that was executedactualOutputs- the outputs the task producedevalResults- the evaluator results
-
-
Method Details
-
success
public boolean success() -
toTestCase
-
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). -
example
Returns the value of theexamplerecord component.- Returns:
- the value of the
examplerecord component
-
actualOutputs
Returns the value of theactualOutputsrecord component.- Returns:
- the value of the
actualOutputsrecord component
-
evalResults
Returns the value of theevalResultsrecord component.- Returns:
- the value of the
evalResultsrecord component
-
metrics
Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-