← All questions
System DesignVery Hard· Document Indexing· Infrastructure Cost· Multimodal RAG

Your team is split: one engineer wants to migrate the e...

The correct approach is to avoid an abstract philosophical choice and instead perform a quantitative analysis. By segmenting the corpus, you can apply the document-as-image index only to the layout-heavy documents where OCR error is a significant issue, while using a more efficient index for the plain prose documents. By calculating the specific storage multiplier for the relevant slice, you can design a hybrid index that satisfies the technical requirements while remaining within the fixed infrastructure budget.

Code playground (Python)