RAG for Everyone

← Back to practice

Chapter 6 Interview Prep35 min review

Interview Questions: Parsing and Cleaning

Use these to practice explaining parser quality like a production RAG engineer.

01

Why does parsing quality affect RAG answer quality?

Strong answer: parsing determines what evidence reaches chunking, embeddings, retrieval, and citations. Broken extraction creates broken evidence.
Follow-up: give an example where a table parsing error changes a final answer.
02

What should a parser contract include?

Strong answer: source id, format, extracted blocks, structure, metadata, source positions, quality score, warnings, and readiness state.
Follow-up: which fields are mandatory for citations?
03

How do you clean HTML for RAG?

Strong answer: extract main content, remove navigation and boilerplate, preserve headings, anchors, canonical URL, and crawl timestamp.
Follow-up: how would you detect repeated boilerplate?
04

Why is OCR confidence important?

Strong answer: low-confidence OCR can corrupt numbers, names, dates, policy limits, and identifiers. It should trigger review or rejection.
Follow-up: what threshold would you use for high-risk documents?
05

What is the danger of aggressive deduplication?

Strong answer: similar text may represent different versions, jurisdictions, or exceptions. Deduping by text alone can delete meaningful differences.
Follow-up: what metadata should guide deduplication?
06

How do parser upgrades affect production RAG?

Strong answer: they can change extracted text, chunks, embeddings, retrieval ranking, citations, and answer behavior, so they need regression tests.
Follow-up: what would you compare before and after a parser upgrade?
07

How should tables be prepared for retrieval?

Strong answer: preserve column headers, row ids, units, source position, table caption, and relationships between cells.
Follow-up: when would you keep table rows separate from narrative text?
08

What is a parser quality gate?

Strong answer: a rule that decides whether parsed output is ready for chunking, needs review, or should be rejected.
Follow-up: name three gate signals.
09

Why preserve source positions?

Strong answer: citations, audits, debugging, and reviewer trust depend on page, section, row, URL anchor, timestamp, or bounding-box traceability.
Follow-up: how would you represent source positions for CSV and PDF?
10

How do you prevent cleaning from breaking access control?

Strong answer: treat access and sensitivity labels as non-removable metadata and validate they survive every transformation.
Follow-up: what should happen if access labels are missing?
← Practice BankProject →