feat: Add HarmActionsEval for evaluation of action-level safety in AI agents#1664
Open
prane-eth wants to merge 1 commit intoNVIDIA:mainfrom
Open
feat: Add HarmActionsEval for evaluation of action-level safety in AI agents#1664prane-eth wants to merge 1 commit intoNVIDIA:mainfrom
prane-eth wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
Contributor
|
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
Author
|
I have read the DCO Document and I hereby sign the DCO |
Author
|
recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
AI agents have a growing adoption across the industry, including critical applications. AI agents that have access to tools can currently call tools directly with no centralized validation layer that inspects these calls before execution, allowing harmful or disallowed tool calls to be executed without oversight. Existing agent benchmarks evaluate the safety of final responses instead of actions.
HarmActionsEval benchmark evaluates actions. It found that 80% of the LLMs tested executed actions at the first attempt for over 95% of the harmful prompts.
Related work: https://github.com/Pro-GenAI/Agent-Action-Guard. It received 962 downloads on PyPI, and 247 clones on GitHub in the first week.
Changes
I integrated HarmActionsEval benchmark.
All the test cases passed using:
pytest tests/probes/test_probes_harmactionseval.py tests/detectors/test_detectors_harmactionseval.pyand
pytest tests/detectors/test_detectors.py::test_detector_detect[detectors.harmactionseval.ToolCallMatch].Example command used:
garak --target_type openai \ --target_name "$OPENAI_MODEL" \ --probes harmactionseval.HarmActionsEval \ --generations 1Verification
List the steps needed to make sure this thing works
garak -t <target_type> -n <model_name>python -m pytest tests/