Validate Classification Output
Label in the set? Case exact? Confidence in range? The checks that keep classification output usable for routing.
Overview
Classification output fails subtly: the label is right but lowercase, the confidence is a number when you expected a level — or it's 120 on a 0–100 scale. This setup validates a CRM stage classification with two such violations: "demo" instead of the defined "Demo" (case mismatch — a warning that breaks exact-match routers), and a confidence of 120 (out of range — a fail that poisons thresholds). Both get specific repairs: return the label exactly as defined; report confidence between 0 and 100.
Workflow
-
Paste the allowed labels exactly
Case matters: the validator flags "demo" vs "Demo" because your router will too.
-
Check confidence semantics
Numbers get range-checked 0–100; strings must be high/medium/low — whichever contract you set.
-
Repair before routing
A repaired label is cheaper than a misrouted ticket — validate at the gate, not after the incident.
Why This Works
- Exact-case checking matches how downstream code actually compares strings
- Range validation catches the out-of-scale confidences models love to produce
- Gate-side validation converts silent misroutes into visible repairs
Best for
- Routing flows keyed on exact label strings
- Pipelines thresholding on confidence values
- Auditing classification quality across model changes
Not for
- Defining the label set and its definitions — that's the Data Classification Prompt
- Judging whether the label was the RIGHT call — that needs a human, not a validator
Use cases
- Verifying labels before they route tickets or leads
- Catching case drift that breaks exact-match automations
- Range-checking confidence scores before thresholding