Skip to content

Commit bb35e87

Browse files
updated (#43898)
1 parent 8ac8b3e commit bb35e87

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_common/rai_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,10 @@ def _build_sync_eval_payload(
921921
:rtype: Dict
922922
"""
923923

924-
# Build properties/metadata (category, taxonomy, etc.)
924+
# Build properties/metadata (scenario, category, taxonomy, etc.)
925925
properties = {}
926+
if data.get("scenario") is not None:
927+
properties["scenario"] = data["scenario"]
926928
if data.get("risk_sub_type") is not None:
927929
properties["category"] = data["risk_sub_type"]
928930
if data.get("taxonomy") is not None:

sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/red_team/_evaluation_processor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ async def evaluate_conversation(
119119
query_response = {
120120
"query": "query",
121121
"response": " ".join(assistant_messages),
122+
"scenario": "redteam",
122123
}
123124

124125
# Add context to query_response if found

0 commit comments

Comments
 (0)