Classify household documents with a local model and enforced JSON
At a glance
A Paperless user connected LM Studio to Paperless AI and processed a document batch locally with structured output. This workflow is listed under Life Admin, Documents, Local AI.
- Agents / tools
- Paperless AI, Paperless-ngx, LM Studio, DeepSeek R1 Distill
SourceBuilding a tool for these workflows? See weekly rates.
What they did
1) Start with connected Paperless AI and Paperless-ngx instances, plus LM Studio on a reachable computer. Load DeepSeek-R1-Distill-Llama-8B-Q4_K_M.gguf and start its Developer server on port 1234; the source used LM Studio 0.3.9 and an RTX 2060. 2) In LM Studio's Developer server settings, enable Structured Output and save this schema: {"type":"object","properties":{"title":{"type":"string"},"correspondent":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"document_type":{"type":"string"},"document_date":{"type":"string","format":"date"},"language":{"type":"string"}},"required":["title","correspondent","tags","document_type","document_date","language"]}. 3) In Paperless AI, choose Custom provider, the server's LAN address with port 1234 and /v1, key 0, and model deepseek-r1-distill-llama-8b. Prompt for concise titles, sender names, existing tags, dates and document language. 4) Process a batch and inspect the saved metadata for omissions and unwanted tags.
How it went
The poster processed 95 of 100 documents, reporting approximately ten seconds per document.
Worth knowing
Tag reuse was weak and languages were mixed. The source increased context to 13k for larger documents.