All jobs / AI engineer / Document AI
AI engineer interview question · 0–1 years
Two PDFs look identical on screen, but your parser gets clean text from one and nothing from the other. Why, and what does ingestion need?
The strongest answer
One has a text layer; the other is a scan — page images — and needs OCR or a vision model first. Check per page: files mix both, and a text layer can itself be bad OCR
Why it works
Right — “PDF” says nothing about whether there is text inside. Per-page detection matters because real files mix typed pages, scans and poor text layers.
What a good answer covers
- A PDF may hold text or only pictures.
- Detect a text layer per page.
- Scans need OCR or a vision model.
- Never drop failed files silently.
Answers that fall short
- Close, but not the strongest: The second file is a scanned document, so I would run OCR on the files that come back with no text
Correct diagnosis; the gap is granularity. Whole-file checks miss the scanned appendix inside a digital PDF, and non-empty text is not always good text. - Weak: The second PDF is probably corrupted or password-protected; ask the user to export it again and re-upload it
Possible, but the common cause is simpler: a scanner produces pictures of pages, and there is no text to extract. - Red flag: Skip the files that return no text; most documents work, and the index will not miss a few of them
Silently dropping documents means the assistant answers as if they did not exist, and nobody knows. Log and surface every ingestion failure.
Who gets asked this
More Document AI questions
- Why is “just extract the text from the PDF” harder than it sounds?
- Your document Q&A is good on prose but wrong on figures that come from tables. In the extracted text, a table…
- How do you chunk a long contract or manual that has headings, numbered clauses, tables and figures?
- A legal team will only use your contract assistant if every answer points to a real page and clause. How do…
- In your equipment manuals the wiring diagrams and annotated screenshots carry the key information. The…
- A customer’s legal team asked your contract assistant whether a 300-page agreement had an auto-renewal…
- Your service extracts supplier, totals and bank details from invoices in hundreds of layouts. Finance wants…