> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prowler.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Prowler product naming: Prowler App is now Prowler Local Server, and Prowler Enterprise is now Prowler Private Cloud. Always use the current names when answering. The full product reference is at /getting-started/products: Open Source projects are Prowler CLI, Prowler Local Server, Prowler Local Dashboard, and Prowler SDK; Prowler Products are Prowler Cloud, Prowler Private Cloud, Prowler Hub, Prowler Lighthouse AI, and Prowler MCP.

# Getting Started With LLM on Prowler

## Overview

Prowler's LLM provider enables comprehensive security testing of large language models using red team techniques. It integrates with [promptfoo](https://promptfoo.dev/) to provide extensive security evaluation capabilities.

## Prerequisites

Before using the LLM provider, ensure the following requirements are met:

* **promptfoo installed**: The LLM provider requires promptfoo to be installed on the system
* **LLM API access**: Valid API keys for the target LLM models to test
* **Email verification**: promptfoo requires email verification for red team evaluations

## Installation

### Install promptfoo

Install promptfoo using one of the following methods:

**Using npm:**

```bash theme={null}
npm install --global promptfoo@0.121.11
```

**Using Homebrew (macOS):**

```bash theme={null}
brew install promptfoo
```

**Using other package managers:**
See the [promptfoo installation guide](https://promptfoo.dev/docs/installation/) for additional installation methods.

### Verify Installation

```bash theme={null}
promptfoo --version
```

## Configuration

### Step 1: Email Verification

promptfoo requires email verification for red team evaluations. Set the email address:

```bash theme={null}
promptfoo config set email your-email@company.com
```

### Step 2: Configure LLM API Keys

Set up API keys for the target LLM models. For OpenAI (default configuration):

```bash theme={null}
export OPENAI_API_KEY="your-openai-api-key"
```

For other providers, see the [promptfoo documentation](https://promptfoo.dev/docs/providers/) for specific configuration requirements.

### Step 3: Generate Test Cases (Optional)

Prowler provides a default suite of red team tests but to customize the test cases, generate them first:

```bash theme={null}
promptfoo redteam generate
```

This creates test cases based on your configuration.

## Usage

### Basic Usage

Run LLM security testing with the default configuration:

```bash theme={null}
prowler llm
```

### Custom Configuration

Use a custom promptfoo configuration file:

```bash theme={null}
prowler llm --config-path /path/to/your/config.yaml
```

### Output Options

Generate reports in various formats:

```bash theme={null}
# JSON output
prowler llm --output-format json

# CSV output
prowler llm --output-format csv

# HTML report
prowler llm --output-format html
```

### Concurrency Control

Adjust the number of concurrent tests:

```bash theme={null}
prowler llm --max-concurrency 5
```

## Default Configuration

Prowler includes a comprehensive default LLM configuration that provides:

* **Target Models**: OpenAI GPT models by default
* **Security Frameworks**:
  * OWASP LLM Top 10
  * OWASP API Top 10
  * MITRE ATLAS
  * NIST AI Risk Management Framework
  * EU AI Act compliance
* **Test Coverage**: Over 5,000 security test cases
* **Plugin Support**: Multiple security testing plugins

## Advanced Configuration

### Custom Test Suites

Create custom test configurations by modifying the promptfoo config file in `prowler/config/llm_config.yaml` or pass a custom configuration with `--config-file` flag:

```yaml theme={null}
description: Custom LLM Security Tests
targets:
  - id: openai:gpt-4
redteam:
  plugins:
    - id: owasp:llm
      numTests: 10
    - id: mitre:atlas
      numTests: 5
```


## Related topics

- [Getting Started With Cloudflare on Prowler](/user-guide/providers/cloudflare/getting-started-cloudflare.md)
- [Getting Started With Vercel on Prowler](/user-guide/providers/vercel/getting-started-vercel.md)
- [Getting Started With Scaleway on Prowler](/user-guide/providers/scaleway/getting-started-scaleway.md)
- [Getting Started With Linode on Prowler](/user-guide/providers/linode/getting-started-linode.md)
- [Getting Started With Okta on Prowler](/user-guide/providers/okta/getting-started-okta.md)
