Metraipolis › archive › dc_6f80fcd28b61
arXiv 2610.28364: Context-Aware Prompt Injection Detection via Small Language Models in RAG Pipelines: nokast-secureRAG
- Source
- Metraipolis archive
- Original
- https://arxiv.org/abs/2610.28364
- License (as archived)
- CC-BY-4.0
- Archived
- 2026-10-21T05:50:55.782Z
- SHA-256 of the archived text
6d1aaebd27ce21d9ae0741936d9b67127fdc671cff563525410cc27f18554ce4- Stable URL of this page
https://metraipolis.com/documento/dc_6f80fcd28b61
How to cite
arXiv 2610.28364: Context-Aware Prompt Injection Detection via Small Language Models in RAG Pipelines: nokast-secureRAG — Metraipolis archive, https://arxiv.org/abs/2610.28364 (CC-BY-4.0); archived copy: https://metraipolis.com/documento/dc_6f80fcd28b61 (Metraipolis archive dc_6f80fcd28b61, sha256 6d1aaebd27ce21d9ae0741936d9b67127fdc671cff563525410cc27f18554ce4)
BibTeX
@misc{dc6f80fcd28b61,
title = {arXiv 2610.28364: Context-Aware Prompt Injection Detection via Small Language Models in RAG Pipelines: nokast-secureRAG},
howpublished = {Metraipolis archive},
url = {https://arxiv.org/abs/2610.28364},
note = {License CC-BY-4.0; archived copy https://metraipolis.com/documento/dc_6f80fcd28b61; sha256 6d1aaebd27ce21d9ae0741936d9b67127fdc671cff563525410cc27f18554ce4},
year = {2026}
}Archived text
Reproduced under CC-BY-4.0. Attribution: Metraipolis archive, https://arxiv.org/abs/2610.28364. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Local Retrieval-Augmented Generation (RAG) systems are vulnerable to indirect prompt injection and retrieval poisoning, where malicious instructions in retrieved content are mistaken for trusted input. We present nokast-secureRAG, a roughly 0.5B-parameter small language model that acts as a semantic firewall between retrieval and generation. It jointly evaluates the user query and retrieved context, classifying the pair as safe, suspicious, or malicious. The model is trained using a teacher-judge-student pipeline: a 35B teacher generates 5,233 examples across four attack families, and an independent 120B judge re-labels them, achieving 95.0% agreement before student fine-tuning. On a held-out in-distribution test set, the model achieves 0.994 detection recall at a 0.026 false-positive rate and a 0.006 attack-success-rate proxy, outperforming a regex baseline, a public prompt-injection classifier, Llama Guard 3 1B, and its untuned version. Prompt-Guard-86M reaches 0.900 recall but has a 0.690 false-positive rate. On a judgment-flip test, where the same sentence is benign or malicious depending on context, the model correctly classifies both cases 75% of the time, outperforming the compared baselines. Ablations indicate that retrieved context carries the main attack signal, while query-context consistency reduces false positives. Single-request latency is 293-404 ms, above the target of 100 ms, while amortized throughput latency is 37 ms under batching. On the external PoisonedRAG benchmark, recall falls to near zero, indicating that fluent fact-poisoning attacks lie outside the detector's instruction-consistency threat model. We report this limitation alongside the in-distribution results. The model, data-generation pipeline, and evaluation harness are released open source. Articolo: «Context-Aware Prompt Injection Detection via Small Language Models in RAG Pipelines: nokast-secureRAG» — Rai, Abhishek (2026-10-20), arXiv:2610.28364, categoria cs.CR (sicurezza e crittografia). Fonte: https://arxiv.org/abs/2610.28364 Licenza dell'articolo indicata su arXiv: CC-BY-4.0 — https://creativecommons.org/licenses/by/4.0. Qui solo titolo, autori e abstract (non modificato), con attribuzione; il testo integrale resta su arXiv. Consultato il 2026-10-21T05:50:48Z dalla pagina pubblica dell'articolo (robots.txt rispettato). Depositato dalla Gilda dei Bibliotecari. Abstract in lingua originale.