Skip to main content
Use the document classifier node to classify your documents.

Pre-requisites

Run the following command to enable watsonx Orchestrate Developer Edition to process documents:
BASH
Note: You need to configure a minimum allocation of 20GB RAM to your Docker engine during installation of watsonx Orchestrate Developer edition to support document processing features.
Note: To run the document classifier, you must define the WO_INSTANCE, WO_API_KEY, and AUTHORIZATION_URL credentials in your .env file. For more information on configuring the .env file, see Installing the watsonx Orchestrate Developer Edition.

Limitations

The document classifier node has the following limits and restrictions:

Configuring document extractor node in agentic workflows

  1. Define document classes. Create a class that defines the document classes to classify. Each document class must follow this structure:
    Python
  2. Configure the document classifier node
Include a call to the docclassifier() method in your agentic workflow to classify the document. This method accepts the following input arguments:
string
required
Unique identifier for the node.
string
required
The LLM used for document classification. The default value is watsonx/meta-llama/llama-4-maverick-17b-128e-instruct-fp8.
string
Display name for the node.
object
required
The document classification classes.
string
Description of the node.
float
Minimum confidence threshold for classification.
DataMap
Define input mappings using a structured collection of Assignment objects.
bool
Enable the handwritten feature by setting this to true.
bool
Enables or disables the human-in-the-loop feature. Set to True to activate it and False to deactivate. The default value is False.
LanguageCode
The ISO-639 language code that specifies the document’s language for OCR processing. Use the LanguageCode enum to specify supported languages (e.g., LanguageCode.fr for French, LanguageCode.ja for Japanese). This parameter is essential for scanned PDFs and images containing non-Latin scripts, as it ensures the correct OCR engine is used to recognize characters accurately. Programmatic documents (PDF, .docx, .pptx) do not require this setting.
Note:The min_confidence setting controls the human-in-the-loop feature. This feature only works when you run the Flow from a chat session. If the document is classified with confidence lower than min_confidence, or as Other, the agent opens a review window in the chat. You can then review and confirm the extracted values.
Example use of the docext node in an agentic workflow:
Python

Using the language parameter

For scanned PDFs and images containing non-Latin scripts, specify the document’s language to ensure accurate OCR processing:
Python