﻿# RAG-PIBench: what the protected detector test establishes

RAG-PIBench compares injection detectors on a frozen holdout. Read its DistilBERT result alongside false alarms, sparse baselines and the untested downstream application.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/rag-pibench-protected-test-detector-error-boundaries/
Language: en

RAG-PIBench is useful for a specific question: can a detector distinguish a hostile instruction embedded in retrieved text from legitimate contextual material? The [paper announcement](https://arxiv.org/abs/2610.08571), first submitted on 6 October 2026, reports a controlled comparison. Its main contribution is the evaluation boundary as much as the winning model. Treating the result as a certificate for a complete RAG service would extend the experiment beyond its design.

## A protected split has a defined role

The authors describe 4876 English contextual examples, split into 2936 training, 962 validation and 978 protected-test items. Each split is balanced between benign and malicious content. Instruction-like wording can appear in both classes: a quoted procedure is not malicious merely because it uses imperative verbs.

Development uses training and validation data. After protected-test exposure, the protocol prohibits checkpoint reselection, threshold changes and additional training. Separate diagnostics remain outside model ranking. This addresses a different leakage path from the document-family overlap discussed in [synthetic RAG holdouts](/journal/rag-synthetic-testset-leakage-controls/): a clean split can still become development data through repeated decisions made against its scores.

## Read the winning score with its errors

The [full result table](https://arxiv.org/html/2610.08571v1) gives DistilBERT an F1 of 0.896 and PR-AUC of 0.968. Its selected operating point produces 35 false positives and 64 false negatives. Those are legitimate contexts blocked and malicious contexts missed in this test, respectively.

The strongest sparse baseline, TF-IDF SVM, reaches F1 0.871. The relatively small gap is a reason to retain a credible lightweight comparison. It does not establish equal latency or operating cost: classification quality and implementation efficiency need separate measurements. A deployment decision would need to time the actual tokenizer, batching and service path on the intended hardware.

## High recall can coexist with unusable blocking

DeBERTa-v3 labels every protected-test example malicious under the tested configuration. The authors explicitly limit that failure to their configuration rather than condemning the architecture. This is an instructive counterexample to selecting a detector from recall alone: rejecting all retrieved material also prevents useful retrieval.

An application evaluation should therefore preserve both error types and inspect benign instructions that are unusually difficult to classify. A maintenance manual, a quoted attack example and a malicious override can share vocabulary while having different roles. A useful error review records that role instead of silently removing awkward examples from the denominator.

## Classification is one component of protection

The experiment does not test downstream generation, tool misuse, exfiltration or mitigation after detection. It also does not establish equivalent results for Russian documents or a new organization’s corpus. A detector can flag an attack that the generator would ignore; a missed example may or may not succeed against that generator. These outcomes require an application-level test with an explicit success criterion.

A proposed follow-up would freeze the retrieval corpus, detector threshold, generation instructions and permitted actions, then evaluate both legitimate task completion and attack outcomes. Keep this extension distinct from the published benchmark. The same reporting discipline used in an [inference benchmark](/journal/inference-benchmark-method/) applies: preserve versions, inputs, failures and the precise boundary of the conclusion. RAG-PIBench supplies evidence about its detector comparison, while application security remains a separate empirical question.
