For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI ReferenceChangelogModel Versioning
GuidesAPI ReferenceChangelogModel Versioning
    • Getting Started
        • Configuring a Classifier
        • Output Type
      • Batch Processing
LogoLogo
On this page
  • Classifier Configuration
  • Example API Usecases
  • Webhooks
  • Configurable Fields
  • Classifier Configuration Example
Core Document ProcessingClassification

Configuring a Classifier

Was this page helpful?
Previous

Classifier output types

Next
Built with

Classifier Configuration

“Classifiers” categorize documents into predefined types. These can be configured via either the UI or the API.

Example API Usecases

  • Create a classifier with a given config - Set up a new classifier with your configuration
  • Update a classifier with a given config - Modify an existing classifier’s configuration
  • Run a classifier with config overrides - Execute a classifier with optional config overrides using classifier.overrideConfig

Webhooks

You can consume classification outputs via webhooks, track updates to your classifier, and more. See Webhook Events for details.

Configurable Fields

You can view full details of the ClassifyConfig in our API reference.

When working with the ClassifyConfig, you can configure several key aspects, such as:

  • Classifications - Define the categories and rules for document classification
  • Classification Rules - Custom instructions that guide how the classifier categorizes documents
  • Base Processor - Specify which classification model to use (required)
  • Advanced options - Configure context limits, multimodal processing, memory, page ranges, and other specialized settings
  • Parse Config - Configure how documents are parsed before classification

Classifier Configuration Example

1const classifyConfig = {
2 baseProcessor: "classification_performance",
3 classifications: [
4 {
5 id: "invoice",
6 type: "INVOICE",
7 description: "Standard invoice document ...",
8 },
9 {
10 id: "bill_of_lading",
11 type: "BILL_OF_LADING",
12 description: "Bill of Lading document ...",
13 },
14 ],
15 classificationRules: "- If ...", // Optional custom rules
16 parseConfig: {
17 target: "markdown",
18 chunkingStrategy: { type: "page" }
19 }
20};