modelrig 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/README.md +27 -2
  3. package/dist/artifacts/artifact.d.ts +12 -13
  4. package/dist/artifacts/artifact.d.ts.map +1 -1
  5. package/dist/artifacts/artifact.js +17 -23
  6. package/dist/artifacts/index.d.ts +13 -5
  7. package/dist/artifacts/index.d.ts.map +1 -1
  8. package/dist/artifacts/index.js +11 -4
  9. package/dist/artifacts/run-context.d.ts +3 -24
  10. package/dist/artifacts/run-context.d.ts.map +1 -1
  11. package/dist/artifacts/run-context.js +3 -39
  12. package/dist/bakeoff/engine.d.ts +29 -0
  13. package/dist/bakeoff/engine.d.ts.map +1 -1
  14. package/dist/bakeoff/engine.js +47 -0
  15. package/dist/bakeoff/eval-cases-rig.d.ts +36 -0
  16. package/dist/bakeoff/eval-cases-rig.d.ts.map +1 -0
  17. package/dist/bakeoff/eval-cases-rig.js +27 -0
  18. package/dist/bakeoff/eval-cases.d.ts +19 -0
  19. package/dist/bakeoff/eval-cases.d.ts.map +1 -1
  20. package/dist/bakeoff/eval-cases.js +18 -1
  21. package/dist/bakeoff/golden-judge.d.ts +47 -0
  22. package/dist/bakeoff/golden-judge.d.ts.map +1 -0
  23. package/dist/bakeoff/golden-judge.js +49 -0
  24. package/dist/bakeoff/quality.d.ts +30 -0
  25. package/dist/bakeoff/quality.d.ts.map +1 -1
  26. package/dist/bakeoff/quality.js +21 -0
  27. package/dist/bakeoff/replay.d.ts +11 -0
  28. package/dist/bakeoff/replay.d.ts.map +1 -1
  29. package/dist/bakeoff/replay.js +8 -0
  30. package/dist/bakeoff/report.d.ts +7 -0
  31. package/dist/bakeoff/report.d.ts.map +1 -1
  32. package/dist/bakeoff/report.js +26 -0
  33. package/dist/cli-judge.d.ts +12 -0
  34. package/dist/cli-judge.d.ts.map +1 -0
  35. package/dist/cli-judge.js +48 -0
  36. package/dist/cli.d.ts.map +1 -1
  37. package/dist/cli.js +14 -42
  38. package/dist/config.d.ts +54 -29
  39. package/dist/config.d.ts.map +1 -1
  40. package/dist/config.js +86 -47
  41. package/dist/detect/detector.d.ts +4 -2
  42. package/dist/detect/detector.d.ts.map +1 -1
  43. package/dist/detect/safe-harbor.d.ts +57 -0
  44. package/dist/detect/safe-harbor.d.ts.map +1 -0
  45. package/dist/detect/safe-harbor.js +278 -0
  46. package/dist/feedback/coverage.d.ts +11 -8
  47. package/dist/feedback/coverage.d.ts.map +1 -1
  48. package/dist/feedback/coverage.js +29 -16
  49. package/dist/feedback/grade.d.ts +51 -0
  50. package/dist/feedback/grade.d.ts.map +1 -0
  51. package/dist/feedback/grade.js +63 -0
  52. package/dist/gateway/http-protocol.d.ts +1 -1
  53. package/dist/gateway/http-protocol.d.ts.map +1 -1
  54. package/dist/gateway/http-protocol.js +1 -1
  55. package/dist/index.d.ts +44 -27
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +110 -43
  58. package/dist/init/observe-cli.js +1 -1
  59. package/dist/init/observe.d.ts +2 -2
  60. package/dist/init/observe.d.ts.map +1 -1
  61. package/dist/init/observe.js +11 -7
  62. package/dist/mask/arm.d.ts +112 -0
  63. package/dist/mask/arm.d.ts.map +1 -0
  64. package/dist/mask/arm.js +179 -0
  65. package/dist/mask/index.d.ts +2 -0
  66. package/dist/mask/index.d.ts.map +1 -1
  67. package/dist/mask/index.js +7 -1
  68. package/dist/mask/mask-policy-cli.d.ts +12 -4
  69. package/dist/mask/mask-policy-cli.d.ts.map +1 -1
  70. package/dist/mask/mask-policy-cli.js +34 -9
  71. package/dist/query/grammar.d.ts +2 -2
  72. package/dist/query/grammar.d.ts.map +1 -1
  73. package/dist/query/grammar.js +3 -1
  74. package/dist/query/saved.d.ts +13 -0
  75. package/dist/query/saved.d.ts.map +1 -1
  76. package/dist/query/saved.js +67 -1
  77. package/dist/receipts/types.d.ts +1 -1
  78. package/dist/receipts/types.d.ts.map +1 -1
  79. package/dist/receipts/types.js +1 -0
  80. package/dist/registry/build.d.ts +43 -1
  81. package/dist/registry/build.d.ts.map +1 -1
  82. package/dist/registry/build.js +52 -0
  83. package/dist/registry/pricing-shape.d.ts +29 -0
  84. package/dist/registry/pricing-shape.d.ts.map +1 -1
  85. package/dist/registry/pricing-shape.js +10 -1
  86. package/dist/registry/rows.d.ts.map +1 -1
  87. package/dist/registry/rows.js +1 -0
  88. package/dist/registry/select.d.ts +6 -1
  89. package/dist/registry/select.d.ts.map +1 -1
  90. package/dist/registry/select.js +11 -0
  91. package/dist/routes/call-config.d.ts +199 -0
  92. package/dist/routes/call-config.d.ts.map +1 -0
  93. package/dist/routes/call-config.js +343 -0
  94. package/dist/routes/loader.js +5 -3
  95. package/dist/routes/objective-loader.d.ts +12 -0
  96. package/dist/routes/objective-loader.d.ts.map +1 -1
  97. package/dist/routes/objective-loader.js +82 -0
  98. package/dist/routes/resolved-bundle.d.ts +50 -0
  99. package/dist/routes/resolved-bundle.d.ts.map +1 -1
  100. package/dist/routes/resolved-bundle.js +52 -0
  101. package/dist/routes/screen-loader.d.ts +28 -0
  102. package/dist/routes/screen-loader.d.ts.map +1 -1
  103. package/dist/routes/screen-loader.js +51 -0
  104. package/dist/run/accept.d.ts +2 -0
  105. package/dist/run/accept.d.ts.map +1 -1
  106. package/dist/run/accept.js +1 -0
  107. package/dist/run/dispatch.d.ts +42 -13
  108. package/dist/run/dispatch.d.ts.map +1 -1
  109. package/dist/run/dispatch.js +107 -25
  110. package/dist/run/grounding.d.ts +28 -2
  111. package/dist/run/grounding.d.ts.map +1 -1
  112. package/dist/run/grounding.js +54 -10
  113. package/dist/run/record-attempt.d.ts +4 -0
  114. package/dist/run/record-attempt.d.ts.map +1 -1
  115. package/dist/run/record-attempt.js +4 -0
  116. package/dist/run/routing-docs.js +1 -1
  117. package/dist/run/run.d.ts.map +1 -1
  118. package/dist/run/run.js +21 -26
  119. package/dist/savings/odometer.d.ts +4 -0
  120. package/dist/savings/odometer.d.ts.map +1 -1
  121. package/dist/savings/odometer.js +20 -1
  122. package/dist/savings/swap-execute.d.ts +7 -0
  123. package/dist/savings/swap-execute.d.ts.map +1 -1
  124. package/dist/savings/swap-execute.js +30 -0
  125. package/dist/savings/swaps-client.d.ts +10 -0
  126. package/dist/savings/swaps-client.d.ts.map +1 -1
  127. package/dist/screen/fixtures/probe-corpora.d.ts +23 -0
  128. package/dist/screen/fixtures/probe-corpora.d.ts.map +1 -0
  129. package/dist/screen/fixtures/probe-corpora.js +69 -0
  130. package/dist/screen/index.d.ts +21 -0
  131. package/dist/screen/index.d.ts.map +1 -0
  132. package/dist/screen/index.js +64 -0
  133. package/dist/screen/model-screen.d.ts +111 -0
  134. package/dist/screen/model-screen.d.ts.map +1 -0
  135. package/dist/screen/model-screen.js +178 -0
  136. package/dist/screen/patterns.d.ts +51 -0
  137. package/dist/screen/patterns.d.ts.map +1 -0
  138. package/dist/screen/patterns.js +151 -0
  139. package/dist/screen/phi-gate.d.ts +52 -0
  140. package/dist/screen/phi-gate.d.ts.map +1 -0
  141. package/dist/screen/phi-gate.js +86 -0
  142. package/dist/screen/policy.d.ts +71 -0
  143. package/dist/screen/policy.d.ts.map +1 -0
  144. package/dist/screen/policy.js +334 -0
  145. package/dist/screen/probe.d.ts +118 -0
  146. package/dist/screen/probe.d.ts.map +1 -0
  147. package/dist/screen/probe.js +132 -0
  148. package/dist/screen/screen-cli.d.ts +16 -0
  149. package/dist/screen/screen-cli.d.ts.map +1 -0
  150. package/dist/screen/screen-cli.js +178 -0
  151. package/dist/screen/screen.d.ts +99 -0
  152. package/dist/screen/screen.d.ts.map +1 -0
  153. package/dist/screen/screen.js +0 -0
  154. package/dist/screen/sidecar.d.ts +69 -0
  155. package/dist/screen/sidecar.d.ts.map +1 -0
  156. package/dist/screen/sidecar.js +145 -0
  157. package/dist/screen/types.d.ts +43 -2
  158. package/dist/screen/types.d.ts.map +1 -1
  159. package/dist/settings/api-fetcher.d.ts +14 -3
  160. package/dist/settings/api-fetcher.d.ts.map +1 -1
  161. package/dist/settings/api-fetcher.js +61 -10
  162. package/dist/settings/grading-guide.d.ts +76 -0
  163. package/dist/settings/grading-guide.d.ts.map +1 -0
  164. package/dist/settings/grading-guide.js +23 -0
  165. package/dist/settings/index.d.ts +3 -2
  166. package/dist/settings/index.d.ts.map +1 -1
  167. package/dist/settings/index.js +2 -1
  168. package/dist/settings/task-settings.d.ts +44 -7
  169. package/dist/settings/task-settings.d.ts.map +1 -1
  170. package/dist/settings/task-settings.js +53 -12
  171. package/dist/status.d.ts +26 -20
  172. package/dist/status.d.ts.map +1 -1
  173. package/dist/status.js +47 -29
  174. package/dist/telemetry/artifact-store.d.ts +5 -6
  175. package/dist/telemetry/artifact-store.d.ts.map +1 -1
  176. package/dist/telemetry/artifact-store.js +10 -24
  177. package/dist/telemetry/attempt-meta.d.ts +21 -0
  178. package/dist/telemetry/attempt-meta.d.ts.map +1 -1
  179. package/dist/telemetry/attempt-meta.js +9 -0
  180. package/dist/telemetry/exporter.d.ts +2 -2
  181. package/dist/telemetry/exporter.d.ts.map +1 -1
  182. package/dist/telemetry/exporter.js +22 -41
  183. package/dist/telemetry/grade-mappers.d.ts +22 -0
  184. package/dist/telemetry/grade-mappers.d.ts.map +1 -0
  185. package/dist/telemetry/grade-mappers.js +58 -0
  186. package/dist/telemetry/grades-sql.d.ts +53 -0
  187. package/dist/telemetry/grades-sql.d.ts.map +1 -0
  188. package/dist/telemetry/grades-sql.js +133 -0
  189. package/dist/telemetry/ingest-protocol.d.ts +29 -46
  190. package/dist/telemetry/ingest-protocol.d.ts.map +1 -1
  191. package/dist/telemetry/ingest-protocol.js +16 -54
  192. package/dist/telemetry/store-migrations.d.ts.map +1 -1
  193. package/dist/telemetry/store-migrations.js +51 -0
  194. package/dist/telemetry/store.d.ts +9 -6
  195. package/dist/telemetry/store.d.ts.map +1 -1
  196. package/dist/telemetry/store.js +8 -50
  197. package/dist/tenancy/api-key-format.d.ts +30 -1
  198. package/dist/tenancy/api-key-format.d.ts.map +1 -1
  199. package/dist/tenancy/api-key-format.js +33 -1
  200. package/dist/types/provider.d.ts +3 -0
  201. package/dist/types/provider.d.ts.map +1 -1
  202. package/dist/types/provider.js +25 -0
  203. package/dist/types/route.d.ts +78 -2
  204. package/dist/types/route.d.ts.map +1 -1
  205. package/dist/types/telemetry.d.ts +43 -46
  206. package/dist/types/telemetry.d.ts.map +1 -1
  207. package/dist/validate-cli.d.ts.map +1 -1
  208. package/dist/validate-cli.js +32 -0
  209. package/dist/verify/verify.d.ts +5 -0
  210. package/dist/verify/verify.d.ts.map +1 -1
  211. package/dist/verify/verify.js +2 -0
  212. package/dist/watch/evaluate.d.ts +84 -1
  213. package/dist/watch/evaluate.d.ts.map +1 -1
  214. package/dist/watch/evaluate.js +28 -0
  215. package/dist/watch/monitor.d.ts +8 -2
  216. package/dist/watch/monitor.d.ts.map +1 -1
  217. package/dist/watch/monitor.js +13 -5
  218. package/dist/watch/regret-monitor-cli.d.ts +16 -0
  219. package/dist/watch/regret-monitor-cli.d.ts.map +1 -0
  220. package/dist/watch/regret-monitor-cli.js +137 -0
  221. package/dist/watch/regret-monitor.d.ts +168 -0
  222. package/dist/watch/regret-monitor.d.ts.map +1 -0
  223. package/dist/watch/regret-monitor.js +304 -0
  224. package/dist/watch/upgrade.d.ts +62 -0
  225. package/dist/watch/upgrade.d.ts.map +1 -0
  226. package/dist/watch/upgrade.js +57 -0
  227. package/docs/agent-skill/SKILL.md +109 -5
  228. package/docs/how-it-fits.md +3 -2
  229. package/docs/instrumentation.md +149 -21
  230. package/docs/llms.txt +64 -20
  231. package/docs/mcp-oracle.md +249 -0
  232. package/docs/quickstart.md +103 -9
  233. package/package.json +16 -3
  234. package/registry/leaderboard.json +74 -0
  235. package/registry/registry.json +150 -112
  236. package/screen.d.ts +16 -0
  237. package/templates/call-disposition-qa.json +77 -0
  238. package/templates/catalog-cleansing.json +77 -0
  239. package/templates/compliance-review.json +76 -0
  240. package/templates/cs-next-action.json +76 -0
  241. package/templates/document-extraction.json +78 -0
  242. package/templates/financial-classification.json +75 -0
  243. package/templates/lead-qualification.json +76 -0
  244. package/templates/medical-classification.json +71 -0
  245. package/templates/ticket-triage.json +76 -0
  246. package/dist/telemetry/supabase-exporter.d.ts +0 -64
  247. package/dist/telemetry/supabase-exporter.d.ts.map +0 -1
  248. package/dist/telemetry/supabase-exporter.js +0 -211
