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
- Pass: the lead is put in the stage a rep on your team would have chosen for it, by your own qualification rules.
- Fail: The lead is qualified higher or lower than its signals warrant — a cold lead marked sales-ready, or a strong fit left unqualified.
grounded-no-invention — Decision is grounded in the lead
- Pass: every part of the decision is supported by something the lead record actually contains; nothing is invented.
- Fail: The output asserts a firmographic, an intent signal, or a budget that the lead record does not contain.
segment-fits-routing — Segment matches your routing rules
- Pass: the routing segment is the one your rules assign to this lead's region, size, or product interest.
- Fail: The lead is routed to a segment its own attributes do not match, or to a catch-all when a specific segment applies.
human-flag-when-unsure — Ambiguous or high-value leads are flagged for a human
- Pass: a lead that is genuinely ambiguous, thin on signal, or unusually high-value sets needs_human rather than being auto-qualified.
- Fail: A lead a rep would have hesitated on is qualified with false confidence.
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:
- One clear example per qualification stage in your funnel — the ordinary, unambiguous lead for each stage.
- The two or three stages your team most often disagrees on, side by side, so the guide learns the boundary between them.
- A lead whose signals point two ways (strong fit but no stated intent, or high intent but a poor fit) — the golden fixes which signal wins.
- A high-value or strategic lead where the safe move is to hand off to a rep — the golden shows needs_human set.
- A thin lead with almost no signal yet — the golden shows a conservative stage rather than a confident qualification.
- An edge case: an empty, spam, or clearly mis-submitted lead — the golden shows it flagged for a human rather than force-qualified.
- Aim for roughly twenty goldens total, weighted toward the ambiguous and high-value leads rather than the easy centre of each stage.
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.