Skip to content
mentoor

Code-based graders

For engineers

Deterministic checks (exact match, schemas, assertions and executable tests) that grade fast and cheap, and where they stop working

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

A ticket classifier returns "Billing." and the key is "billing". Plain string equality marks it wrong. What is the right fix in the grader?

Choose one answer

Check yourself · 2 of 5

An output is valid JSON and matches the schema, but the category is wrong. What does the schema check report?

Choose one answer

Check yourself · 3 of 5

Why is running generated code against tests a stronger grader than reading it?

Choose one answer

Check yourself · 4 of 5

After a prompt change, answers start with "I cannot browse the internet". Which assertion catches this cheaply on every run?

Choose one answer

Check yourself · 5 of 5

A grader passes any refund answer that contains "30 days". Which answer does it wrongly pass?

Choose one answer

Topics

  1. Exact and normalized answer matching4 min read · Comparing labels, extracted fields and numbers after normalizing case, whitespace and units, and knowing where exact match fails
  2. Validating output structure with schemas5 min read · JSON Schema, Pydantic or Zod checks for required fields, types and enums, grading format separately from content
  3. Executable tests as graders5 min read · Running generated code against tests, executing generated SQL on a fixture database and pass@k for code tasks
  4. Cheap assertions that catch regressions4 min read · Contains and not-contains checks, length limits, banned phrases, citation presence, language detection and PII patterns
  5. What code graders cannot judge5 min read · Tone, faithfulness and helpfulness, brittle regexes that pass wrong answers, and when to hand off to a judge or a human

Start here

Helps to know first

110 questions · last verified 2026-12