Skip to main content

Document Classification

Campbooks uses AI to automatically classify documents, determine their type, and extract relevant information — then learns from the corrections you make.

How classification works

  1. When a document is created from an email attachment (or uploaded), it enters the processing queue.
  2. A vision-capable model analyzes the document's pages to determine its type.
  3. The AI extracts structured data — vendor name, amounts, dates, invoice numbers, and any custom fields on the type.
  4. The document is typed and categorized, ready for your review.

Document analysis needs a vision model. Classification reads the document as an image, so it requires a vision-capable provider — OpenAI, Anthropic (Claude), or Gemini. Text-only providers (DeepSeek, Mistral) can power chat and triage but not document analysis. See AI Configuration.

Configuring AI for classification

Classification uses the Document Analysis AI service:

  1. Go to Settings → AI and add an AI provider (the simplest is OpenAI, which also covers embeddings).
  2. Make sure a vision provider is assigned to document analysis.

If no AI provider is configured, attachments are still saved as documents — they just stay unclassified until you add one.

Custom document types

You can define your own types:

  1. Go to Settings → Document Types.
  2. Add a type with a name, a description, and any fields you want extracted.
  3. The AI starts recognizing the new type alongside the built-in ones.

Reviewing and correcting

AI classifications aren't final — you're the approver:

  • Approve the classification if it's right.
  • Reclassify to a different type if the AI got it wrong.
  • Reprocess to re-run analysis.

The learning loop

Every correction is remembered. When you reclassify a document or fix its sender's typical category, Campbooks records that signal and uses it to classify similar documents and senders more accurately next time — so the system gets better at your paperwork the more you use it.

Providers and models

Document analysis runs on whichever provider you assign to it. Any of the vision-capable providers work:

ProviderVisionNotes
OpenAIRecommended — also powers embeddings for semantic search
Anthropic (Claude)Strong document understanding
GeminiGoogle's models
DeepSeekText only (chat/triage)
MistralText only (chat/triage), EU-hosted

You can mix providers across services — for example, a fast, cheap text model for email triage and a capable vision model for document analysis. See AI Configuration for the full list of services and models.