Score class

The output of a Grader for one trial.

Anthropic Step 5: graders should support partial credit (value is a double in 0.0, 1.0) and must explain failures clearly (rationale).

Constructors

Score({required String graderName, required double? value, bool? passed, List<Assertion> assertions = const [], String? rationale, Map<String, dynamic> metadata = const {}})
const
Score.fromJson(Map<String, dynamic> json)
factory

Properties

assertions List<Assertion>
Sub-checks that contributed to value.
final
graderName String
Stable name of the grader that produced this score.
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>
Free-form metadata (e.g. judge response, diff details).
final
passed bool?
Whether value crosses the grader's pass threshold. null if value is null. Aggregated by EvalRunReport into pass@k and pass^k.
final
rationale String?
Human-readable explanation. Required when passed == false or value == null. Anthropic Step 5: "failures should seem fair".
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value double?
0.0 .. 1.0 with partial credit. null means the grader could not evaluate (e.g. an LLM judge returned "Unknown"). null scores are reported separately and do not contribute to averages.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited