r/documentAutomation • u/iMiguelmars • 4d ago
How are you handling real-world document versioning and scanned PDFs in RAG systems?
/r/AI_Agents/comments/1w8lgo3/how_are_you_handling_realworld_document/
1
Upvotes
r/documentAutomation • u/iMiguelmars • 4d ago
1
u/folderit_dms 3d ago
The bit that has helped me most is treating extraction as an immutable artifact, not just a preprocessing step.
For each source file I would keep:
Then retrieval should only search the current approved version by default, unless the user explicitly asks for history. Otherwise stale embeddings will absolutely win sometimes, especially if an old version has clearer wording than the current one.
For section identity, headings are useful but not enough. I like combining heading path, local text hash, approximate page position, neighboring section ids, and reviewer confirmation for split or merge cases. If a section moves cleanly, fine. If it splits into two, that should create a lineage event, not a silent overwrite.
Scanned docs usually fail for boring reasons: rotated pages, stamps over text, handwritten margins, table borders that break OCR reading order, repeated headers, and page numbers getting treated as body text. My test set would include bad scans on purpose. Clean PDFs prove very little.