Basics · Inside Intel/polite-guard · 110.30 MB WASM q8 · Apache-2.0

Inside Polite Guard — Word & Clause Sensitivity Ablation

Which exact words flip a message from impolite to polite? This page performs live leave-one-phrase-out ablation inside the worker — removing one courtesy marker or hostility trigger at a time ("please", "could you", "useless", "right now") — and probes class probability calibration across 8 graded phrasings of the exact same engineering request.

1. Live Leave-One-Phrase-Out Sensitivity Ablation

Pick a test sentence or type your own, then run live phrase ablation (every row below is a real BERT-base q8 forward pass):

Baseline class–
Baseline index–
Phrases ablated–
Top polite driver–
Top impolite driver–
Batch latency–
Leave-one-phrase-out sensitivity ablation ranking phrases by Politeness Index shift
Removed Phrase Index Contribution Δ P(polite) Δ P(impolite) Without Phrase → Tier Effect
Initialize Intel Polite Guard above to run leave-one-phrase-out ablation.

2. 8-Step Graded Phrasing Calibration Ladder

All eight prompts below ask for the exact same thing (fixing a 500 error on /v2/orders) across eight escalating politeness registers — from hostile demand to gracious appreciation — scored live in a single WASM batch.

8-rung calibration ladder showing live 4-class probabilities and Politeness Index for graded phrasings
Rung Phrasing Predicted Tier Index 4-Class Probability Spectrum
Calibration ladder runs automatically once the model initializes (or press Run 8-Rung Calibration Ladder).

3. Inspect Ablation & Batch Inference Code

Show the code · polite-core.mjs — buildAblationCandidates() (phrase grouping & perturbation)
Show the code · polite-core.mjs — computeAblationImpacts() (signed Politeness Index deltas)
Show the code · worker.js — classifyBatch() (epoch-guarded batch scoring)