site/docs/red-team/troubleshooting/data-handling.md
This page explains what data leaves your machine during red team testing and how to control it.
Red team testing involves three distinct operations, each with different data requirements:
| Operation | What Runs | Data Sent Externally |
|---|---|---|
| Target evaluation | Always local | Only to your configured LLM provider |
| Test generation | Local or remote | Depends on configuration (see below) |
| Result grading | Local or remote | Depends on configuration (see below) |
Your target model is always evaluated locally. Promptfoo never receives your target's responses unless you're using remote grading.
Without an OPENAI_API_KEY or a usable Codex/ChatGPT login, Promptfoo uses hosted inference for test generation and grading. The following data is sent to api.promptfoo.app:
For test generation:
purpose field)For grading:
Never sent:
Setting OPENAI_API_KEY routes generation and grading through your OpenAI account instead of promptfoo servers:
export OPENAI_API_KEY=sk-...
Or configure a different provider for grading:
redteam:
provider: anthropic:messages:claude-sonnet-4-20250514
With this configuration, promptfoo servers receive only telemetry.
If Codex is installed and signed in with ChatGPT, Promptfoo can use openai:codex-sdk locally for default text generation and grading when no higher-priority API credentials are configured. Remote-only plugins still use hosted inference, and embedding/moderation assertions still require a provider override with API credentials.
Some plugins require promptfoo's hosted inference and cannot run locally. These are marked with 🌐 in the plugin documentation.
Remote-only plugins include:
harmful:*)ssrf, bola, bfla, indirect-prompt-injection, ascii-smugglingcompetitors, hijacking, off-topic, system-prompt-overrideRemote-only strategies include: audio, citation, gcg, goat, jailbreak:composite, jailbreak:hydra, jailbreak:likert, jailbreak:meta
To run entirely locally:
export PROMPTFOO_DISABLE_REMOTE_GENERATION=true
This disables all remote-only plugins and strategies. You must provide your own OPENAI_API_KEY or configure a local model for generation and grading.
For red-team-specific control (keeps SimulatedUser remote generation enabled):
export PROMPTFOO_DISABLE_REDTEAM_REMOTE_GENERATION=true
See Configuring Inference for detailed setup.
Promptfoo collects anonymous usage telemetry:
redteam generate, redteam run, etc.)No prompt content, responses, or personally identifiable information is included.
To disable:
export PROMPTFOO_DISABLE_TELEMETRY=1
See Telemetry Configuration for details.
When using remote generation, promptfoo requires access to:
| Domain | Purpose |
|---|---|
api.promptfoo.app | Test generation and grading |
api.promptfoo.dev | Consent tracking for harmful plugins |
a.promptfoo.app | Telemetry (PostHog) |
If blocked by your firewall, see Remote Generation Troubleshooting.
For organizations requiring complete network isolation:
Promptfoo Enterprise On-Prem provides:
See the Enterprise Overview for deployment options.
| Requirement | Configuration |
|---|---|
| No data to Promptfoo servers | Use API-key/local providers for every generation, grading, embedding, and moderation path; avoid remote-only plugins; set PROMPTFOO_DISABLE_TELEMETRY=1 |
| Local generation only | Set PROMPTFOO_DISABLE_REMOTE_GENERATION=true + configure local provider |
| Air-gapped deployment | Use Enterprise On-Prem |