- a numeric grade (
grade_ai), - a per-criterion breakdown,
- a markdown rationale (
grading_rationale), - optional inline annotations on the student’s text.
grade_manual field that, when set, overrides the AI grade.
Calling the grader
ai_status: "pending").
Wait for completion via polling or webhook.
What you get back
Configuring the grader
Per-assignment configuration lives on theAssignment:
Human-in-the-loop
The recommended workflow:human_review_status flows: pending → reviewed. You can require
review per assignment (human_review: "required"); when set, the grade
shown to students is null until a human marks it reviewed.
Re-grading
If you change the rubric or want a second opinion, callgradeWithAi
again. The new result overwrites the previous AI grade; grade_manual
is untouched.
What AI grading is not
- Not a replacement for the teacher on consequential grades.
- Not stable across model versions: pin a
modelif you need reproducibility. - Not suitable for grading code, math proofs, or anything where the
rubric isn’t expressible in natural language. Use a custom grader and
ingest the score via
submissions.update({ grade_manual })(or$hk->submissions->update($id, ['grade_manual' => ...])) instead.
Auditing
Every AI grade carries the model version, the rubric snapshot, and the prompt fingerprint insubmission.evaluation_meta. That makes appeals
and audits feasible.