Practical · text-classification · WASM q8 · 302.8 MB

RAG & webhook chunk quarantine queue

Agents get hijacked through what they read. Before retrieved chunks, webhook events or wiki pages enter an LLM context window, run every chunk through the guard, quarantine the ones that carry instructions for the AI, and keep an OWASP LLM01 audit trail — all on this device.

1. Load a batch of chunks

Drop a .json (array or { chunks: [...] }), .md or .txt export (≤ 256 KB), or choose one.

0.50
Queue stateIdle
Screened–
Blocked (quarantine)–
Allowed–
Mean latency–
NaN check–

2. Allow / block decisions

Each chunk's max INJECTION probability (whole chunk vs every sentence) against τ
Chunk Excerpt P(inj) Flagged sentence Decision ms
Load a batch, then screen it.

Exports neutralise spreadsheet formula injection (cells starting with = + - @ are prefixed with '), store a SHA-256 of each chunk instead of its full text, and tag every row LLM01:2025 Prompt Injection.

3. Inspect the queue & audit code

Show the code · guard-core.mjs — parseDocuments() JSON / Markdown / text chunker
Show the code · guard-core.mjs — decisions + OWASP-safe CSV/JSON audit