/** * HackAPrompt Corpus Loader * * Reads the HackAPrompt-format sample JSON (text/category/label/source/language) * produced by scripts/hackaprompt-to-corpus.py and converts each row into the * CorpusSample shape used by the ATR eval harness. * * HackAPrompt is an all-adversarial corpus: every sample is an attempt to * subvert the system prompt. We therefore only measure recall against this * dataset; precision/FP rate is undefined here. For combined precision+recall * use this corpus alongside a benign source (PINT, real-traffic). * * @module agent-threat-rules/eval/hackaprompt-corpus */ import type { CorpusSample } from './corpus.js'; /** * The two groups breakdown.by_category reports. HackAPrompt's `correct` field * records whether the submission made its target model produce the level's * target output, i.e. whether the attack succeeded in the competition. It is * not an attack type. The corpus file's own `category` ("jailbreak" / * "prompt-injection") is a label PR #51 derived from that same field; it stays * in the file so the corpus keeps the digest the manifest pins, and is not used. */ export declare const HACKAPROMPT_OUTCOME_CATEGORY: { readonly succeeded: "competition-outcome:succeeded"; readonly failed: "competition-outcome:failed"; }; export declare function loadHackaPromptCorpus(dataPath: string): readonly CorpusSample[]; export declare function getHackaPromptCorpusStats(corpus: readonly CorpusSample[]): { total: number; attacks: number; benign: number; byCategory: Record; byDifficulty: Record; }; //# sourceMappingURL=hackaprompt-corpus.d.ts.map