The layers
- L1 — Lexical + adversarial. Always runs. Keyword + regex scoring + injection detection. Cheap; can short-circuit when one intent dominates.
- L2 — Embedding similarity. Cosine similarity against per-intent centroids built from the card’s reference prompts.
- L3 — Contrastive scoring. Ranks survivors by discriminative margin against the negative set.
- L4 — LLM judgment with reasoning. Adjudicates ambiguous cases; produces structured supporting / disqualifying evidence + alternatives_considered.
- L5 — Per-org fine-tuned classifier. Ultraviolet only. Trained on your org’s classifier_corrections.
Per-tier dispatch
- Violet — L1 only.
- Deep Violet — L1 → L2 → L3 → L4.
- Ultraviolet — L1 → L2 → L3 → L4 → L5.
The evidence document
Every dispense + every intent_event row carries aclassification_evidence
JSONB blob. It captures:
- The final
intent_id+ confidence - Which layers were consulted
- Supporting / disqualifying evidence (human-readable strings)
- Alternatives considered
- Cost + latency rolled across all layers
- Adversarial verdict from L1
Confidence thresholds
Each intent card carries aclassification block with match_threshold +
ambiguous_floor. Confidence above match_threshold accepts directly; between
the two it routes through approval (when route_ambiguous_to_approval is true);
below the floor it denies.
Corrections feed
Reviewers can correct any classification straight from the Decision Feed. Corrections stream intoclassifier_corrections. Once an Ultraviolet org
crosses 250 unique-prompt corrections (or 100 + 30 days since the last
fine-tune), the nightly fine-tune driver triggers a new L5 model.