Multi-model Β· BERT-Small PII (28.75 MB q8 Β· Apache-2.0) β†’ Snowflake Arctic Embed XS (22.97 MB q8 Β· Apache-2.0)

51.7 MB PII-Scrubbed Semantic Search & Ticket Router

Chain two ultra-light WASM models totaling 51.72 MB: Stage 1 (onnx-community/bert-small-pii-detection-ONNX, 28.75 MB) scrubs every PII span from incoming support tickets first and runs a live zero-PII leak audit; Stage 2 (Snowflake/snowflake-arctic-embed-xs, 22.97 MB, reusing ../snowflake-arctic-embed-xs/worker.js) embeds and searches only the sanitized payloads.

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

Stage 1 Β· BERT-Small 49-Label PII (28.75 MB WASM q8 Β· Apache-2.0)

Stage 2 Β· Snowflake Arctic Embed XS (22.97 MB WASM q8 Β· Apache-2.0)

2. Ticket Corpus, Firewall Handoff & Semantic Search

Prepare both stages above to run the 51.7 MB PII-scrubbed semantic search pipeline.

Stage 1 PII scrubbed–
Zero-PII handoff–
Top semantic match–
Top cosine similarity–
Stage 1 / Stage 2 ms–

3. Sanitized Handoff Verification & Ranked Results

Zero-PII Stage Boundary Audit

Run Stage 1 to verify zero original PII spans leak into the Stage 2 embedding payload.

Ranked sanitized tickets with Stage 1 scrubbed counts, leak verification, and Stage 2 cosine similarity
Rank Cosine Sim Redacted Leak Check Sanitized Ticket Sent to Stage 2
Run the 2-stage pipeline above to scrub and rank tickets.

4. Inspect Shared Worker Client & Zero-PII Leak Check

Show the code Β· bert-pii.js β€” ArcticEmbedClient (reusing ../snowflake-arctic-embed-xs/worker.js)
Show the code Β· bert-pii-core.mjs β€” verifyZeroPiiHandoff() (honest Stage 1 β†’ Stage 2 audit)