Key Takeaway: Why naive OCR destroys financial table alignment, how Markdown/HTML table serialization preserves row-column semantics, and how to validate extraction fidelity.
1. Why Plain Text OCR Breaks Financial & Scientific RAG
Standard $1.50/1k text-only OCR flattens multi-column pages and merged header cells into single reading-order strings, detaching dollar figures from their fiscal year columns. Downstream embedding models then retrieve corrupted context chunks and trigger silent numerical hallucinations.
2. Markdown vs HTML Table Serialization
Simple rectangular tables serialize cleanly into GitHub-Flavored Markdown (`| Col A | Col B |`) via Mistral OCR or Azure Layout. However, financial statements with `colspan` and `rowspan` merged headers require HTML table tags (supported by Azure Layout and prompted VLMs) so downstream LLMs retain exact parent-child header hierarchies.
3. Preserving Bounding Boxes for Auditable Citations
In legal discovery, healthcare coding, and insurance underwriting, end users must click a citation and jump directly to the highlighted region on the original PDF scan. Azure Document Intelligence, AWS Textract, Google Document AI, and Qwen2.5-VL provide normalized polygon/bounding-box coordinates that plain LLM transcription omits unless explicitly requested.
4. Measuring Table Extraction with TEDS & Golden Sets
Evaluate candidate parsers on 50–200 real production documents spanning skewed phone photos, multi-page spanning tables, checkboxes, and handwritten marginalia. Track Tree-Edit-Distance-based Similarity (TEDS) for table structure and exact-match accuracy on monetary totals (verifying row sums cross-foot programmatically).