Skip to content
Secnd

Document classification

Classify the document you can actually fit in the request.

Extract text with your own parser and retain a stable document ID. Check whether the relevant content fits the complete input-token limit; never silently classify a truncated document as if it were complete.

request
{
  "model": "ren-zero-2026-11-12",
  "type": "choice",
  "situation": "Document text: Invoice 0041. Amount due: 120 USD. Payment due within 30 days. This document requests payment; it does not confirm payment.",
  "question": "Which document class best fits the supplied text?",
  "options": [
    {"id": "invoice", "description": "Requests payment for goods or services"},
    {"id": "receipt", "description": "Confirms a completed payment"},
    {"id": "other", "description": "Neither class clearly fits"}
  ],
  "threshold": 0.9
}

On act, attach the class to the document record after checking it is allowed. Route other and ask_human to review. Treat API failures as incomplete processing.

Evaluate mixed documents, cover pages, quoted examples, poor extraction, and documents outside your taxonomy. Classification is not a reliable way to compute totals or extract legally binding payment terms.