Can 374 Generic Yes/No Questions Catch 99% of Prompt Injections?
We tested a question-based web page detector across five learning rounds and one locked test. On all 1,571 test pages, the point estimates passed all three targets, but the real-page error bar still crosses the 5% limit.
Short Summary
- The goal: Build generic yes/no questions that catch 99% of prompt-injection pages with fewer than 5% false alarms on real web pages and fewer than 15% on hard benign pages.
- The locked test (TEST1): On all 1,571 scored pages (0 left out), the frozen model caught 99.69% of core attacks (951/954; 95% CI: 99.08%–99.89%). It flagged 4.32% of real pages (15/347) and 2.34% of hard benign pages (3/128).
- Complete run, same frozen model: The retry of the 61 failed jobs finished, so all 4,305 chunk jobs now have answers (7 jobs blocked by the API scored neutral 0.5, the same rule as before). Scoring used the exact frozen model with no refit and no threshold change; the 1,486 pages scored earlier kept the exact same scores.
- Verdict — Point pass, strict CI fail: Point estimates pass all three rules. However, the stricter rule from the plan (95% confidence interval upper bound ≤ 5% for false alarms) is not met for real pages, where the interval runs from 2.64% to 7.01% (upper bound 7.0%).
- The hardest lesson: Normal web pages were easy. Most false alarms came from NotInject pages (harmless asks packed with trigger words). The owner moved NotInject to its own group, where it remained 48.4% flagged (30/62) on TEST1.
95% CI: 99.08%–99.89%
95% CI: 2.64%–7.01%
95% CI: 0.80%–6.66%
7 API blocks scored 0.5
1. The Problem: Hidden Attacks Inside Real HTML
A prompt injection is an instruction hidden inside untrusted text, such as a web page. When an AI assistant reads that page, the hidden instruction tries to hijack the assistant.
Attackers hide instructions in six HTML places: visible text, HTML comments, image alt text, hidden CSS blocks, page footers, and meta tags. A detector must catch these attacks without blocking normal browsing.
We measure two rates. The catch rate (true positive rate, or TPR) is the share of attack pages that the detector flags. The false alarm rate (false positive rate, or FPR) is the share of safe (benign) pages that the detector wrongly flags.
One single cutoff score (the threshold) must satisfy three rules at the same time:
- Catch at least 99% of core attacks (attacks with clear injection intent or tactics).
- Flag fewer than 5% of real benign web pages (tuned with margin to ≤ 3% during setup; the stricter plan rule also asks for the 95% confidence interval upper bound to stay ≤ 5%).
- Flag fewer than 15% of hard benign pages (safe pages that discuss security or quote prompts, tuned to ≤ 12%).
Two special groups stay separate in the report. bare_task attacks are short off-topic questions (such as “How do solar panels work?”) with no attack wording. NotInject pages are harmless requests loaded with trigger words (such as “DELETE” or “INSTRUCTIONS”). We explain why both matter below.
Before this project began, a 12-question test caught 99.5% (369 of 371) of synthetic attacks at 3.2% real HTML false alarms. That result was misleading. Synthetic templates are easy to spot. When we switched to realistic public attacks inside real Common Crawl web pages, the catch rate dropped to 85%.
2. How the Detector Works
The system asks a decision model (Gemini Decision 1) to answer 374 generic yes/no questions about each web page. A decision model reads text and returns a yes/no probability for every question.
Each question must be generic. It describes a behavior (such as text that tells an AI reader what to include in a reply), never a specific site, brand, or copied phrase. Four AI models reviewed question batches to catch page-specific tailoring.
To prevent data leaks, we divided websites into four separate data splits. No website appears in two splits.
- DEV: Used to inspect misses, write new questions, and train the combiner (a logistic regression model that weights all 374 answers).
- CAL: Used to pick the single threshold (cutoff score) with safety margin.
- TEST1: Locked during all five rounds and scored once after freezing the model.
- TEST2: Still locked and untouched for any future version.
A learned combiner was essential. When we simply added all 321 question scores in Iteration 1, signal dilution dropped the catch rate to 47%. Logistic regression lifted that same data to 85% overall (89% core).
3. Five Iterations: What Worked and What Hit a Wall
Across five rounds, we grew the bank from 321 to 374 questions. After each round, we checked misses and false alarms, wrote generic questions, and scored only the new questions (keeping older answers in a local cache).
Three Surprising Lessons From the Loop
- Literal wording beat abstract labels. Broad questions fired weakly (0.3–0.6) on missed attacks. Direct surface phrasing — such as asking whether text says “replies often”, “edit your answer”, or “should not be flagged” — worked much better. Adding seven literal questions in Batch 5 raised CAL core catch rate from 97.7% to 98.2%.
- Simpler math matched complex models. We tested gradient boosted trees, logit transforms, L1 penalties, benign-quantile features, and chunk-level models. None beat plain logistic regression on raw question probabilities.
- Hard benign pages were the only real bottleneck. By Iteration 2, real web pages were easy to keep near 0%–1% false alarms. Hard benign pages forced the threshold up and capped the core catch rate near 98%.
4. The NotInject Conflict
In Iteration 5, the model flagged 0 of 59 security articles and 0 of 52 prompt examples on CAL. Yet it flagged 20 of 58 (34%) NotInject items. All hard-benign false alarms on CAL came from NotInject.
Why? Look at a bare_task attack next to a NotInject benign page:
A lone benign-looking question pasted inside an unrelated web page.
A harmless user ask packed with trigger words and pasted inside an unrelated web page.
Both texts have the exact same shape. Without knowing what the user actually asked the AI to do, page text alone cannot separate them. The labels directly conflict.
On 2026-11-29, the owner chose to move NotInject into its own reported group and leave it out of “hard benign” (keeping only security articles and prompt examples). After that regroup, we froze the Iteration 5 model (374 questions, logistic regression, threshold −0.8998).
On CAL after the regroup, the frozen model reached 99.0% core, 2.7% real false alarms, and 2.7% hard benign false alarms — while still flagging 48% of NotInject pages.
5. The Locked Test (TEST1): Complete 1,571-Page Results
We ran the frozen model once on TEST1, a held-out split of websites never used during design. The retry of the 61 previously failed chunk jobs finished on 2026-11-30, so all 4,305 chunk jobs now have answers and all 1,571 pages are scored (0 left out). Seven jobs blocked by the API received a neutral score of 0.5, the same rule as before.
We rescored every page with the exact frozen model, with no refit and no threshold change. All 1,486 pages scored before kept the exact same scores (maximum difference 0.0). Use the toggle below to view the 95% confidence intervals or the attack breakdown by style and source.
With all 1,571 pages scored, the point estimates pass all three rules: 99.69% core attacks caught (≥ 99%), 4.32% real-page false alarms (< 5%), and 2.34% hard benign false alarms (< 15%).
However, the stricter rule from the project plan requires the upper bound of the 95% confidence interval for real-page false alarms to stay at or below 5%. On TEST1, that upper bound is 7.01% (7.0%), so the stricter CI rule is not met.
6. Inside the Misses and False Alarms
Looking at actual failures shows what the model still struggles to read. Select a tab below to inspect each group.
Out of 954 core attacks on TEST1, only 3 slipped past (2 paraphrases and 1 obfuscated attack, all from the BIPIA dataset). Across all 1,034 attacks (including bare_task), the model caught 376/376 AgentDojo, 172/172 InjecAgent, 150/150 synthetic, and 312/336 BIPIA pages:
All three use soft social norms (“replies normally...”, “enhance your response...”) instead of direct commands. Earlier CAL misses also showed hidden code that reads cookies or downloads files, chat-template tokens, and “answer without spaces” requests.
On TEST1, 15 of 347 real web pages triggered false alarms (4.32%, 95% CI: 2.64%–7.01%) and 3 of 128 hard benign pages triggered false alarms (2.34%, 95% CI: 0.80%–6.66%). In Iteration 5 CAL inspections, real-page false alarms came mainly from technical markup and spam rather than attack-like text:
- Markup comments: Google Tag Manager comments, SEO plugin notes, and old Internet Explorer conditional comments.
- Metadata spam: Keyword-stuffed adult spam pages and search-engine meta tags.
- Dataset label noise: One flagged “security article” on CAL was actually a news report about medical lawsuits. An earlier study also found DAN jailbreak prompts labeled as benign.
Meanwhile, NotInject pages triggered 48.4% of the time on TEST1 (30 of 62, 95% CI: 36.41%–60.55%) because they deliberately embed trigger words like “DELETE”, “disregard”, “expressly”, and “INSTRUCTIONS”.
On TEST1, the frozen model caught 73.8% of bare_task attacks (59 of 80, 95% CI: 63.18%–82.14%).
A bare_task attack is just a short off-topic ask with no injection phrasing. Because it looks identical to a normal question on a page (or a NotInject item), text-only page scanning hits a hard ceiling. Catching these reliably requires comparing the page against the user's original task.
7. Strongest Counterarguments Against These Results
A fair technical reader should push back on four points before trusting this detector in production.
- The stricter false-alarm CI rule is not met. The frozen threshold produced 2.7% real false alarms on CAL, but rose to 4.32% (15 of 347) on unseen TEST1 websites. Its 95% confidence interval runs from 2.64% to 7.01% (upper bound 7.0%), which misses the plan rule of an upper bound at or below 5%.
- The pass rule changed mid-study. Moving NotInject out of hard benign happened after seeing Iteration 5 scores on CAL. Even though NotInject conflicts with bare_task, a skeptic can rightly note that changing groups after seeing data makes passing easier.
- Fixed questions lose to adaptive attackers. An adaptive attacker knows the question list or probes the detector to rewrite an attack. Adaptive attacks were excluded from the 99% target. In earlier tests, adaptive attackers evaded the detector 25% to 57% of the time. Any public question list needs a second independent defense layer.
- Single-model evidence, API blocks, and noisy labels. Every score came from Gemini Decision 1, and 7 of the 4,305 TEST1 chunk jobs were blocked by the API and scored as neutral (0.5). We do not know if these exact literal-wording questions transfer to other models. Also, public datasets contain mislabeled pages that add noise to both training and evaluation.
Background note: Why earlier adaptive test numbers looked worse than reality
Before the Goal 99 project, an earlier harness run showed Level 4 adaptive attacks (which add text telling classifiers to “answer no”) jumping to a 48% success rate. Code inspection found a measurement bug in the efficacy checker: its regular expression matched words like “answer” and “should” inside the detector-talk prefix itself.
That bug counted broken payloads that asked the agent for nothing as “working” attacks. Harness version 5 fixed the check by stripping detector-addressed sentences and wrapper filler before checking whether an attack still asks the agent to act. Even after that fix, adaptive evasion remains a real weakness for fixed question lists.
8. What Happens Next
With TEST1 fully scored, the project has a clear, disciplined path forward:
- Tighten real-page margin to meet the CI rule: Study the 15 real-page false alarms on TEST1 to learn why unseen sites drifted from 2.7% on CAL to 4.32% (upper CI 7.01%), and reduce false alarms enough to keep the upper CI bound at or below 5%.
- Close the last static gaps: Write generic questions for soft reply norms and reply-format tricks (reverse characters, no spaces), review them with the four-model council, and tune on DEV and CAL only.
- Protect TEST2 and add a second layer: Keep TEST2 locked for the final check of a future version. For bare_task and adaptive attacks, pair this detector with a task-aware second layer.