@cloudkinetix/bmad-enhanced
Version:
Cloud-Kinetix enhanced fork of BMAD-METHOD - Breakthrough Method of Agile AI-driven Development with robust versioning and unified validation.
358 lines (241 loc) • 10.2 kB
Markdown
# {{Project Name}} LLM Safety Assessment Report
[[LLM: Default path: .bmad-workspace/ck-ai-agent-dev/reports/ai-safety-{{agent-name}}-{{date}}.md]]
[[LLM: Research-Driven Safety Assessment
Before conducting the safety assessment, research and apply current best practices:
1. Research latest LLM safety frameworks and standards (EU AI Act, NIST AI Risk Management, etc.)
2. Study recent safety assessment methodologies and risk evaluation techniques
3. Review current threat models and attack vectors from security research
4. Research industry-specific safety requirements and compliance standards
5. Analyze recent safety incidents and lessons learned from the LLM community
Then apply this research to:
1. Replace {{Project Name}} with actual project name
2. Conduct comprehensive safety assessment using research-informed methodologies
3. Provide specific recommendations based on current best practices
4. Use evidence-based risk ratings and prioritization frameworks
5. Reference current standards and regulatory requirements
Output file location: `docs/ai-agents/safety-report-{{date}}.md`]]
## Executive Summary
[[LLM: Provide high-level summary of safety assessment findings, critical risks, and key recommendations. Keep it concise but comprehensive.]]
- **Assessment Date**: {{date}}
- **System Assessed**: {{system-name}}
- **Overall Risk Level**: {{Critical/High/Medium/Low}}
- **Compliance Status**: {{Compliant/Non-compliant/Partial}}
- **Recommendation Priority**: {{number}} critical, {{number}} high, {{number}} medium actions
### Key Findings
1. {{critical-finding-1}}
2. {{critical-finding-2}}
3. {{high-priority-finding}}
### Immediate Actions Required
1. {{urgent-action-1}}
2. {{urgent-action-2}}
## Risk Assessment Matrix
| Risk Category | Severity | Likelihood | Risk Score | Status |
| ------------------------ | -------- | ---------- | ---------- | ---------- |
| Harmful Content | {{1-5}} | {{1-5}} | {{score}} | {{✓/⚠/✗}} |
| Misinformation | {{1-5}} | {{1-5}} | {{score}} | {{✓/⚠/✗}} |
| Privacy Breach | {{1-5}} | {{1-5}} | {{score}} | {{✓/⚠/✗}} |
| Security Vulnerabilities | {{1-5}} | {{1-5}} | {{score}} | {{✓/⚠/✗}} |
| Bias & Fairness | {{1-5}} | {{1-5}} | {{score}} | {{✓/⚠/✗}} |
| Misalignment | {{1-5}} | {{1-5}} | {{score}} | {{✓/⚠/✗}} |
**Risk Score Legend**: 1-5 (Low), 6-10 (Medium), 11-15 (High), 16-25 (Critical)
## Detailed Risk Analysis
### Harmful Content Generation
[[LLM: Assess the system's ability to prevent generation of harmful, violent, or inappropriate content.]]
#### Test Results
- **Total Tests Run**: {{number}}
- **Pass Rate**: {{percentage}}%
- **Failure Categories**: {{list-categories}}
#### Specific Findings
<<REPEAT: harmful_finding>>
- **Issue**: {{harmful-content-issue}}
- **Severity**: {{Critical/High/Medium/Low}}
- **Frequency**: {{occurrence-rate}}
- **Example**: `{{sanitized-example}}`
- **Mitigation**: {{recommended-fix}}
<</REPEAT>>
#### Current Controls
- ✓ {{existing-control-1}}
- ✓ {{existing-control-2}}
- ✗ {{missing-control}}
### Misinformation and Hallucination
[[LLM: Evaluate the system's tendency to generate false or misleading information.]]
#### Hallucination Rate
- **Factual Accuracy**: {{percentage}}%
- **Source Attribution**: {{percentage}}%
- **Confidence Calibration**: {{Well-calibrated/Overconfident/Underconfident}}
#### Test Scenarios
<<REPEAT: misinfo_test>>
##### {{Scenario Name}}
- **Test Type**: {{factual/reasoning/citation}}
- **Result**: {{Pass/Fail}}
- **Details**: {{what-happened}}
- **Risk Level**: {{assessment}}
<</REPEAT>>
### Privacy and Data Protection
[[LLM: Assess privacy risks and data handling practices.]]
#### PII Detection Tests
| Data Type | Detection Rate | False Positives | Protection Method |
| --------- | --------------- | --------------- | ----------------- |
| Names | {{percentage}}% | {{percentage}}% | {{method}} |
| Addresses | {{percentage}}% | {{percentage}}% | {{method}} |
| SSN/IDs | {{percentage}}% | {{percentage}}% | {{method}} |
| Financial | {{percentage}}% | {{percentage}}% | {{method}} |
| Medical | {{percentage}}% | {{percentage}}% | {{method}} |
#### Data Handling Assessment
- **Input Sanitization**: {{Implemented/Partial/Missing}}
- **Output Filtering**: {{Implemented/Partial/Missing}}
- **Logging Practices**: {{Compliant/Non-compliant}}
- **Retention Policies**: {{Defined/Undefined}}
### Security Vulnerabilities
[[LLM: Identify security risks including prompt injection and system manipulation.]]
#### Prompt Injection Tests
<<REPEAT: injection_test>>
- **Attack Vector**: {{injection-type}}
- **Success Rate**: {{percentage}}%
- **Impact if Successful**: {{impact-description}}
- **Current Defense**: {{defense-mechanism}}
- **Recommendation**: {{improvement}}
<</REPEAT>>
#### System Security
- **Authentication**: {{assessment}}
- **Authorization**: {{assessment}}
- **Rate Limiting**: {{assessment}}
- **Input Validation**: {{assessment}}
- **Audit Logging**: {{assessment}}
### Bias and Fairness Analysis
[[LLM: Evaluate the system for various types of bias.]]
#### Bias Test Results
| Bias Type | Test Set | Disparity Score | Threshold | Status |
| ------------- | ----------- | --------------- | -------------- | ------------- |
| Gender | {{dataset}} | {{score}} | <{{threshold}} | {{Pass/Fail}} |
| Racial | {{dataset}} | {{score}} | <{{threshold}} | {{Pass/Fail}} |
| Age | {{dataset}} | {{score}} | <{{threshold}} | {{Pass/Fail}} |
| Socioeconomic | {{dataset}} | {{score}} | <{{threshold}} | {{Pass/Fail}} |
| Geographic | {{dataset}} | {{score}} | <{{threshold}} | {{Pass/Fail}} |
#### Specific Bias Findings
<<REPEAT: bias_finding>>
- **Bias Pattern**: {{description}}
- **Affected Groups**: {{groups}}
- **Severity**: {{High/Medium/Low}}
- **Mitigation Strategy**: {{strategy}}
<</REPEAT>>
### Alignment and Goal Consistency
[[LLM: Assess whether the LLM system behaves according to intended goals and values.]]
#### Alignment Tests
- **Goal Adherence**: {{percentage}}%
- **Boundary Respect**: {{percentage}}%
- **Value Consistency**: {{percentage}}%
#### Misalignment Incidents
<<REPEAT: misalignment>>
- **Incident**: {{description}}
- **Frequency**: {{how-often}}
- **Root Cause**: {{analysis}}
- **Correction**: {{fix-approach}}
<</REPEAT>>
## Compliance Assessment
### Regulatory Compliance
[[LLM: Evaluate compliance with relevant regulations and standards.]]
| Regulation | Requirements | Status | Gap Analysis |
| ----------------- | ---------------- | ----------------------------------- | ------------ |
| GDPR | {{requirements}} | {{Compliant/Partial/Non-compliant}} | {{gaps}} |
| CCPA | {{requirements}} | {{Compliant/Partial/Non-compliant}} | {{gaps}} |
| AI Act (EU) | {{requirements}} | {{Compliant/Partial/Non-compliant}} | {{gaps}} |
| Industry Specific | {{requirements}} | {{Compliant/Partial/Non-compliant}} | {{gaps}} |
### Ethical Guidelines Compliance
- **IEEE Ethics Guidelines**: {{assessment}}
- **Company LLM Principles**: {{assessment}}
- **Industry Best Practices**: {{assessment}}
## Recommendations
### Critical Priority (Immediate Action Required)
<<REPEAT: critical_rec>>
#### {{Recommendation Title}}
- **Risk Addressed**: {{risk-category}}
- **Implementation Timeline**: {{timeline}}
- **Resources Required**: {{resources}}
- **Success Metrics**: {{how-measured}}
**Implementation Steps**:
1. {{step-1}}
2. {{step-2}}
3. {{step-3}}
**Expected Outcome**: {{outcome}}
<</REPEAT>>
### High Priority (Within 30 Days)
<<REPEAT: high_rec>>
#### {{Recommendation Title}}
- **Risk Addressed**: {{risk-category}}
- **Complexity**: {{High/Medium/Low}}
- **Dependencies**: {{prerequisites}}
**Action Plan**: {{detailed-plan}}
<</REPEAT>>
### Medium Priority (Within 90 Days)
<<REPEAT: medium_rec>>
- **{{Recommendation}}**: {{brief-description}}
- Owner: {{responsible-party}}
- Deadline: {{date}}
<</REPEAT>>
## Implementation Roadmap
### Phase 1: Immediate Mitigations (Week 1-2)
- [ ] {{critical-action-1}}
- [ ] {{critical-action-2}}
- [ ] {{critical-action-3}}
### Phase 2: Core Improvements (Week 3-8)
- [ ] {{improvement-1}}
- [ ] {{improvement-2}}
- [ ] {{improvement-3}}
### Phase 3: Long-term Enhancements (Month 3-6)
- [ ] {{enhancement-1}}
- [ ] {{enhancement-2}}
- [ ] {{enhancement-3}}
## Monitoring and Continuous Assessment
### Key Safety Metrics
```yaml
safety_metrics:
- metric: harmful_content_rate
target: < {{threshold}}%
current: {{current}}%
monitoring: continuous
- metric: bias_score
target: < {{threshold}}
current: {{current}}
monitoring: weekly
- metric: security_incidents
target: 0
current: {{number}}
monitoring: real-time
```
### Review Schedule
- **Daily**: {{daily-checks}}
- **Weekly**: {{weekly-review}}
- **Monthly**: {{monthly-assessment}}
- **Quarterly**: {{quarterly-audit}}
## Testing Methodology
### Tools and Frameworks Used
- **Safety Testing**: {{tools-used}}
- **Bias Detection**: {{tools-used}}
- **Security Testing**: {{tools-used}}
- **Performance Testing**: {{tools-used}}
### Test Coverage
- **Scenarios Tested**: {{number}}
- **Edge Cases**: {{number}}
- **Adversarial Inputs**: {{number}}
- **Total Test Cases**: {{number}}
## Appendices
### A. Detailed Test Results
[Link to comprehensive test data]
### B. Technical Specifications
[Link to system architecture and controls]
### C. Incident Log
[Link to historical incidents and resolutions]
### D. Glossary
- **{{term-1}}**: {{definition}}
- **{{term-2}}**: {{definition}}
- **{{term-3}}**: {{definition}}
## Report Validation
- **Prepared By**: {{name}}, {{title}}
- **Reviewed By**: {{name}}, {{title}}
- **Approved By**: {{name}}, {{title}}
- **Next Review Date**: {{date}}
## Contact Information
- **Safety Team**: {{email}}
- **Emergency Contact**: {{phone}}
- **Issue Reporting**: {{system/email}}