All jobs / AI engineer / Document AI
AI engineer interview question · 1–3 years
Your document Q&A is good on prose but wrong on figures that come from tables. In the extracted text, a table appears as one long run of numbers.
What do you change?
The strongest answer
Flattening lost which number sits under which header. Use a layout-aware parser to extract tables as rows with headers, keep each table whole with its caption, repeat headers if split, and add table questions to the evals
Why it works
Right — a table’s meaning is in its grid. Preserve headers and rows through extraction and chunking, and measure it with table questions.
What a good answer covers
- A table’s meaning is its grid.
- Extract rows with their headers.
- Keep the table and caption together.
- Test with questions about tables.
Answers that fall short
- Close, but not the strongest: Make the chunks bigger so that the whole table and the text around it land in the same chunk
Keeping the table together helps, but a bigger chunk of scrambled numbers is still scrambled. The structure has to survive extraction. - Weak: Use a stronger model for answering; a better model will work out which number is which
No model can recover a column header that the extraction threw away. Fix the input before upgrading the reader. - Red flag: Tell users the assistant does not do tables, and leave the table text in the index as it is
Leaving scrambled table text in the index means it still gets retrieved and still produces confident wrong figures.
Who gets asked this
More Document AI questions
- 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…
- Two PDFs look identical on screen, but your parser gets clean text from one and nothing from the other. Why…
- Why is “just extract the text from the PDF” harder than it sounds?