Adding document classifiers

You can add custom document classifiers to agentic workflows to automatically identify document types. You can define the document classes such as invoices, contracts, and bills, and the classifier uses AI to categorize documents based on those classes.

To add a document classifier to an agentic workflow:

  1. From the menu Menu, go to Build.
  2. Select All tools.
  3. Do one of the following based on your needs:
    • To create a new agentic workflow with a document classifier, click Create tool and select Agentic workflow.
    • To add a document classifier to an existing agentic workflow, select the tool, click the Options icon option icon, and select Open in flow builder.
  4. Click the Add flow items icon add icon.
  5. Select the Flow nodes tab.
  6. Drag Document classifier to the agentic workflow.

Configuring a document classifier

Note: The watsonx/ibm/granite-3-3-8b-instruct model is deprecated as of November 24, 2025, and will be withdrawn on February 22, 2026. Use the default model or another supported model for the document classifier.

To configure a document classifier to identify documents:

  1. Select the document classifier that you added to the agentic workflow.
  2. Add the classes to identify the documents such as invoices, contracts, and bills.
  3. Select the model to use for the document classifier.
  4. Click Done in the document classifier dialog.

Testing a document classifier

To test the document classifier and see how documents are classified:

  1. Select the document classifier in the agentic workflow.

  2. Select Test classifier and upload up to five documents.

    To delete a document, click the Delete icon Close icon on the document row. You can click Delete all to delete all documents. To add documents, click Upload or drag the files to the panel.

    It might take some time to upload the documents. After your documents are processed, you can see the predicted classification for each of your documents.

    Documents that do not match the defined classes are classified as Other. You cannot delete the Other class. Documents that are classified as Other trigger a user review. For more information, see Configuring a user review.

    If you add, edit, or delete a class, all documents are reclassified.

  1. After you test and get the expected results, click Done in the document classifier dialog.

Mapping data to inputs

By default, auto-mapping is enabled. However, you can map values to the inputs.

To map values to inputs, complete the following steps:

  1. Select the document classifier node and then click Edit data mapping.
  2. Specify the input values for data mapping. For more information about data mapping, see Mapping data.

Configuring a user review

Documents that are classified as Other trigger a user review. Only the user who initiated the agentic workflow can review the document.

If the system classifies a document as Other, it creates a review task and assigns it to the user, who started the agentic workflow. The system notifies the user in the chat that a review is required.

Example showing a user review task in chat
Figure 1: Example showing a user review task in chat.

The user can then review the document and the system’s prediction, optionally update the classification, and submit the review. After submission, the workflow continues with the updated classification that is provided by the user.

Example showing user review options
Figure 2: Example showing user review options.

To configure a user review:

Select the document classifier, and set the User Review switch to on. You can click the Edit icon edit icon to view the user review configuration.

Document classifier limits and restrictions

Document classifiers have the following limits and restrictions.

Area Description
Maximum file size 10 MB
Maximum number of uploaded files 5 files
Accepted file types .doc, .docx, .jpe, .jpeg .jpg, .pdf, .png, .ppt, .pptx, .tif, .tiff
Minimum length of the class name 3 characters
Maximum length of the class name 30 characters
Maximum number of classes 10 classes
  • Creating agentic workflows

    An agentic workflow defines a set of linked activities and controls that are designed to achieve a specific business purpose or goal. Learn more about agentic workflows.