Researchers propose KFS-RAG, a defense mechanism for Retrieval-Augmented Generation systems that mitigates information leakage caused by prompt injection attacks. The method uses attention rollout and causal perturbation to identify influential keywords within retrieved context, which then guide an auxiliary LLM to generate compact, keyword-grounded facts. By reformulating the retrieved context into these sanitized facts, the system prevents sensitive database contents from being exposed to the generator.
- KFS-RAG defends RAG against prompt injections that target the retriever or generator.
- Uses attention rollout and causal perturbation to pinpoint critical context keywords.
- An auxiliary LLM converts raw passages into compact, keyword-grounded facts.
- Reformulated context reduces risk of sensitive data leakage in production RAG.