Files
mDMS/infra
mAi a2fa76a41a mAi: #4 - paperless-AI prompt: intra-scan dedup + short-brand prefix match
Two prompt-only rules added to address follow-ups from #3:

1. Intra-scan dedup (new rule 4 in Correspondents section): when
   processing multiple docs from the same sender in one scan batch,
   reuse the correspondent name created earlier in the same session
   instead of letting each doc create a fresh alias. Triggered by
   paperless-AI creating 3 Praxis-Irle aliases in one batch (no native
   batch-context plumbing; best-effort via prompt).

2. Short-brand prefix match (extension of Fuzzy-Regel): if OCR name is
   a strict prefix of an existing correspondent (or vice-versa) and
   the first 2 brand tokens match, use the existing correspondent.
   Triggered by 'Hogan Lovells' creating a new correspondent despite
   'Hogan Lovells International LLP' already existing.

Deployed via push_system_prompt.py --apply, container restarted, both
strings verified present in /app/data/.env (backup at
.env.bak.20260521T092606). Effectiveness will be observed as
multi-doc scans flow through.
2026-05-21 11:26:40 +02:00
..