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: lead qualification

Sort an inbound lead into your own qualification stages and a routing segment, and flag the ones a person should work by hand. This page is one of the use-case templates — a starting point, not a finished route. The machine-readable source is node_modules/modelrig/templates/lead-qualification.json.

Does this task fit?

Lead qualification fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) Your idea of a qualified lead is stable enough that the leads that qualified last quarter still describe the ones arriving now — if your ideal-customer profile is still moving, settle it before you calibrate. (2) Your sales team can write down what a correct qualification decision is, which is the grading guide below. (3) An experienced rep can grade a batch of past leads against what actually closed or what they would have decided, so a grader can be calibrated against them. (4) You take in enough leads that calibration and optimization pay back. This template gives you a qualification-stage shell and a grading guide to fill in; it does not assume your stages, and it makes no claim about how well any model qualifies a lead — that is what your goldens and grades measure.

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 funnel 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 stages and segments; do not copy example words from the docs.",
  "title": "LeadQualification",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "qualification",
    "needs_human"
  ],
  "properties": {
    "qualification": {
      "type": "string",
      "description": "Which qualification stage the lead belongs in. TODO(enum): constrain this to YOUR own stage labels by adding an \"enum\": [ ... ] here. It runs as free text immediately; add your own enum values here to tighten validation and grading to your funnel.",
      "$comment": "TODO(enum): add your qualification stages as the enum for this field."
    },
    "segment": {
      "type": "string",
      "description": "Which team, region, or product the lead should route to. TODO(enum): add an \"enum\": [ ... ] with YOUR routing segments. Optional — delete it if you route by a single rule.",
      "$comment": "TODO(enum): add your routing segments as the enum for this field."
    },
    "needs_human": {
      "type": "boolean",
      "description": "True when the model is not confident enough to qualify the lead automatically and a rep should decide. Pairs with the escalation band in the grading guide."
    },
    "rationale": {
      "type": "string",
      "description": "One short sentence naming the signals in the lead that support the qualification (fit, intent, source, stated need). Optional; keep it if you want the grader to check the decision is grounded."
    }
  }
}

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.

qualification-correct — Qualification stage is correct

grounded-no-invention — Decision is grounded in the lead

segment-fits-routing — Segment matches your routing rules

human-flag-when-unsure — Ambiguous or high-value leads 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 rep whenever the model sets needs_human, and always for your highest-value or strategic leads regardless of the qualification. 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 a rep. The 0.1 here is a starting band — keep it wide until an experienced rep has graded enough leads to trust the grader, then narrow it.

Apply it

By hand: copy the starter schema and replace each TODO with your own qualification stages and routing segments; sharpen each starter criterion in your team's words; 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.