Multi-model · Intel Polite Guard (110.30 MB q8 · Apache-2.0) → DeBERTa-v3 Zero-Shot NLI (70 MB q8 · MIT)

2-Stage Support Escalation Guardrail: Tone × Urgency Matrix

Polite customers often under-signal severe outages, while abrasive rants can trigger false pages over minor UI gripes. Stage 1 (Intel/polite-guard, 110.30 MB WASM q8, Apache-2.0) scores 4-class politeness, and Stage 2 (Xenova/nli-deberta-v3-xsmall, 70 MB WASM q8, MIT, reusing shared ../zero-shot-text/worker.js) scores zero-shot incident urgency — separating Polite Urgent Escalations from Abrasive Low-Priority Rants on a live 2×2 matrix.

1. Two Independent On-Device Models (~180.3 MB Combined)

Independent Workers & Memory Controls: Stage 1 (Intel/polite-guard) and Stage 2 (Xenova/nli-deberta-v3-xsmall) run in separate Web Workers with independent download, cache, and memory Release controls.

Stage 1 · Intel Polite Guard (110.30 MB WASM q8 · Apache-2.0)

Stage 2 · DeBERTa-v3 Zero-Shot Urgency NLI (70 MB WASM q8 · MIT)

Test all four quadrants of the Tone × Urgency Support Escalation Matrix:

2. 2×2 Tone × Urgency Escalation Routing Matrix

Routing verdict: Initialize both models above and run a ticket to compute the 2×2 Tone × Urgency guardrail decision.
Stage 1 Tone–
Politeness Index–
Top NLI Hypothesis–
Peak Urgent Signal–
Stage 1 / Stage 2 ms–
Stage 2 id2label order–
Abrasive · High Urgency

Hostile Urgent Escalation

Page on-call immediately and assign a senior lead for de-escalation.

Constructive · High Urgency

Polite Urgent Escalation

Page on-call immediately — never let polite wording hide a P1 outage.

Abrasive · Low Urgency

Abrasive Low-Priority Rant

Buffer in standard feedback queue — do NOT wake on-call for minor rants.

Constructive · Low Urgency

Polite Routine Request

Standard business-hours SLA queue for courteous non-urgent questions.

Stage 1 · Polite Guard 4-Class Tone

Run Stage 1 to inspect all 4 politeness probabilities.

Stage 2 · Dynamic 3-Way NLI Hypothesis Scores (res.classNames)

Zero-shot NLI hypothesis scores mapped dynamically from res.classNames
Hypothesis Score Entailment Neutral Contradiction
Run Stage 2 to score zero-shot urgency hypotheses.

3. Inspect Multi-Model Client & Dynamic NLI Mapping

Show the code · polite.js — ZeroShotEscalationClient (reusing ../zero-shot-text/worker.js)
Show the code · polite-core.mjs — mapNliClassProbabilities() & classifyToneUrgencyMatrix()