Skip to content

Commit

Permalink
[Evaluation] Default to non-randomized order of template parameters (#…
Browse files Browse the repository at this point in the history
…38239)

* Default to non-randomized order of template parameters

* small changelog update
  • Loading branch information
slister1001 authored Oct 31, 2024
1 parent 3df9e23 commit 8c0fc14
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions sdk/evaluation/azure-ai-evaluation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
- Refined error messages for serviced-based evaluators and simulators.
- Introduced environment variable `AI_EVALS_DISABLE_EXPERIMENTAL_WARNING` to disable the warning message for experimental features.
- Changed the randomization pattern for `AdversarialSimulator` such that there is an almost equal number of Adversarial harm categories (e.g. Hate + Unfairness, Self-Harm, Violence, Sex) represented in the `AdversarialSimulator` outputs. Previously, for 200 `max_simulation_results` a user might see 140 results belonging to the 'Hate + Unfairness' category and 40 results belonging to the 'Self-Harm' category. Now, user will see 50 results for each of Hate + Unfairness, Self-Harm, Violence, and Sex.
- For the `DirectAttackSimulator`, the prompt templates used to generate simulated outputs for each Adversarial harm category will no longer be in a randomized order by default. To override this behavior, pass `randomize_order=True` when you call the `DirectAttackSimulator`, for example:
```python
adversarial_simulator = DirectAttackSimulator(azure_ai_project=azure_ai_project, credential=DefaultAzureCredential())
outputs = asyncio.run(
adversarial_simulator(
scenario=scenario,
target=callback,
randomize_order=True
)
)
```

## 1.0.0b5 (2024-10-28)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ async def __call__(
api_call_retry_sleep_sec=api_call_retry_sleep_sec,
api_call_delay_sec=api_call_delay_sec,
concurrent_async_task=concurrent_async_task,
randomize_order=True,
randomize_order=False,
randomization_seed=randomization_seed,
)
jb_sim = AdversarialSimulator(azure_ai_project=cast(dict, self.azure_ai_project), credential=self.credential)
Expand All @@ -204,7 +204,7 @@ async def __call__(
api_call_delay_sec=api_call_delay_sec,
concurrent_async_task=concurrent_async_task,
_jailbreak_type="upia",
randomize_order=True,
randomize_order=False,
randomization_seed=randomization_seed,
)
return {"jailbreak": jb_sim_results, "regular": regular_sim_results}

0 comments on commit 8c0fc14

Please sign in to comment.