Constrain local document-date extraction before updating Paperless
At a glance
A Paperless user improves local date extraction by putting document content before strict output instructions for Qwen. This workflow is listed under Document Processing, Local AI, Structured Extraction.
- Agents / tools
- Paperless-ngx, paperless-gpt, Ollama, Qwen2.5
SourceBuilding a tool for these workflows? See weekly rates.
What they did
1) Setup: Have Paperless-ngx documents, its API token, a connected paperless-gpt instance, and Ollama able to run qwen2.5:32b-instruct. The discussion uses German documents, TOKEN_LIMIT=3000, and OLLAMA_CONTEXT_LENGTH=8096. 2) Edit the created-date prompt in paperless-gpt's Settings and persist its prompts directory. Put {{.Content}} first, then the task and rules, supplying {{.Title}}, {{.Language}}, and {{.Today}} as context. 3) Require one YYYY-MM-DD value without explanation. For a year alone use January 1; for year and month use day 1. The shared template returns today's date when no date can be resolved. 4) Finish: Process a document through the manual review flow, compare the proposed date with its text, correct any fallback or partial date, and apply the checked metadata.
How it went
The author found Qwen more reliable than deepseek-r1 for following date-format instructions across repeated document tests.
Worth knowing
Fallback and padded dates are not evidence that a complete original date was present.