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
  • Classify Output Type
  • Type Definition
  • Example
  • Shared Types
  • Type Definition
  • Example
Core Document ProcessingClassification

Classifier output types

Was this page helpful?
Previous

Generate Edit Schema

Next
Built with

Classifier outputs follow standardized formats. Understanding this format is essential when working with evaluation sets, webhooks, and API responses.

Classify Output Type

Type Definition

1type ClassifyOutput = {
2 id: string;
3 type: string;
4 confidence: number;
5 insights?: Insight[];
6};

Example

1{
2 "id": "invoice",
3 "type": "invoice",
4 "confidence": 0.95,
5 "insights": [
6 {
7 "type": "reasoning",
8 "content": "Document contains itemized charges and payment terms"
9 }
10 ]
11}

Shared Types

Certain types are shared across different run outputs. These provide additional context and information about the classifier’s decisions.

Type Definition

1type Insight = {
2 type: "reasoning"; // Currently only reasoning is supported
3 content: string; // The explanation or reasoning provided by the model
4};

Example

1{
2 "insights": [
3 {
4 "type": "reasoning",
5 "content": "This was classified as an invoice because it contains standard invoice elements including an invoice number, billing details, and itemized charges."
6 }
7 ]
8}

Insights can appear in both extraction and classification outputs to provide transparency into the model’s decision-making process. They are particularly useful when debugging or validating run results.