Skip to main content
AI grading scores a submission against the assignment’s rubric and returns:
  • a numeric grade (grade_ai),
  • a per-criterion breakdown,
  • a markdown rationale (grading_rationale),
  • optional inline annotations on the student’s text.
The grade is never committed to the gradebook automatically — there is always a grade_manual field that, when set, overrides the AI grade.

Calling the grader

That call is async (it returns immediately with ai_status: "pending"). Wait for completion via polling or webhook.

What you get back

Configuring the grader

Per-assignment configuration lives on the Assignment:
For one-off rubric overrides on a single submission:

Human-in-the-loop

The recommended workflow:
human_review_status flows: pendingreviewed. 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, call gradeWithAi again. The new result overwrites the previous AI grade; grade_manual is untouched.
You can also ask for the AI’s reasoning without a grade — useful when the teacher wants explanations on a hand-graded submission:

What AI grading is not

  • Not a replacement for the teacher on consequential grades.
  • Not stable across model versions: pin a model if 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 in submission.evaluation_meta. That makes appeals and audits feasible.