# Generative Classifier

> `UiPath.DocumentUnderstanding.ML.Activities.GenerativeClassifier`

`UiPath.DocumentUnderstanding.ML.Activities.GenerativeClassifier`

## Description

Allows you to classify documents using generative models.

:::note
The supported languages for the generative models are the same as the used OCR engine used. For more information, check the [OCR Supported languages](https://docs.uipath.com/document-understanding/automation-cloud/latest/user-guide/ocr) page.
:::

## Project compatibility

**Windows - Legacy | Windows**

## Configuration

#### Designer panel

* **Manage Document Type details** - Select **Manage Document Type details** to open the **Generative Classifier Prompt** wizard.

#### Properties panel

**Authentication**

The Authentication properties of this activity allow you to execute it via on-premises robots. Before configuring these properties, ensure you have fulfilled the prerequisites mentioned in the [Configuring Authentication](https://docs.uipath.com/activities/other/latest/document-understanding/configuring-authentication-intelligent-ocr) page. Once these steps are completed, you can then proceed to fill in the Authentication properties of the activity.

* **Runtime Credentials Asset** - Use this field when you need to access Document Understanding generative classification features while the robot is connected to a local Orchestrator, or from a different tenant. You can choose to enter a Credential Asset, for authentication purposes, in one of the following ways:
  + From the dropdown list, select the desired Credential Asset from the Orchestrator to which the UiPath® Robot is connected to.
  + Manually enter the path to the Orchestrator Credential Asset where you store the external application credentials for accessing the generative features.

    The format of the path should be: `<OrchestratorFolderName>/<AssetName>`.
* **Runtime Tenant Url** - Use this field, alongside the **Runtime Credentials Asset** field. Enter the URL of the tenant that the robot will connect to in order to execute the generative classification. The URL should be in the following format: `https://<baseURL>/<OrganizationName>/<TenantName>`.

**Common**
* **DisplayName** - The display name of the activity.

**Misc**
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

**Server**
* **RetryOnFailure** - Automatically retries the machine learning model execution, to eliminate transient network errors. If checked, the activity retries the execution.
* **Timeout (milliseconds)** - Specifies the amount of time (in milliseconds) to wait for a response from the server before an error is thrown. The default value is 100000 milliseconds (100 seconds).

## Using the Manage Prompt Wizard

The **Generative Classifier Prompt** wizard allows you to define the prompt for document types. The prompt is used to identify Document Types, provided as key-value pairs, where the key represents the name of the Document Type and the value a description for it, helping the classifier identify such documents.

Figure 1. The **Generative Classifier Prompt**, where you input the key-value pairs

![The Generative Classifier Prompt, where you input the key-value pairs](https://dev-assets.cms.uipath.com/assets/images/activities/document-understanding-the-generative-classifier-prompt-where-you-input-the-key-value-pairs-503698-7747f593-e75c430b.webp)

1. Select a **Document Type** from the list of document types defined in the **Configure Classifier** wizard.
2. In **Document Type details**, add an optional value to define additional details about the document type. This can be a short description of the document type. The maximum number of characters allowed is 1000.
