RAG & Retrieval · Ground answers in evidence

How do you handle tables, images and scanned PDFs?

MediumparsingtablesmultimodalUpdated Oct 2026
Quiz this track

Short answer

Preserve tables as structured text with headers repeated per row, describe images or use a multimodal model, and OCR scans with confidence checks. Naive text extraction destroys all three.

A table flattened into a stream of numbers loses its column meaning. An image has no text layer at all. A scan may be OCR'd into plausible-looking garbage. Each format needs a representation that keeps enough structure for the model to interpret it correctly.

  • Tables: convert to Markdown or JSON, repeat headers, keep units and captions.
  • Charts and diagrams: store a description plus the surrounding text, or index page images for a multimodal model.
  • Scans: OCR, flag low-confidence regions, and keep the page image for verification.
  • Large tables: index summaries and row groups rather than one giant chunk.
For numeric questions, prefer a tool or SQL query over asking the model to read numbers out of a table. Retrieval can supply the context; computation belongs in code.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1How would you make a large financial table retrievable?
  2. 2When would you use a multimodal embedding instead of OCR?
  3. 3How do you evaluate table extraction quality?

Say it in the interview

I preserve structure. Tables become Markdown or JSON with headers repeated, charts get descriptions alongside the surrounding text, and scans go through OCR with confidence checks. For very large tables I index summaries and row groups instead of one giant chunk. If the user needs a calculation, I would query the data with a tool rather than ask the model to read numbers out of retrieved text.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live RAG & Retrieval mock interview and get scored feedback on depth, clarity and confidence.