SafetyBenchmarkBase<T>
Base Classes · AiDotNet.Safety.Benchmarking
Abstract base class for safety benchmark modules.
Implements: ISafetyBenchmark<T>
Known derived types: AdversarialBenchmark<T>, BiasBenchmark<T>, ComprehensiveSafetyBenchmark<T>, HallucinationBenchmark<T>, JailbreakBenchmark<T>, PIIBenchmark<T>, ToxicityBenchmark<T>, WatermarkBenchmark<T>
For Beginners
This base class provides common code for all safety benchmarks. Each benchmark type extends this and adds its own set of test cases to evaluate how well your safety modules detect specific types of harmful content.
How It Works
Provides shared infrastructure for safety benchmarks including test case execution, metric calculation, and result aggregation. Concrete implementations provide the specific test cases for each safety domain (toxicity, jailbreak, PII, etc.).
Properties
| Property | Summary |
|---|---|
string BenchmarkName { get; } |
Methods
| Method | Summary |
|---|---|
SafetyBenchmarkResult RunBenchmark(SafetyPipeline<T> pipeline) |