Skip to main content

Grade turns

The Evaluation library, @bijectionhq/library-evaluation, measures AI behavior for the app that includes it. A judge is a typed model task, and a grade is a check on (subject, digest, kind). Place its subtree in your tree, then:
  • record offline runs with runs.register and runs.observe, and read them with runs.report;
  • grade live items with grades.grade, sampled at the monitor’s rate, and read grades.summary.
Grade a turn from the continuation that receives its result (see Turns from your code): pass the question, the TurnResult.text and the evidence your tools returned. Key each grade by the turn, so a grade is recorded once per turn.

Record ratings

A rating is a fact in a table of your own, under the transcript label, written by an exposed mutation that first checks the turn is the caller’s:
turns.get returns null for a turn that is not the caller’s, so a rating can only name the rater’s own settled turn. insert refuses Exists for a second rating of the same turn by the same person.