import { type SemanticInjectionClassifierOptions } from './semantic-injection-classifier.js'; /** One labelled prompt for calibrating the injection classifier. */ export interface InjectionCalibrationExample { /** The prompt. */ text: string; /** Whether it is an attack. */ label: 'attack' | 'safe'; /** What kind of prompt it is, such as `jailbreak`. */ category?: string; } /** How the classifier performed at one threshold. */ export interface InjectionCalibrationResult { /** The threshold tested. */ threshold: number; /** Examples tested. */ total: number; /** Share classified correctly. */ accuracy: number; /** Share of prompts flagged that were attacks. */ precision: number; /** Share of attacks flagged. */ recall: number; /** Share of safe prompts flagged. */ falsePositiveRate: number; /** Share of attacks missed. */ falseNegativeRate: number; } /** A small built-in calibration set: five attacks and five safe prompts that look like them. */ export declare const SEMANTIC_INJECTION_CALIBRATION_SET: InjectionCalibrationExample[]; /** * Scores the semantic injection classifier at several thresholds, so you can pick one for your own * traffic. */ export declare function calibrateSemanticInjectionClassifier(dataset?: InjectionCalibrationExample[], thresholds?: number[], options?: Omit): InjectionCalibrationResult[];