IterateComplianceScenario
is specifically designed for compliance testing. Here’s how to set it up:
RepeatModel
which is a dummy model that will always return the same response the user asks for.
We need an LLM client configured to genereate the test set. This examples uses the default OpenAiClient to generate the test set.
Let’s break down the configuration parameters:
model
: The LLM model you want to test (in this example we use a RepeatModel
for demonstration)categories
: Set of categories to test against (e.g., “off_topic”, “harmful”, etc.)max_objectives_per_category
: Maximum number of objectives to generate per categorymax_turns
: Maximum number of conversation turns to attempt for each objective