Synthetic fixtures computed locally. No model, database or production service is contacted.
Experiment workspace
Decision trace
The question this experiment answers
Geetha's team at Belgavi's Book Store wants to put a prompt injection guard in front of the model that reviews publisher contracts. A guard scores chunks, but the decision is per document. How does the false positive rate on whole documents follow from chunk size, threshold, document length and the aggregation rule, how much of the apparent detection comes from the payload itself, and what does a second stage change? Every document and score here is synthetic.
Change one assumption at a time
Start from a preset and change one control. In noisy_guard_512_any raise the chunk size to 2048 and document false positives fall while the payload chunk score is diluted further. Raise the threshold to 0.9 or require 2 chunks and both false positives and real detection collapse. Set Second stage to Yes and false positives nearly vanish while recall drops a little. In quiet_guard set dilution to 0 and every payload chunk fires. Shorter documents lower the document rate with no change to the guard.
Expected outcomes
noisy_guard_512_any: 7.93 percent of benign chunks fire and 65.67 percent of benign documents are flagged; 60 percent of injected documents are flagged but the payload chunk fired in only 3.33 percent, so 34 of 36 were flagged by benign text. noisy_guard_2048_any: 28 percent of documents, recall 21.67 percent. noisy_guard_threshold_090: 16.67 percent of documents. noisy_guard_two_chunks: 28.67 percent. noisy_guard_second_stage: 233 second-stage calls, final false positives 0.33 percent, final recall 56.67 percent. short_documents: 18.33 percent. quiet_guard: 14.33 percent with no payload chunk firing. quiet_guard_no_dilution: every payload chunk fires.
Read the table and the trace
The metrics show the mean chunks per benign document, the chunk false positive rate, the independence estimate 1 - (1 - p) to the power n, the document false positive rate and recall before and after the second stage, how often the payload chunk itself fired, how many injected documents were flagged only by benign chunks, and second-stage calls. The table and the trace show the first six benign and first six injected documents with their chunk counts, highest score and the reason for each decision.
Reset and export
Reset inputs restores the selected preset and recomputes. Export JSON downloads the inputs, a row for every document, the metrics, the trace and the stated limits.
Limits
Synthetic documents and scores from a seeded generator, with independent benign chunk scores, a fixed 60-token payload and a simple dilution curve. Not a real guard, corpus or payload. The shape of the effect follows arXiv 2611.08834 (6 November 2026); the numbers are not the paper's. The second stage is a fixed-rate stand-in, not a model.