Skip to content

Commit 07b029a

Browse files
authored
[evaluation] Fix for IndirectAttack attack objectives mapping (#42816)
* change to indirect attack * update changelog * nit * run black * Fix IndirectAttack attack objectives * run tox black
1 parent f488d01 commit 07b029a

File tree

1 file changed

+5
-1
lines changed
  • sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_utils

1 file changed

+5
-1
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_utils/metric_mapping.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ def get_attack_objective_from_risk_category(risk_category: Union[RiskCategory])
6363
:return: The corresponding attack objective string
6464
:rtype: str
6565
"""
66-
return "isa" if risk_category == RiskCategory.UngroundedAttributes else risk_category.value
66+
return (
67+
"isa"
68+
if risk_category == RiskCategory.UngroundedAttributes
69+
else "xpia" if risk_category == RiskCategory.IndirectAttack else risk_category.value
70+
)

0 commit comments

Comments
 (0)