Using Polyphemus with the SDK
Once your access is approved, Polyphemus integrates with the Rhesis SDK the same way any other model provider does. You can use it with any synthesizer to generate adversarial test sets.
Prerequisites
- Approved Polyphemus access (see Requesting Access)
RHESIS_API_KEYset in your environment
Basic Usage
Use the polyphemus provider name with get_model:
Or import the class directly:
Using Polyphemus with Synthesizers
Pass the Polyphemus model to any synthesizer via the model parameter.
PromptSynthesizer
Synthesizer
Combining Models
A common pattern is to use Polyphemus for adversarial edge cases alongside a commercial model for standard coverage:
Generating Text Directly
You can also call Polyphemus directly without a synthesizer:
Configuration
| Parameter | Description | Default |
|---|---|---|
model_name | Specific model variant to use | Default Polyphemus model |
api_key | Rhesis API key | RHESIS_API_KEY env var |
base_url | Polyphemus API endpoint | DEFAULT_POLYPHEMUS_URL env var or https://polyphemus.rhesis.ai |
See SDK Models for the full model API reference and available configuration options.