CodeGrader class abstract
Convenience base for deterministic code-based graders.
Subclasses implement computeAssertions and the base composes them into a Score. The default passThreshold is 1.0 (all assertions must pass).
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → GraderKind
-
Anthropic kind: code / model / human.
no setteroverride
- name → String
-
Stable name. Used as score key in reports.
no setterinherited
- passThreshold → double
-
If a Score.value meets or exceeds this threshold, Score.passed is
true. Defaults to1.0(binary) but graders may override to support partial credit thresholds.no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildRationale(
List< Assertion> assertions) → String? - Subclasses may override to customize the rationale produced on failure; default joins all failed assertion descriptions.
-
computeAssertions(
{required Trial trial, required Transcript transcript, required Outcome outcome, required EvalContext context, ReferenceSolution? referenceSolution}) → Future< List< Assertion> > - Subclasses produce a list of pass/fail assertions.
-
grade(
{required Trial trial, required Transcript transcript, required Outcome outcome, required EvalContext context, ReferenceSolution? referenceSolution}) → Future< Score> -
Compute a score for one trial.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited