add_redteam_task
Adds a redteam task to test model robustness using a saved model and configurable test parameters such as bias, toxicity, and security vulnerabilities, ensuring comprehensive AI safety analysis.
Instructions
Add a redteam task using a saved model.
Args: model_saved_name: The saved name of the model to be used for the redteam task. model_version: The version of the model to be used for the redteam task. redteam_model_config: The configuration for the redteam task. Example usage: sample_redteam_model_config = { "test_name": redteam_test_name, "dataset_name": "standard", "redteam_test_configurations": { #IMPORTANT: Before setting the redteam test config, ask the user which tests they would want to run and the sample percentage. "bias_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "cbrn_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "insecure_code_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "toxicity_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, "harmful_test": { "sample_percentage": 2, "attack_methods": {"basic": ["basic"]}, }, }, } These are the only 5 tests available. Ask the user which ones to run and sample percentage for each as well.
Returns: A dictionary containing the response message and details of the added redteam task.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
model_saved_name | Yes | ||
model_version | Yes | ||
redteam_model_config | Yes |