SafetyReport
Models & Types · AiDotNet.Safety
Unified safety report aggregating findings from all safety modules in the pipeline.
For Beginners
After the safety system finishes checking your content, it produces this report summarizing everything it found. The key properties are:
IsSafe: Quick yes/no answerOverallAction: What the system recommends doingFindings: Detailed list of every issue found
How It Works
A SafetyReport is the single output object from the safety pipeline. It aggregates all findings from every safety module that ran, provides an overall safety verdict, and recommends the strictest action needed.
Constructors
| Constructor | Summary |
|---|---|
SafetyReport() |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<SafetyCategory> DetectedCategories { get; set; } |
Gets the categories of harmful content detected. |
IReadOnlyList<SafetyFinding> Findings { get; set; } |
Gets the list of all safety findings from all modules. |
IReadOnlyList<string> ModulesExecuted { get; set; } |
Gets the names of all safety modules that were executed. |
SafetyAction OverallAction { get; set; } |
Gets the overall recommended action (the strictest action from all findings). |
SafetySeverity HighestSeverity { get; set; } |
Gets the highest severity found across all findings. |
bool IsSafe { get; set; } |
Gets whether the content passed all safety checks. |
double EvaluationTimeMs { get; set; } |
Gets the duration of the safety evaluation in milliseconds. |
double OverallScore { get; set; } |
Gets the overall safety score (0.0 = completely unsafe, 1.0 = completely safe). |
Methods
| Method | Summary |
|---|---|
SafetyReport FromFindings(IReadOnlyList<SafetyFinding> findings, IReadOnlyList<string> modulesExecuted, double evaluationTimeMs) |
Creates a report from a list of findings. |
SafetyReport Safe(IReadOnlyList<string> modulesExecuted, double evaluationTimeMs) |
Creates a safe (no findings) report. |