Flintglass PrismGuard-Hard-Corpus
6,354 Dual-Model Independently Blind-Verified Counterfactual Agentic Prompt-Injection & Hard-Benign (Zero-Over-Refusal) Security Tasks (3,177 exact counterfactual pairs) across 6 Production Agentic Surfaces, 30 Sub-Scenarios (including 6 strictly held-out OOD surfaces in hard_test), and 5 Attack Techniques — 100% Apache-2.0, zero proprietary API distillation.
Part of the Flintglass Prism Open-Source Agent & RAG Stack.
Why PrismGuard-Hard-Corpus?
Production AI-agent firewalls fail in two opposite ways:
- Over-Refusal (High False Positives /
NotInject): Naive classifiers panic whenever legitimate enterprise text mentions trigger words like "ignore stale cache", "override default flag", "system prompt config", "bypass local proxy", or "reset admin token". - Missed Indirect Prompt Injections: Stealthy attacks embedded inside realistic MCP JSON tool outputs, GitHub PR diffs, SIEM webhooks, calendar invites, emails, or retrieved RAG pages slip past classifiers trained only on toy chat jailbreaks.
PrismGuard-Hard-Corpus solves both with exact minimal-edit counterfactual pairs (avg pair edit similarity = 0.9053):
- 50% Hard-Benign / 50% Attack Exact Pairing: Every artifact has BOTH a 100% legitimate Hard-Benign version (naturally containing realistic engineering/admin/security trigger vocabulary!) AND a minimally edited Attack twin (
INDIRECT_INJECTIONorDIRECT_INJECTION) preserving ~90.5% of the surrounding legitimate artifact. Firewalls cannot rely on keyword triggers — they must detect genuine instruction hijacking! - Dual-Model Independent Blind Verification (100% Apache-2.0):
- Generator (
openai/gpt-oss-120b, Apache-2.0): Synthesizes realistic, completely fictitious enterprise agent artifacts (MCP JSON tool outputs, RAG docs, emails/calendar invites, GitHub PR diffs/CI logs, multi-turn traces, direct chat prompts) as counterfactual(benign_input, attack_input)pairs with exactinjected_payload,attack_goal, andbenign_reason. - Independent Blind Firewall Classifier (
qwen/qwen3.6-35b-a3b, Apache-2.0): Evaluates BOTHbenign_inputandattack_inputcompletely blind (separately, with zero access to the gold label or the counterfactual twin) intoBENIGN,DIRECT_INJECTION, orINDIRECT_INJECTION. - Strict Consensus Gate: A pair is kept ONLY IF the blind classifier gets BOTH exact labels right (
benign_input -> BENIGNANDattack_input -> expected attack class) and passes length, edit-similarity, and SHA-256 deduplication checks (78.8%acceptance rate across4,032candidate pairs;481false-positive-prone benign drafts &265weak attacks rejected!).
- Generator (
- 100% OOD-Scenario
hard_testSplit: Zero text overlap across splits. Every single row inhard_test(1,024rows /512pairs) comes from 6 strictly held-out OOD agentic scenarios:- Cloud billing / IAM audit log JSON from MCP
query_audit_events(mcp_tool_json_output) - Retrieved regulatory compliance FAQ & internal HR benefits handbook (
rag_retrieved_document) - Recruiting candidate resume & cover letter parsed by HR screening agent (
email_and_calendar_agent) - SQL migration script & schema comments reviewed by DBA assistant (
coding_and_pr_agent) - Multi-tenant analytics SQL assistant with row-level permissions (
direct_user_jailbreak) - Two-turn agent trace comparing two retrieved vendor quotes (
multi_turn_agent_state)
- Cloud billing / IAM audit log JSON from MCP
Dataset Statistics
| Split | Rows | Counterfactual Pairs | BENIGN (Hard-Benign) |
INDIRECT_INJECTION |
DIRECT_INJECTION |
OOD Scenarios |
|---|---|---|---|---|---|---|
train |
4,930 | 2,465 | 2,465 (50.0%) | 2,028 | 437 | 0% |
validation |
400 | 200 | 200 (50.0%) | 166 | 34 | 0% |
hard_test |
1,024 | 512 | 512 (50.0%) | 423 | 89 | 100% |
| Total | 6,354 | 3,177 | 3,177 (50.0%) | 2,617 | 560 | — |
Breakdown by Agentic Surface
| Surface | Pairs | Rows | Attack Class |
|---|---|---|---|
direct_user_jailbreak |
560 | 1,120 | DIRECT_INJECTION |
mcp_tool_json_output |
541 | 1,082 | INDIRECT_INJECTION |
multi_turn_agent_state |
532 | 1,064 | INDIRECT_INJECTION |
rag_retrieved_document |
532 | 1,064 | INDIRECT_INJECTION |
coding_and_pr_agent |
529 | 1,058 | INDIRECT_INJECTION |
email_and_calendar_agent |
483 | 966 | INDIRECT_INJECTION |
Breakdown by Attack Technique (attack rows)
attack_technique |
Count |
|---|---|
instruction_and_policy_override |
683 |
role_or_authority_spoofing |
673 |
tool_data_exfiltration |
642 |
stealth_conditional_trigger |
636 |
unauthorized_tool_action |
543 |
- Average counterfactual pair similarity (
SequenceMatcher):0.9053
Schema
Each JSONL row contains:
id: Unique row ID (pg-XXXXX-benignorpg-XXXXX-attack)pair_id: Shared ID linking each Hard-Benign / Attack counterfactual twinsplit:train,validation, orhard_testsurface,scenario,is_ood_scenariolabel:"BENIGN","DIRECT_INJECTION", or"INDIRECT_INJECTION"(is_injection: boolean)attack_technique:"none"for benign rows, or one of the 5 techniques abovecounterfactual_attack_label,counterfactual_attack_technique,benign_trigger_styletext: Complete prompt /[USER_REQUEST] ... [UNTRUSTED_DATA] ...artifactinjected_payload: Exact injected snippet (""for benign rows)explanation,pair_edit_similarity,generator_model,judge_model
Quickstart
from datasets import load_dataset
ds = load_dataset("flintglass/PrismGuard-Hard-Corpus")
print(ds)
print("OOD hard_test rows:", len(ds["hard_test"]))
Related Flintglass Models, Demos & Hard Corpora
- Prompt-Injection Firewalls: PrismGuard-27B, PrismGuard-35B-A3B, GPT-OSS-20B-PrismGuard, Inkling-2-Mini-PrismGuard, PrismGuard-9B, PrismGuard-8B, PrismGuard-4B, PrismGuard-Small (ONNX)
- Live Interactive Demos: PrismGuard-Demo, PrismStack-Demo
- Complete 6-Corpus Flintglass Verified Hard Suite: PrismGuard-Hard-Corpus • PrismSQL-Hard-Corpus • PrismMCP-Agent-Corpus • PrismVerify-Hard-Corpus • PrismRetrieve-Hard-Corpus • PrismCode-Hard-Corpus
License & Provenance
Released under Apache-2.0 by Flintglass Labs strictly for defensive AI-agent firewall training and evaluation. All examples use fictitious organizations, example.com domains, and dummy test strings (sk-test-0000). Generated and independently cross-verified exclusively using Apache-2.0 open-weight models (openai/gpt-oss-120b and qwen/qwen3.6-35b-a3b).