Codú
‹ Back to feed

// Hacker Noon · 14 May 2026

Mean Pooling Was Hiding Prompt Injections in Our RAG Pipeline

RAG detectors fail because mean pooling averages out malicious signals in long documents. While a short attack gets diluted, the encoder’s raw hidden states capture the threat. By switching to sliding a small window over states and taking the max score you preserve the signal without extra models. I...

Hacker Noon
@hacker-noon · Lokesh M
hackernoon.com
Read Full Article at hackernoon.com
Hacker Noon@hacker-noon

Discussion 0

Loading

Got something to say?

or to join the conversation.

Learn to build with AI and grow with people doing the same — it's free.