ModelRig Quickstart Routing & reliability Route bundles Probes Bake-offs & replay How it fits Grade protocol Optimization loop Caching lifecycle Bring your traces (OTLP) Observe a pipeline Migration playbook (T0–T2) Recognition playbooks Tenants & statements Published receipts Provenance & trust Artifact content custody The MCP oracle Use-case templates Template: ticket triage Template: document extraction Template: CS next action Template: lead qualification Template: compliance review Template: catalog cleansing Template: call disposition QA Template: financial classification Template: medical classification Leaderboard

Template: compliance review

Check a document or message against your own policy, mark which of your rules it implicates, and send the uncertain and adverse ones to a human reviewer. This page is one of the use-case templates — a starting point, not a finished route. It is a first-pass triage that routes work to your reviewers, never a compliance control. The machine-readable source is node_modules/modelrig/templates/compliance-review.json.

Does this task fit?

Compliance review fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) Your policy and the material you review are stable enough that last quarter's examples still describe this quarter's — if your rules change constantly, a golden set goes stale, so pin the version you review against. (2) Your compliance or legal team can write down what a correct determination is, rule by rule, which is the grading guide below. (3) A reviewer who knows the policy can grade a batch of past items against the calls they would have made, so a grader can be calibrated against them. (4) You review enough items that calibration and optimization pay back. This template is a first-pass triage that routes work to your reviewers, never a substitute for them: it makes no claim to be a compliance control, and every adverse or uncertain call is meant to reach a person. Fill in your own determinations and rule set before you rely on it.

Starter schema

Replace every TODO with your own taxonomy; the enum slots ship without values on purpose, so an unfilled template refuses to look finished.


{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$comment": "STARTER SCHEMA. Replace every TODO with your own policy before use. The template runs as-is: free-text fields validate immediately. TODO markers show where adding your own enum values tightens grading to your review outcomes; do not copy example words from the docs.",
  "title": "ComplianceReview",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "determination",
    "needs_human"
  ],
  "properties": {
    "determination": {
      "type": "string",
      "description": "The review outcome for this item. TODO(enum): constrain this to YOUR own outcomes by adding an \"enum\": [ ... ] here (whatever labels your team already uses). It runs as free text immediately; add your own enum values here to tighten validation and grading to your process.",
      "$comment": "TODO(enum): add your review outcomes as the enum for this field."
    },
    "implicated_rules": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The ids or names of the rules in YOUR policy that this item implicates. Leave empty when nothing is implicated. Lets the grader check that a flag cites a rule that actually applies rather than a general impression."
    },
    "needs_human": {
      "type": "boolean",
      "description": "True when the item is ambiguous, borderline, or adverse and a reviewer should decide. Pairs with the escalation band in the grading guide."
    },
    "rationale": {
      "type": "string",
      "description": "One or two sentences grounding the determination in the item's own text and the rule it cites. Optional; keep it if you want the grader to check the call is explained."
    }
  }
}

Starter grading guide

The starter criteria run as written — sharpen each one in your team's own words as you grade. They are in the exact jsonb shape the set_task_settings write path validates — binary checks, each with a one-sentence pass and fail. There is no pass_threshold here: that lives in the route's grade: block.

determination-correct — Determination is correct

rule-actually-applies — Cited rules actually apply

no-missed-violation — Clear violations are not passed

human-flag-when-unsure — Ambiguous or adverse items are flagged for a human

The guide's escalation band starts at epsilon: 0.1: a grade within that distance of the route's pass threshold is treated as judge-uncertain and sent to a human. It is a starting band — tune it as your grader calibrates.

Golden checklist

Roughly twenty examples that cover:

Escalation starter

Start by escalating to a reviewer whenever the model sets needs_human, and treat every adverse determination as review-bound regardless of confidence — a first-pass triage should raise borderline calls, not resolve them. The machine-side band lives in starter_guide.escalation.epsilon: a grade within that distance of your route's pass threshold is treated as judge-uncertain and sent to the reviewer queue. The 0.1 here is a starting band — keep it wide, and only narrow it once a reviewer has graded enough items to trust the grader.

Apply it

By hand: copy the starter schema and replace each TODO with your own review outcomes and rule set; sharpen each starter criterion in your team's words, keeping the flag-everything-adverse posture that sends borderline calls to a person; gather the goldens the checklist describes; set the escalation band.

From a coding agent: the template feeds through the tools that already exist — create_route drafts the route bundle from the starter schema (files only, never your source), and set_task_settings (the task-settings scope) authors the grading guide as-is — the starter criteria run as written; sharpen them to your own rules as you grade. No new tool is involved. See the use-case templates overview for the full two-path walkthrough.