feat: Add AgentHealthBench — agent behavioral health probes and detectors#1939
feat: Add AgentHealthBench — agent behavioral health probes and detectors#1939Gach0ng wants to merge 1 commit into
Conversation
2063650 to
1abf839
Compare
…health testing Signed-off-by: G@ch0ng <gachong2333.163.com>
1abf839 to
435db82
Compare
jmartin-tech
left a comment
There was a problem hiding this comment.
Garak is not a benchmark and while some prompts from existing benchmarks are accepted probes that do not implement a specific adversarial attack technique need strong reasons to be included.
Some early feedback not a full review of viability for acceptance of these probes.
Probe and detector names with common grouping are currently organized into single module files with multiple classes included to group them. #1503 represents an desire to refactor for the overall project to allow for various plugins to be individual files, however that effort is in queue and not in scope for this PR.
Please match the code organization to align probe/detector classes something like:
detectors.agent_health.ActionTrace
detectors.agent_health.Cascade
detectors.agent_health.IdentityVerify
detectors.agent_health.PermissionCheck
probes.agent_health.*
Also many of the prompts included here have coverage in various existing probes. Spending extra inference during testing to confirm these duplicate prompts has limited value.
There was a problem hiding this comment.
This is not a detector it is either an independent tool or an analysis tool and should either be in the tools path for external use or in the garak/analyze module path for distribution usage that the pip installed package.
Summary
Adds AgentHealthBench, a 4-tier agent behavioral health testing suite
integrated as garak probes and detectors.
4-Tier Risk Model
agent_health_atomic.ToolMisuseagent_health_action_trace.ActionTraceDetectoragent_health_atomic.ActionChainagent_health_comm.IdentitySpoofagent_health_emergent.CascadeFailureagent_health_immunity.VaccineRecallTotal: 597 prompts across 5 probes.
New Detectors (4)
agent_health_action_trace.ActionTraceDetector— 8 blacklist regexesagent_health_permission_check.PermissionCheckDetector— 14 permission regexesagent_health_identity_verify.IdentityVerifyDetector— 12 identity-compliance regexesagent_health_cascade_detect.CascadeDetector— 14 cascade-failure regexesNew Post-Processor
agent_health_health_scorer.HealthScorer— CLI that reads garak.report.jsonland outputs a weighted 0–100 health score with per-tier breakdown.
Tests
Usage
garak --model_type openai --model_name gpt-4 \ --probes agent_health_atomic.ToolMisuse,agent_health_atomic.ActionChain,agent_health_comm.IdentitySpoof,agent_health_emergent.CascadeFailure,agent_health_immunity.VaccineRecall \ --detectors agent_health_action_trace.ActionTraceDetector python garak/detectors/agent_health_health_scorer.py path/to/report.jsonl