Small-Rule Guardrails for Retrieval-Augmented Generation: Prompt Injection and Vector Poisoning Checks
Authors/Creators
Description
Retrieval-augmented generation systems often treat retrieved text as helpful evidence, but retrieved text can also contain adversarial instructions, suspicious link patterns, oversized chunks, or secret-exfiltration requests. This paper presents a small-rule guardrail approach implemented through two zero-dependency JavaScript packages: prompt-injection-shield and vector-poison-score. The method is deliberately lightweight. It scans retrieved documents and tool outputs before they are inserted into model context, reports explicit risk reasons, and supports filtering or line stripping as a simple containment step. The contribution is not a replacement for full security review or large-scale benchmark evaluation. Instead, it offers an inspectable baseline that developers can place between retrieval and prompt construction while building, testing, and auditing agentic RAG workflows.
Files
rag-guardrails-figshare-package.zip
Files
(18.2 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:bb54b7e7838aae23b23493721a4a390b
|
11.0 kB | Preview Download |
|
md5:ec4f215620bb9530e06d90a9b47e79d9
|
7.2 kB | Preview Download |
Additional details
Related works
- Is identical to
- Preprint: 10.5281/zenodo.20057056 (DOI)
- Preprint: 10.6084/m9.figshare.32193543 (DOI)