Your RAG system must handle scanned PDFs, tables and slides. How do you ingest them?
RAG · Intermediate 2
Short answer
Parsing quality caps everything after it. Use a layout-aware parser such as Docling or Unstructured that keeps headings, reading order and tables; run OCR on scanned pages; turn tables into Markdown or row-wise text with headers; and keep page numbers and titles as metadata. Spot-check parsed output against the originals before tuning anything else.
Deeper answer
Plain text extraction often scrambles columns, drops tables or merges headers into body text. For slides and image-heavy pages, a vision-language model can describe charts, or you can index page images directly with multimodal retrieval.
Build a small ingestion test set: a few tricky documents with known content, and check that facts from tables and footnotes survive parsing. Re-run it whenever you change the parser.
What a strong answer covers
- Parsing quality limits everything downstream
- Layout-aware parser keeps structure
- OCR for scanned pages
- Tables converted with headers
- Keeps metadata and spot-checks output
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- How would you represent a large table so retrieval works?
- When would you index page images instead of text?
Common mistakes
- Tuning embeddings while parsing is broken
- Losing page numbers needed for citations
Learn it
- How do you choose a chunk size for RAG?
- Your RAG app gives wrong answers. How do you find the cause?
- Design a RAG system that lets a law firm search and ask questions about 50,000 contracts.
- How would you detect hallucinations in a production RAG application?
- What are embeddings, and how are they used in search?
- How do you make a RAG system cite sources and stay grounded?
- What are hybrid search and reranking, and when do they help?
- How do you keep a RAG index up to date as documents change?
- How do metadata filters improve retrieval?
- How would you build RAG over documents full of charts and images?
- How do you make sure users only get answers from documents they are allowed to see?
- What are query rewriting and HyDE, and when do they help?
- Your HR assistant keeps quoting last year's leave policy. How do you fix it?
- Tell me about a RAG system you built and how you measured whether it worked.
- Can you do retrieval for long documents without a vector database?
- What is RAG, and why would you use it?
- When would you use graph RAG instead of standard vector RAG?