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
- When a document is created from an email attachment (or uploaded), it enters the processing queue.
- A vision-capable model analyzes the document's pages to determine its type.
- The AI extracts structured data — vendor name, amounts, dates, invoice numbers, and any custom fields on the type.
- 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:
- Go to Settings → AI and add an AI provider (the simplest is OpenAI, which also covers embeddings).
- 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:
- Go to Settings → Document Types.
- Add a type with a name, a description, and any fields you want extracted.
- 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:
| Provider | Vision | Notes |
|---|---|---|
| OpenAI | ✓ | Recommended — also powers embeddings for semantic search |
| Anthropic (Claude) | ✓ | Strong document understanding |
| Gemini | ✓ | Google's models |
| DeepSeek | — | Text only (chat/triage) |
| Mistral | — | Text 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.