What this recipe does
Front-desk staff don't have time to wait on a cloud round-trip when a patient hands them a 6-page intake. This recipe compiles a small classifier into a single signed .kolm that runs on the tablet locally. Output is one of three urgency bands plus a 2–3 sentence rationale that cites specific fields from the intake form. The grounded verifier rejects any rationale that references a finding not in the input.
The training corpus is pairs of (intake form, attending's actual triage decision) drawn from the clinic's last 12 months. Held-out is a separate cohort the model never sees. PHI is stripped before training using the same regex bundle as hipaa-summarizer.
The spec
{
"output_kind": "json",
"schema": {
"required": ["band", "rationale", "cited_fields"],
"properties": {
"band": { "enum": ["urgent", "routine", "deferred"] },
"rationale": { "type": "string", "maxLength": 400 },
"cited_fields": { "type": "array", "items": {"type":"string"}, "minItems": 1 }
}
},
"verifier": {
"rationale_must_cite_input_fields": true,
"redact_before_train": true,
"redact_pattern_file": "hipaa-18.regex"
}
}
Compile
kolm compile "front-desk intake triage classifier with grounded rationale" \ --base qwen2.5-7b-instruct \ --pairs ./triage-gold/*.jsonl \ --verifier rationale-grounded,no-phi-in-output \ --k-floor 0.80 \ --output intake-triage.kolm ok wrote intake-triage.kolm k_score=0.82 signature=hmac-sha256 band-accuracy 0.86 · rationale-grounded 100%
K-score gate
Attending agreement: a panel of 3 attendings re-triaged 80 held-out forms. The model agreed with majority on 84% of cases, dissented on 16%, and was never the only one to flag urgent.
Run-time profile
Deploy
# Front-desk tablet — runs against intake form submissions: on_intake_submit = (form) => { const out = kolm.run('intake-triage.kolm', form.json); ehr.flag(form.id, out.band, { rationale: out.rationale, cited: out.cited_fields }); audit.log({ artifact: 'intake-triage.kolm', form_id: form.id, k_score: out.receipt.k_score }); };