The article demonstrates that standard RAG prompt-level guardrails—lexical filters, guardrail LLMs, context demarcation, and grounding checks—fail against passive data poisoning attacks, exhibiting 88–94% bypass rates because these defenses assume attacks contain malicious instructions rather than falsified facts. To measure this, the author built a reproducible evaluation harness using a local bling-phi-3.5-gguf model via llmware, testing benign queries, direct/indirect prompt injections, HotFlip-style white-box attacks, and corpus tampering against signed documents; embedding norms were artificially inflated to simulate adversarial optimization. Two retrieval-layer defenses proved effective when combined. Norm clipping rescales document embedding vectors exceeding a threshold (α=1.75) using `vector * (α / norm)`, neutralizing high-norm adversarial triggers and achieving a 27.8% block rate alone. The Signed Instruction Protocol pre-signs trusted corpus documents with HMAC-SHA256 using a secret key, verifying signatures at retrieval time; unsigned documents are rejected, yielding a 50% block rate but increasing latency to ~19 seconds. Chaining both defenses—norm clipping at the vector-retrieval layer and signature verification at prompt assembly—achieved a 0% bypass rate with zero false positives across the full test suite, albeit at 33.2 seconds average latency. The author concludes that poisoning defenses must operate at the retrieval layer, not the prompt layer, and that combining geometric anomaly detection with cryptographic provenance verification closes complementary blind spots.

Read original