package/screen.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Root type shim for the `modelrig/screen` sub-path export (IP-2a-1).
3
+ *
4
+ * Same mechanism as `receipts.d.ts` (RP-1): package.json `exports` points
5
+ * `modelrig/screen` at `dist/screen/index` for runtime and modern-resolution
6
+ * TypeScript consumers; classic `moduleResolution: "Node"` consumers —
7
+ * including this monorepo's `modelrig-server`, whose grader assembly reuses
8
+ * the SC-0 provenance seam and the SC-1 pattern detector — ignore `exports`
9
+ * and resolve the bare subpath against the package root, so this file is what
10
+ * they type-resolve. Both paths land on the same declarations.
11
+ *
12
+ * The screen surface stays deliberately OUT of the bare `modelrig` entry
13
+ * (src/index.ts) — this shim widens nothing there; it only makes the existing
14
+ * screen module addressable as a sub-path, the way `modelrig/receipts` is.
15
+ */
16
+ export * from "./dist/screen/index";
@@ -0,0 +1,77 @@
1
+ {
2
+ "use_case": "call-disposition-qa",
3
+ "title": "Call disposition QA",
4
+ "summary": "From a call transcript, check the disposition the agent logged and score the call against your QA scorecard, handing off the disputed ones to a supervisor.",
5
+ "fit_note": "Call disposition QA fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) Your dispositions and scorecard are stable enough that last month's calls still describe this month's — if you are still redrawing the scorecard, settle it before you calibrate. (2) Your QA team can write down what a correct disposition and a correct score are, which is the grading guide below. (3) An experienced QA reviewer can grade a batch of past calls against the calls they would have scored, so a grader can be calibrated against them. (4) You handle enough calls that calibration and optimization pay back. This template assumes the call arrives as text: ModelRig takes a transcript as input, so you bring your own transcription upstream and feed the transcript here — the template does not read audio. It gives you a disposition shell and a scorecard-shaped guide to fill in; it makes no claim about how well any model scores a call — that is what your goldens and grades measure.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$comment": "STARTER SCHEMA. Replace every TODO with your own dispositions and scorecard 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 process; do not copy example words from the docs.",
9
+ "title": "CallDispositionQa",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["disposition", "needs_human"],
13
+ "properties": {
14
+ "disposition": {
15
+ "type": "string",
16
+ "description": "The disposition the transcript actually supports for this call. TODO(enum): constrain this to YOUR own disposition 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 process.",
17
+ "$comment": "TODO(enum): add your call dispositions as the enum for this field."
18
+ },
19
+ "scorecard": {
20
+ "type": "object",
21
+ "description": "The QA scorecard result. TODO: replace this placeholder with one named property per item on YOUR scorecard (e.g. verified_identity, disclosed_recording, resolved_issue), each with its own type and description. Keep additionalProperties false once you have listed them so nothing extra is invented.",
22
+ "additionalProperties": true,
23
+ "$comment": "TODO(fields): replace with your real scorecard items; add a required list once you know which items must always be present."
24
+ },
25
+ "matches_agent_log": {
26
+ "type": "boolean",
27
+ "description": "True when the disposition the transcript supports matches the one the agent logged. Lets you surface logged-versus-actual mismatches. Optional; delete it if you do not track the agent's own log."
28
+ },
29
+ "needs_human": {
30
+ "type": "boolean",
31
+ "description": "True when the call is disputed, sensitive, or the transcript is too incomplete to score confidently and a supervisor should review. Pairs with the escalation band in the grading guide."
32
+ }
33
+ }
34
+ },
35
+ "starter_guide": {
36
+ "criteria": [
37
+ {
38
+ "id": "disposition-correct",
39
+ "title": "Disposition matches the call",
40
+ "pass": "the disposition is the one your QA team would assign given what the transcript shows happened on the call.",
41
+ "fail": "The disposition does not match the call — a resolved outcome on a call that escalated, or the reverse."
42
+ },
43
+ {
44
+ "id": "grounded-in-transcript",
45
+ "title": "Every judgment is grounded in the transcript",
46
+ "pass": "each scorecard result cites something actually said on the call; nothing is inferred beyond the transcript.",
47
+ "fail": "The output asserts an event, a phrase, or an outcome that the transcript does not contain."
48
+ },
49
+ {
50
+ "id": "scorecard-applied-consistently",
51
+ "title": "Scorecard is applied by your rules",
52
+ "pass": "each scorecard item is judged the way your rubric defines it, not by a general impression of the call.",
53
+ "fail": "A scorecard item is marked pass or fail in a way your own rubric would not, or is skipped when it applies."
54
+ },
55
+ {
56
+ "id": "human-flag-when-unsure",
57
+ "title": "Disputed or sensitive calls are flagged for a human",
58
+ "pass": "a call that is disputed, compliance-sensitive, or has a partial or unclear transcript sets needs_human rather than being auto-scored.",
59
+ "fail": "A call a supervisor would have reviewed is scored automatically with false confidence."
60
+ }
61
+ ],
62
+ "teach_grade_ids": [],
63
+ "escalation": {
64
+ "epsilon": 0.1
65
+ }
66
+ },
67
+ "golden_checklist": [
68
+ "One clear example per disposition in your process — the ordinary, unambiguous call for each outcome.",
69
+ "A call that could plausibly take two dispositions — the golden fixes which one wins and why.",
70
+ "A call where the agent's logged disposition does not match what the transcript shows — the golden records the mismatch.",
71
+ "A compliance-sensitive call (a required disclosure, a dispute, a vulnerable caller) that should reach a supervisor regardless of score.",
72
+ "A clean, by-the-book call — so the guide learns the ordinary pass, not only the failures.",
73
+ "An edge case: a partial, cut-off, or garbled transcript — the golden shows it flagged for a human rather than scored as if complete.",
74
+ "Aim for roughly twenty goldens total, weighted toward the disputed, mismatched, and sensitive calls rather than the clean centre."
75
+ ],
76
+ "escalation_starter": "Start by escalating to a supervisor whenever the model sets needs_human, and always for compliance-sensitive calls regardless of the score. 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 supervisor queue. The 0.1 here is a starting band — keep it wide until an experienced reviewer has graded enough calls to trust the grader, then narrow it."
77
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "use_case": "catalog-cleansing",
3
+ "title": "Catalog cleansing",
4
+ "summary": "Normalize a product-catalog record into your own taxonomy and attribute shape, correct what is clearly wrong, and flag the ones a person should check.",
5
+ "fit_note": "Catalog cleansing fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) Your catalog taxonomy and attribute set are stable enough that a rule that cleaned last month's records still cleans this month's — if the taxonomy is still being redrawn, settle it before you calibrate. (2) Someone who owns the catalog can write down what a correctly cleansed record is, field by field, which is the grading guide below. (3) You have corrected records on hand — rows a person already fixed — so a grader can be calibrated against that ground truth. (4) You process enough records that calibration and optimization pay back. Cleansing usually runs as a batch over a backlog of raw records rather than one at a time; the loop still applies — you grade a representative sample of the batch and let the grades stand in for the rest. This template gives you a taxonomy shell and a grading guide to fill in; it does not assume your fields, and it makes no claim about how well any model cleanses a record — that is what your goldens and grades measure.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$comment": "STARTER SCHEMA. Replace every TODO with your own taxonomy and attributes 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 catalog; do not copy example words from the docs.",
9
+ "title": "CatalogCleansing",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["category", "needs_human"],
13
+ "properties": {
14
+ "category": {
15
+ "type": "string",
16
+ "description": "The catalog category this record belongs in. TODO(enum): constrain this to YOUR own category 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 taxonomy.",
17
+ "$comment": "TODO(enum): add your catalog categories as the enum for this field."
18
+ },
19
+ "corrected_attributes": {
20
+ "type": "object",
21
+ "description": "The cleansed attribute values. TODO: replace this placeholder with one named property per attribute you normalize (e.g. brand, unit_size, color), each with its own type and description. Keep additionalProperties false once you have listed them so nothing extra is invented.",
22
+ "additionalProperties": true,
23
+ "$comment": "TODO(fields): replace with your real attribute set; add a required list once you know which attributes must always be present."
24
+ },
25
+ "duplicate_of": {
26
+ "type": "string",
27
+ "description": "The id of an existing record this one appears to duplicate, when you run dedupe. Leave absent when the record is not a suspected duplicate; the model should flag a suspected merge, never perform it."
28
+ },
29
+ "needs_human": {
30
+ "type": "boolean",
31
+ "description": "True when the record is too ambiguous or conflicting to cleanse confidently and a person should review. Pairs with the escalation band in the grading guide."
32
+ }
33
+ }
34
+ },
35
+ "starter_guide": {
36
+ "criteria": [
37
+ {
38
+ "id": "category-correct",
39
+ "title": "Category is correct",
40
+ "pass": "the record is placed in the category a person who owns your catalog would have chosen for it.",
41
+ "fail": "The record is placed in a category that does not match what it actually is, or in a catch-all when a specific category fits."
42
+ },
43
+ {
44
+ "id": "corrections-grounded",
45
+ "title": "Corrections are grounded in the record",
46
+ "pass": "every corrected attribute is supported by what the record actually contains, normalized to your format; nothing is invented.",
47
+ "fail": "A corrected value contradicts the record, or an attribute is filled with a plausible-looking value the record does not support."
48
+ },
49
+ {
50
+ "id": "preserves-correct-data",
51
+ "title": "Already-correct data is preserved",
52
+ "pass": "an attribute that was already correct is left intact, not overwritten or dropped.",
53
+ "fail": "The output alters or removes a field that was already valid, losing data that did not need cleansing."
54
+ },
55
+ {
56
+ "id": "human-flag-when-unsure",
57
+ "title": "Ambiguous or conflicting records are flagged for a human",
58
+ "pass": "a record with conflicting attributes, an unrecognizable category, or an uncertain duplicate match sets needs_human rather than being force-cleansed.",
59
+ "fail": "A record a person would have paused on is cleansed with false confidence, or a suspected duplicate is merged instead of flagged."
60
+ }
61
+ ],
62
+ "teach_grade_ids": [],
63
+ "escalation": {
64
+ "epsilon": 0.1
65
+ }
66
+ },
67
+ "golden_checklist": [
68
+ "One clean example per category in your taxonomy — the ordinary, well-formed record for each category.",
69
+ "A record that is already correct — the golden shows it left untouched, so the guide learns not to over-correct.",
70
+ "The two or three categories your catalog most often confuses, side by side, so the guide learns the boundary.",
71
+ "A record with a conflicting or contradictory attribute — the golden fixes which value is right and why.",
72
+ "A near-duplicate pair — the golden shows the duplicate flagged for review, not silently merged.",
73
+ "An edge case: a garbled, truncated, or unrecognizable record — the golden shows it flagged for a human rather than force-cleansed.",
74
+ "Aim for roughly twenty goldens total, weighted toward the conflicting, duplicate, and already-clean records rather than the easy centre."
75
+ ],
76
+ "escalation_starter": "Start by escalating to a person whenever the model sets needs_human, and whenever a suggested duplicate merge would combine records that a person has not confirmed. 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 review queue. The 0.1 here is a starting band — widen it while you build trust on a fresh batch, narrow it as your grader calibrates against your corrected records."
77
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "use_case": "compliance-review",
3
+ "title": "Compliance review",
4
+ "summary": "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.",
5
+ "fit_note": "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.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$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.",
9
+ "title": "ComplianceReview",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["determination", "needs_human"],
13
+ "properties": {
14
+ "determination": {
15
+ "type": "string",
16
+ "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.",
17
+ "$comment": "TODO(enum): add your review outcomes as the enum for this field."
18
+ },
19
+ "implicated_rules": {
20
+ "type": "array",
21
+ "items": { "type": "string" },
22
+ "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."
23
+ },
24
+ "needs_human": {
25
+ "type": "boolean",
26
+ "description": "True when the item is ambiguous, borderline, or adverse and a reviewer should decide. Pairs with the escalation band in the grading guide."
27
+ },
28
+ "rationale": {
29
+ "type": "string",
30
+ "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."
31
+ }
32
+ }
33
+ },
34
+ "starter_guide": {
35
+ "criteria": [
36
+ {
37
+ "id": "determination-correct",
38
+ "title": "Determination is correct",
39
+ "pass": "the item gets the determination a reviewer on your team would have reached under your policy.",
40
+ "fail": "The determination is wrong for the item — a clear violation passed, or a clean item marked adverse."
41
+ },
42
+ {
43
+ "id": "rule-actually-applies",
44
+ "title": "Cited rules actually apply",
45
+ "pass": "every rule named in implicated_rules is one the item genuinely engages, and each cited rule exists in your policy.",
46
+ "fail": "The output cites a rule the item does not implicate, or names a rule that is not in your policy at all."
47
+ },
48
+ {
49
+ "id": "no-missed-violation",
50
+ "title": "Clear violations are not passed",
51
+ "pass": "an item that plainly breaks a rule is marked, not waved through.",
52
+ "fail": "An item that clearly violates a rule in your policy is returned as clean."
53
+ },
54
+ {
55
+ "id": "human-flag-when-unsure",
56
+ "title": "Ambiguous or adverse items are flagged for a human",
57
+ "pass": "an item that is borderline, novel, or adverse sets needs_human rather than being auto-cleared or auto-flagged with false confidence.",
58
+ "fail": "An item a reviewer would have hesitated on is decided automatically instead of being sent to a person."
59
+ }
60
+ ],
61
+ "teach_grade_ids": [],
62
+ "escalation": {
63
+ "epsilon": 0.1
64
+ }
65
+ },
66
+ "golden_checklist": [
67
+ "One clear example per determination in your process — the ordinary, unambiguous item for each outcome.",
68
+ "One clean example and one clear-violation example per rule you review against, so the guide learns each rule's boundary.",
69
+ "The two or three rules your team most often argues over, side by side, so the guide learns your house reading.",
70
+ "A borderline item that could plausibly go either way — the golden shows needs_human set rather than a confident call.",
71
+ "An item that implicates more than one rule at once — the golden records every rule that applies, not just the first.",
72
+ "An edge case: an empty, off-topic, or unintelligible item — the golden shows it flagged for a human rather than force-decided.",
73
+ "Aim for roughly twenty goldens total, weighted toward the borderline and multi-rule items rather than the clear-cut centre."
74
+ ],
75
+ "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."
76
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "use_case": "cs-next-action",
3
+ "title": "Customer-success next action",
4
+ "summary": "Recommend the next action a CS team should take on an account, grounded in the account's own signals, and hand off the ones that need a human.",
5
+ "fit_note": "CS next-action fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) Your accounts and playbooks are stable enough that a recommendation that made sense last quarter still makes sense this quarter. (2) Your CS team can write down what a good next action is for a given account state, which is the grading guide below. (3) An experienced CSM can grade a batch of past recommendations against what actually happened or what they would have done. (4) You manage enough accounts that calibration and optimization pay back. This template gives you an action taxonomy shell and a grading guide to fill in. It makes no claim that a model should decide account strategy — it is a starting point for turning your playbook into a graded, improvable route, with a human on the accounts that matter.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$comment": "STARTER SCHEMA. Replace every TODO with your own playbook before use. Enum slots ship without values on purpose — add the actions and urgency levels your CS team actually uses.",
9
+ "title": "CsNextAction",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["recommended_action", "urgency", "needs_human"],
13
+ "properties": {
14
+ "recommended_action": {
15
+ "type": "string",
16
+ "description": "The single next action to take on this account. TODO(enum): add an \"enum\": [ ... ] listing YOUR playbook actions (e.g. the plays your team already runs), so the model chooses from your set rather than inventing one.",
17
+ "$comment": "TODO(enum): add your playbook actions as the enum for this field."
18
+ },
19
+ "urgency": {
20
+ "type": "string",
21
+ "description": "How soon the action should happen. TODO(enum): add an \"enum\": [ ... ] with YOUR urgency levels.",
22
+ "$comment": "TODO(enum): add your urgency levels as the enum for this field."
23
+ },
24
+ "rationale": {
25
+ "type": "string",
26
+ "description": "One or two sentences naming the account signals that motivate the action (usage trend, support load, renewal date, sentiment). The grader checks that the rationale is grounded in real signals."
27
+ },
28
+ "needs_human": {
29
+ "type": "boolean",
30
+ "description": "True when the account is high-stakes or the signals are ambiguous and a CSM should decide. Pairs with the escalation band in the grading guide."
31
+ }
32
+ }
33
+ },
34
+ "starter_guide": {
35
+ "criteria": [
36
+ {
37
+ "id": "action-fits-signals",
38
+ "title": "Action fits the account's signals",
39
+ "pass": "the recommended action is the one your playbook calls for given the account's stage and signals.",
40
+ "fail": "The action does not match the account state — a renewal push at onboarding, a nurture play on an account that is actively churning."
41
+ },
42
+ {
43
+ "id": "grounded-rationale",
44
+ "title": "Rationale cites real signals",
45
+ "pass": "The rationale names specific signals present in the account data rather than generic advice that would fit any account.",
46
+ "fail": "The rationale is boilerplate, or cites a signal the account data does not contain."
47
+ },
48
+ {
49
+ "id": "stays-in-remit",
50
+ "title": "Recommendation stays within CS remit",
51
+ "pass": "the action is something CS can actually do; it does not commit pricing, contract terms, or promises outside the team's authority.",
52
+ "fail": "The action oversteps — promising a discount, a roadmap commitment, or anything that needs another team's sign-off."
53
+ },
54
+ {
55
+ "id": "safe-default-when-unsure",
56
+ "title": "Ambiguous accounts get a safe default or a human",
57
+ "pass": "when the signals are thin or conflicting, the recommendation is a low-risk action or needs_human, not a confident high-stakes move.",
58
+ "fail": "A high-stakes action is recommended on an account whose signals do not support it."
59
+ }
60
+ ],
61
+ "teach_grade_ids": [],
62
+ "escalation": {
63
+ "epsilon": 0.1
64
+ }
65
+ },
66
+ "golden_checklist": [
67
+ "One clear example per action in your playbook — the account state where that action is plainly right.",
68
+ "The two or three account states your team most often disagrees on, so the guide learns your house rules.",
69
+ "A high-value or at-risk account where the safe move is to hand off to a human — the golden shows needs_human set.",
70
+ "A brand-new account with almost no signal yet — the golden shows a low-risk default rather than a confident play.",
71
+ "An account whose signals point two ways (growing usage but falling sentiment) — the golden fixes which signal wins.",
72
+ "A case where a tempting action would overstep CS remit — the golden shows it declined in favour of an in-remit action.",
73
+ "Aim for roughly twenty goldens total, weighted toward the ambiguous and high-stakes accounts rather than the easy ones."
74
+ ],
75
+ "escalation_starter": "Start by escalating to a human whenever the model sets needs_human, and always for your highest-value or clearly at-risk accounts regardless of the recommended action. 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 routed to a CSM. The 0.1 here is a starting band — keep it wide until an experienced CSM has graded enough recommendations to trust the grader, then narrow it."
76
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "use_case": "document-extraction",
3
+ "title": "Document extraction",
4
+ "summary": "Pull the fields you care about out of a document (an invoice, a form, a contract clause) into a structured object your code can use.",
5
+ "fit_note": "Document extraction fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) The documents you extract from are stable in kind — the same layouts and field set recur, so past examples still describe new ones. (2) Someone can write down what a correct extraction is field by field, which is the grading guide below. (3) You have corrected extractions on hand — records where a person already fixed the fields — so a grader can be calibrated against ground truth. (4) You process enough documents that calibration and optimization pay back. This template gives you a schema shell and a grading guide to fill in; it does not assume your fields, and it makes no claim about how well any model extracts them — that is what your goldens and grades measure.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$comment": "STARTER SCHEMA. The fields below are placeholders. Replace them with the fields YOU extract, delete the ones you do not need, and mark each field required or optional to match your documents.",
9
+ "title": "DocumentExtraction",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": [],
13
+ "properties": {
14
+ "document_type": {
15
+ "type": "string",
16
+ "description": "What kind of document this is. TODO(enum): add an \"enum\": [ ... ] listing the document types you handle, so the model cannot invent a type.",
17
+ "$comment": "TODO(enum): add your document types as the enum for this field."
18
+ },
19
+ "fields": {
20
+ "type": "object",
21
+ "description": "The extracted values. TODO: replace this placeholder with one named property per field you extract (e.g. invoice_number, total_amount, issue_date), each with its own type and description. Keep additionalProperties false once you have listed them so nothing extra is invented.",
22
+ "additionalProperties": true,
23
+ "$comment": "TODO(fields): replace with your real field set; add a required list once you know which fields must always be present."
24
+ },
25
+ "missing_fields": {
26
+ "type": "array",
27
+ "items": { "type": "string" },
28
+ "description": "Names of fields you asked for that were genuinely absent from the document. Lets the model say \"not present\" explicitly instead of guessing a value."
29
+ },
30
+ "needs_human": {
31
+ "type": "boolean",
32
+ "description": "True when the document is too unclear to extract confidently and a person should review. Pairs with the escalation band in the grading guide."
33
+ }
34
+ }
35
+ },
36
+ "starter_guide": {
37
+ "criteria": [
38
+ {
39
+ "id": "values-match-source",
40
+ "title": "Extracted values match the document",
41
+ "pass": "every extracted value is exactly what the document says, in the format you asked for.",
42
+ "fail": "A value differs from the document — a wrong number, a transcription slip, a mis-parsed date."
43
+ },
44
+ {
45
+ "id": "no-fabrication",
46
+ "title": "Absent fields are marked, never invented",
47
+ "pass": "A field that is not in the document is reported as missing rather than filled with a plausible-looking value.",
48
+ "fail": "The output supplies a value for a field the document does not actually contain."
49
+ },
50
+ {
51
+ "id": "completeness",
52
+ "title": "Present fields are all captured",
53
+ "pass": "every field that IS in the document and IS in your schema is extracted; none is silently dropped.",
54
+ "fail": "A field that is clearly present in the document is left out of the output."
55
+ },
56
+ {
57
+ "id": "human-flag-when-illegible",
58
+ "title": "Unreadable documents are flagged for a human",
59
+ "pass": "A document that is illegible, truncated, or the wrong kind sets needs_human rather than returning a confident-looking but unreliable extraction.",
60
+ "fail": "An unreadable or off-type document is extracted as if it were clean."
61
+ }
62
+ ],
63
+ "teach_grade_ids": [],
64
+ "escalation": {
65
+ "epsilon": 0.1
66
+ }
67
+ },
68
+ "golden_checklist": [
69
+ "One clean example per document type in your set — the ordinary, fully-legible case for each layout.",
70
+ "A document that is missing one or more of your fields — the golden shows those fields reported as missing, not invented.",
71
+ "A document with a field in an unusual but valid format (a date written differently, a total with a currency symbol) so the guide learns your normalization rules.",
72
+ "A multi-page or multi-section document where the field you want appears late or twice — the golden fixes which occurrence is correct.",
73
+ "An ambiguous or partially-legible document — the golden shows it flagged for a human rather than guessed.",
74
+ "An off-type document (something that is not one of your document types at all) — the golden shows it rejected or flagged, not force-extracted.",
75
+ "Aim for roughly twenty goldens total, weighted toward missing fields, odd formats, and illegible cases rather than the clean centre."
76
+ ],
77
+ "escalation_starter": "Start by escalating to a human whenever the model sets needs_human, and whenever a required field comes back missing on a document that should contain it. 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 human queue. The 0.1 here is a starting band — widen it early, narrow it as your grader calibrates against your corrected extractions."
78
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "use_case": "financial-classification",
3
+ "title": "Financial classification",
4
+ "summary": "Classify a financial record — a transaction, a document, a case — into your own categories and risk flags, and hand off the ones a person must review.",
5
+ "fit_note": "Financial classification fits the shipped teach → calibrate → grade → optimize loop when four conditions hold. (1) Your categories and the records you classify are stable enough that last quarter's examples still describe this quarter's — if the taxonomy is still moving, settle it before you calibrate. (2) Someone who owns the process can write down what a correct classification is, which is the grading guide below. (3) A reviewer who knows the domain can grade a batch of past records against the calls they would have made, so a grader can be calibrated against them. (4) You process enough records that calibration and optimization pay back. Financial records are regulated data, so the custody terms come first — quoted verbatim from the published content custody terms: \"Do not send protected health information or other regulated data through ModelRig until a BAA or DPA is in place. This service is not offered for regulated data today, and nothing on this page should be read as agreeing to handle it.\" Until those terms are in place, the today-path is to run this on a zero-retention route (or with content custody turned off), so ModelRig holds no content and grading is limited to the scores and metadata your own systems send. The full terms are at https://modelrig.ai/terms/content-custody. This template gives you a classification shell and a grading guide to fill in; it makes no claim about how well any model classifies your records — that is what your goldens and grades measure — and it makes no compliance claim of any other kind.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$comment": "STARTER SCHEMA. Replace every TODO with your own taxonomy 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 categories; do not copy example words from the docs.",
9
+ "title": "FinancialClassification",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["classification", "needs_human"],
13
+ "properties": {
14
+ "classification": {
15
+ "type": "string",
16
+ "description": "The category this financial record belongs in. TODO(enum): constrain this to YOUR own category 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 taxonomy.",
17
+ "$comment": "TODO(enum): add your financial categories as the enum for this field."
18
+ },
19
+ "risk_flag": {
20
+ "type": "boolean",
21
+ "description": "True when the record carries a risk your process wants surfaced (a review trigger, an exception, a regulatory-sensitive case). Optional; delete it if you do not track a risk flag."
22
+ },
23
+ "needs_human": {
24
+ "type": "boolean",
25
+ "description": "True when the record is ambiguous or regulatory-sensitive and a person must decide. Pairs with the escalation band in the grading guide."
26
+ },
27
+ "rationale": {
28
+ "type": "string",
29
+ "description": "One or two sentences grounding the classification in what the record actually contains. Optional; keep it if you want the grader to check the decision is explained."
30
+ }
31
+ }
32
+ },
33
+ "starter_guide": {
34
+ "criteria": [
35
+ {
36
+ "id": "classification-correct",
37
+ "title": "Classification is correct",
38
+ "pass": "the record gets the category a reviewer on your team would have chosen for it, by your own rules.",
39
+ "fail": "The record is classified into a category that does not match what it actually is, or into a catch-all when a specific category fits."
40
+ },
41
+ {
42
+ "id": "grounded-no-invention",
43
+ "title": "Decision is grounded in the record",
44
+ "pass": "every part of the classification is supported by something the record actually contains; nothing is invented.",
45
+ "fail": "The output asserts an amount, a party, or a status that the record does not contain."
46
+ },
47
+ {
48
+ "id": "risk-consistent-with-rules",
49
+ "title": "Risk flag follows your rules",
50
+ "pass": "the risk flag is set when your own criteria call for it and clear when they do not.",
51
+ "fail": "A record your rules would flag is left unflagged, or a routine record is flagged for a risk it does not carry."
52
+ },
53
+ {
54
+ "id": "human-flag-when-unsure",
55
+ "title": "Ambiguous or sensitive records are flagged for a human",
56
+ "pass": "a record that is genuinely ambiguous or regulatory-sensitive sets needs_human rather than being auto-classified.",
57
+ "fail": "A record a reviewer would have hesitated on is classified automatically with false confidence."
58
+ }
59
+ ],
60
+ "teach_grade_ids": [],
61
+ "escalation": {
62
+ "epsilon": 0.1
63
+ }
64
+ },
65
+ "golden_checklist": [
66
+ "One clear example per category in your taxonomy — the ordinary, unambiguous record for each category.",
67
+ "The two or three categories your team most often confuses, side by side, so the guide learns the boundary between them.",
68
+ "A record that sits on the edge of a risk rule — the golden fixes whether it is flagged and why.",
69
+ "A regulatory-sensitive record that should reach a person regardless of category — the golden shows needs_human set.",
70
+ "An incomplete or malformed record — the golden shows it flagged for a human rather than force-classified.",
71
+ "A routine, low-risk record — so the guide learns the ordinary pass, not only the exceptions.",
72
+ "Aim for roughly twenty goldens total, weighted toward the edge-of-rule and sensitive records rather than the routine centre."
73
+ ],
74
+ "escalation_starter": "Start by escalating to a person whenever the model sets needs_human, and always for regulatory-sensitive or high-risk records regardless of the classification. 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 review queue. The 0.1 here is a starting band — keep it wide until a reviewer has graded enough records to trust the grader, then narrow it."
75
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "use_case": "lead-qualification",
3
+ "title": "Lead qualification",
4
+ "summary": "Sort an inbound lead into your own qualification stages and a routing segment, and flag the ones a person should work by hand.",
5
+ "fit_note": "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.",
6
+ "starter_schema": {
7
+ "$schema": "http://json-schema.org/draft-07/schema#",
8
+ "$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.",
9
+ "title": "LeadQualification",
10
+ "type": "object",
11
+ "additionalProperties": false,
12
+ "required": ["qualification", "needs_human"],
13
+ "properties": {
14
+ "qualification": {
15
+ "type": "string",
16
+ "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.",
17
+ "$comment": "TODO(enum): add your qualification stages as the enum for this field."
18
+ },
19
+ "segment": {
20
+ "type": "string",
21
+ "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.",
22
+ "$comment": "TODO(enum): add your routing segments as the enum for this field."
23
+ },
24
+ "needs_human": {
25
+ "type": "boolean",
26
+ "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."
27
+ },
28
+ "rationale": {
29
+ "type": "string",
30
+ "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."
31
+ }
32
+ }
33
+ },
34
+ "starter_guide": {
35
+ "criteria": [
36
+ {
37
+ "id": "qualification-correct",
38
+ "title": "Qualification stage is correct",
39
+ "pass": "the lead is put in the stage a rep on your team would have chosen for it, by your own qualification rules.",
40
+ "fail": "The lead is qualified higher or lower than its signals warrant — a cold lead marked sales-ready, or a strong fit left unqualified."
41
+ },
42
+ {
43
+ "id": "grounded-no-invention",
44
+ "title": "Decision is grounded in the lead",
45
+ "pass": "every part of the decision is supported by something the lead record actually contains; nothing is invented.",
46
+ "fail": "The output asserts a firmographic, an intent signal, or a budget that the lead record does not contain."
47
+ },
48
+ {
49
+ "id": "segment-fits-routing",
50
+ "title": "Segment matches your routing rules",
51
+ "pass": "the routing segment is the one your rules assign to this lead's region, size, or product interest.",
52
+ "fail": "The lead is routed to a segment its own attributes do not match, or to a catch-all when a specific segment applies."
53
+ },
54
+ {
55
+ "id": "human-flag-when-unsure",
56
+ "title": "Ambiguous or high-value leads are flagged for a human",
57
+ "pass": "a lead that is genuinely ambiguous, thin on signal, or unusually high-value sets needs_human rather than being auto-qualified.",
58
+ "fail": "A lead a rep would have hesitated on is qualified with false confidence."
59
+ }
60
+ ],
61
+ "teach_grade_ids": [],
62
+ "escalation": {
63
+ "epsilon": 0.1
64
+ }
65
+ },
66
+ "golden_checklist": [
67
+ "One clear example per qualification stage in your funnel — the ordinary, unambiguous lead for each stage.",
68
+ "The two or three stages your team most often disagrees on, side by side, so the guide learns the boundary between them.",
69
+ "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.",
70
+ "A high-value or strategic lead where the safe move is to hand off to a rep — the golden shows needs_human set.",
71
+ "A thin lead with almost no signal yet — the golden shows a conservative stage rather than a confident qualification.",
72
+ "An edge case: an empty, spam, or clearly mis-submitted lead — the golden shows it flagged for a human rather than force-qualified.",
73
+ "Aim for roughly twenty goldens total, weighted toward the ambiguous and high-value leads rather than the easy centre of each stage."
74
+ ],
75
+ "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."
76
+ }