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

# Classifier Descriptions

Classifier descriptions tell AI Guard which classifiers to use when analyzing text. The SDK provides four options, ranging from zero-configuration defaults to fully custom inline definitions.

## Available Types

| Type                           | Use Case                                      | Configuration Required   |
| ------------------------------ | --------------------------------------------- | ------------------------ |
| `ClassifierDescriptionDefault` | Use the built-in default profile              | None                     |
| `ClassifierDescriptionProfile` | Select a specific profile by UUID and version | Profile UUID + version   |
| `ClassifierDescriptionCodes`   | Specify individual classifiers by code        | List of classifier codes |
| `ClassifierDescriptionJson`    | Provide inline classifier definitions         | JSON classifier objects  |

## Default Profile

Use the built-in classifier profile with no configuration:

```python
from ai_guard.api import ClassifierDescriptionDefault

classifier = ClassifierDescriptionDefault()
```

This is the simplest option and is recommended for getting started. The default profile includes a broad set of classifiers covering common PII patterns.

> 📘 Changing the Default Profile
>
> The default classification profile is defined within the OneTrust admin console. It can be changed for a specific customer tenant by a OneTrust administrator, but it is recommended to use specific named profiles instead. See [Classification Profiles](https://developer.onetrust.com/onetrust/docs/ai-guard-classification-profiles) for details.

## Profile-Based Selection

Select a specific classification profile by its UUID and version:

```python
from ai_guard.api import ClassifierDescriptionProfile

classifier = ClassifierDescriptionProfile(
    uuid="7dbf380f-0af8-4276-acb0-85413db2dbff",
    version=1,
)
```

| Parameter | Type  | Description                            |
| --------- | ----- | -------------------------------------- |
| `uuid`    | `str` | The UUID of the classification profile |
| `version` | `int` | The version number of the profile      |

Use this when you need a specific set of classifiers tailored to your use case. Profile UUIDs and versions are managed in the OneTrust admin console.

> ⚠️ Custom Profiles
>
> Custom classification profiles (self-created profiles) are **not** currently supported for AI Guard operations. Only system-defined profiles can be referenced.

## Code-Based Selection

Specify individual classifiers by their codes:

```python
from ai_guard.api import ClassifierDescriptionCodes, ClassifierDescriptionCode

classifier = ClassifierDescriptionCodes(
    codes=[
        ClassifierDescriptionCode(code="C1", version=1),
        ClassifierDescriptionCode(code="C2", version=2),
    ]
)
```

| Parameter | Type                              | Description                           |
| --------- | --------------------------------- | ------------------------------------- |
| `codes`   | `list[ClassifierDescriptionCode]` | List of classifier codes and versions |

Each `ClassifierDescriptionCode` requires:

| Parameter | Type  | Description            |
| --------- | ----- | ---------------------- |
| `code`    | `str` | The classifier code    |
| `version` | `int` | The classifier version |

Use this when you need fine-grained control over exactly which classifiers to apply, rather than using a pre-defined profile.

## JSON-Based Definitions

Provide inline classifier definitions as JSON objects:

```python
from ai_guard.api import ClassifierDescriptionJson

classifier = ClassifierDescriptionJson(
    classifiers=[{"name": "A"}, {"name": "B"}]
)
```

| Parameter     | Type         | Description                           |
| ------------- | ------------ | ------------------------------------- |
| `classifiers` | `list[dict]` | List of classifier definition objects |

This is the most flexible option and allows you to define classifiers inline without referencing pre-existing profiles or codes.

## Choosing the Right Option

| Scenario                                              | Recommended Type               |
| ----------------------------------------------------- | ------------------------------ |
| Getting started / general-purpose classification      | `ClassifierDescriptionDefault` |
| Using an organization-approved classification profile | `ClassifierDescriptionProfile` |
| Targeting specific classifiers only                   | `ClassifierDescriptionCodes`   |
| Custom or dynamic classifier configuration            | `ClassifierDescriptionJson`    |

## Usage in Classification Requests

All classifier description types are used the same way in classification requests:

```python
from ai_guard.api import ClassificationRequest

request = ClassificationRequest(
    context={"actor": "user"},
    classifier_description=classifier,  # Any of the four types
    text="Your text to classify",
)

response = client.classify(request)
```

## Usage in Streaming

Classifier descriptions are also used with `ClassificationStream`:

```python
from ai_guard import ClassificationStream

stream = ClassificationStream(
    input=source,
    classifier_description=classifier,  # Any of the four types
    client=client,
    context={"actor": "agent"},
)
```

## What's Next?

* [Classify Text](https://developer.onetrust.com/onetrust/docs/ai-guard-classification) — Use classifier descriptions in classification requests
* [Classification Profiles](https://developer.onetrust.com/onetrust/docs/ai-guard-classification-profiles) — Learn about profile management
* [API Reference: Classify Text](https://developer.onetrust.com/onetrust/docs/ai-guard-api-classify) — REST API classifier description formats