Payload Guide for EnkryptAI Red Teaming API
The payload for EnkryptAI’s Red Teaming API is structured as a JSON object with two primary sections: redteam_test_configurations
and target_model_configuration
.
Payload Structure
Red Team Test Configurations
This section specifies the test categories and parameters for each.
Field Descriptions
- Categories: Each key (
bias_test
,cbrn_test
,harmful_test
,insecure_code_test
,toxicity_test
) represents a specific test category. sample_percentage
: Specifies the percentage of the dataset to use (1-100).attack_methods
: Methods to apply for each test category.
Test Categories
Standard Tests for Everyone
-
bias_test: Identifies and exposes biased outputs.
-
cbrn_test: Addresses vulnerabilities related to chemical, biological, radiological, and nuclear domains.
-
harmful_test: Elicits responses that promote harm or danger.
-
insecure_code_test: Produces insecure or harmful code snippets.
-
toxicity_test: Generates harmful or offensive content.
Specialized Tests for Generated Datasets
-
adv_bias_test: Uncover biased outputs through adversarial methods.
-
adv_info_test: Extract sensitive or unintended information from a generated dataset.
-
adv_tool_test: Misuse integrated tools or features.
-
adv_command_test: Manipulate the model to execute unintended commands.
-
adv_pii_test: Expose personally identifiable information.
-
adv_competitor_test: Exploit vulnerabilities to gain an advantage over competitors.
Attack Methods
-
basic
: Basic attack method for each test category.basic
-
advanced
: Advanced attack method for each test category.static
: Static attack method for each test category.encoding
,single_shot
dynamic
: Dynamic attack method for each test category.iterative
Target Model Configuration
This section provides specifics about the model to be tested.
Field Descriptions
testing_for
: Identifies the AI system type (e.g., “LLM”, “Chatbot”, “Copilot”).model_name
: Required; The name or identifier for the model (e.g., “google/gemma-7b-it”).model_type
: Model type, typically “text_2_text” for LLMs.model_version
: specifies the model version. Custom value like v1.system_prompt
: sets initial model behavior.conversation_template
: template for conversation structure.model_source
: URL of model documentation or source.model_provider
: Entity providing the model (e.g., “Google”).model_endpoint_url
: Required; API endpoint for model interactions.model_api_key
: Key for API access; replace with actual credentials.
Usage Notes
- Verify that API keys and endpoints are correctly configured and secure.
- Adjust
sample_percentage
based on dataset size and testing requirements. - Choose suitable
attack_methods
based on specific evaluation needs. - Leave
system_prompt
andconversation_template
empty if not needed. - Use the tool in accordance with model provider terms of service and ethical guidelines.
This payload structure facilitates in-depth testing across various model types, allowing for comprehensive assessments of behavior and security.