Key takeaways
- A table is more than cells: column heading, row label, unit, period and footnote jointly define meaning.
- Store document identity, version, page and section with extracted content, and assign a quality state to each document.
- Combine extraction, structural checking, provenance and subject review before optimizing chunk size or model choice.
Start with the claims users need from the document. Finding one clause differs from comparing several table rows. A useful pipeline combines extraction, structural checking, provenance and subject review before optimizing chunk size or model choice.
01 / 15
Which three PDF types should you distinguish?
RAG preparation distinguishes three PDF types; the differences affect quality, cost and diagnosis.
| PDF type | What it contains |
|---|---|
| Digitally generated PDF | May contain usable text |
| Scan | Starts as page images and needs character recognition |
| Mixed document | Contains both, sometimes with competing representations of the same content |
Selectable text is not enough. Its internal order can still be wrong, especially with columns or freely positioned text boxes. An existing OCR layer can also be inaccurate or obsolete.
Record the extraction route and problematic pages for each document. An unreadable appendix in a large manual should not silently appear as an empty successfully processed page. Give it an explicit review state.
02 / 15
Collect the required questions first
Choose questions that actually depend on the document: identify a product code, explain a prerequisite, report a table value with its unit or apply an appendix exception. Mark the correct passage in the original before ingestion.
These references make failures diagnosable. If a number disappears, you can determine whether extraction lost it, chunking separated it or retrieval failed to select it. Without a reference, every failure looks like a general AI problem.
Include difficult pages deliberately: skewed scans, small print, multiple columns, repeating headers and tables crossing page boundaries. Evaluating only clean opening pages overestimates integration quality.
03 / 15
How do OCR and layout analysis differ?
OCR recognizes characters. Layout analysis additionally attempts to identify paragraphs, headings and tables. Microsoft documents text and structural output for Document Intelligence layout analysis. Available formats and capabilities depend on the selected version. Microsoft: document layout analysis.
Detected structure still needs checking. A table boundary can be correct while a number is assigned to the wrong column. A high overall recognition score does not prove the decisive deadline was read correctly.
Identify important fields for review. Product codes, amounts, units, dates and negation can change a decision more than an incorrectly recognized filler word. Prioritize evaluation according to those consequences.
04 / 15
Repair reading order and repeated elements carefully
Simple extraction may interleave two columns line by line. The resulting sentences can look plausible while corresponding to no actual paragraph. Compare the extracted sequence with the page section by section.
Repeated headers and footers can dominate every chunk. Remove or label them deliberately while preserving version information and page references. Blindly deleting the first and last lines can destroy meaningful notes.
Line-end hyphenation also needs care. Joining words must not alter product identifiers. Retain the original representation or a traceable mapping when normalizing text for retrieval.
05 / 15
Preserve relationships inside tables
A table is more than cells. Column heading, row label, unit, period and footnote jointly define meaning. If ingestion separates them, a correct number can become a wrong claim.
Each element of a table needs its own check before the table enters a RAG collection:
| Element | Required check |
|---|---|
| Column heading | Does the value belong to the right variant? |
| Row label | Is the correct product identified? |
| Unit | Units, euros, percentage or another measure? |
| Time reference | Month, year, snapshot or effective period? |
| Footnote | Does an exception change interpretation? |
| Continuation | Are rows on the next page part of the same table? |
Smaller row groups with relevant headings repeated may support retrieval. Calculations often need a validated structured representation instead. Choose based on the question rather than the file extension.
06 / 15
A synthetic footnote example
A fictional price table lists 120 for Product A and 95 for Product B. Its heading specifies a monthly service amount in euros. A footnote adds a charge for a particular contract variant. These are not actual vendor prices.
The assistant must not turn “120” into a one-time purchase price. A question about the specified contract variant also requires the footnote. Linking to the correct PDF does not make an incorrect interpretation valid.
Acceptance should check number, unit, period and exception separately. If extraction omitted the footnote, correct the source representation or block that question's answer path. Additional model instructions cannot reliably replace missing evidence.
07 / 15
Why is retrieval not complete table computation?
“What value is listed for Product A?” may be answerable from one passage. “What is the total of every line?” requires all relevant rows and a dependable calculation. A handful of similar search results is insufficient.
For repeated analysis, extract structured fields and validate them against the original. Use a deterministic calculation afterward. The model may explain the result but should not infer completeness from a partial retrieved context.
Check selection conditions as carefully as arithmetic. “All Austrian entries in September” requires location and date mapping. Correct addition over the wrong rows remains substantively wrong.
Got a workflow like this?
Tell me about it. Honest take and a rough price, usually within a day.
08 / 15
Keep image interpretation traceable
Some facts exist only in diagrams or technical drawings. Text-only extraction cannot capture them completely. Additional image analysis may help but needs its own evaluation and provenance.
Distinguish recognized labels from interpreted conclusions. A generated chart description is a derivative that may contain errors. Retain the image or precise page reference so a reviewer can inspect the origin.
For critical dimensions, circuit diagrams or safety instructions, an automatically generated description should not replace the original without appropriate specialist review. Showing the relevant region and requesting verification may be more useful than asserting a seemingly exact interpretation.
09 / 15
Preserve citations down to the page
Store document identity, version, page and section with extracted content. Where useful and available, coordinates can identify the exact region. An answer should lead users to the evidence actually used.
Define page-number conventions. The third PDF page may display printed page number one. Mixing these makes verification unnecessarily difficult. Decide which numbering the interface shows.
Pages can move between versions. An old citation must not silently point to a different statement. Resolve source and version together or clearly indicate that the referenced revision has been replaced.
10 / 15
Assign a quality state to each document
Each document in a RAG collection should carry one of these quality states:
- fully reviewed
- usable with limitations
- unusable
A limitation might mean that prose is available while a significant table awaits approval. That state should affect which questions the assistant may answer.
Decide who corrects problematic pages. Options include rescanning, manual structured entry or excluding the source. The model must not fill gaps from neighboring patterns and present them as original text.
Keep corrections traceable. If someone repairs a misread product code, associate it with the correct document version. Otherwise the next import may overwrite it or incorrectly apply it to changed content.
11 / 15
Plan extraction and access together
A cloud extraction service receives document content. Before upload, verify whether that environment and processing arrangement are suitable for the source. Converting an internal file into text does not make it less sensitive.
Derived text, tables and images require appropriate restrictions matching their relevant source. Inspect previews, temporary files and review interfaces. Protecting the main index is insufficient if extracted page images are publicly accessible.
The RAG security guide covers manipulated sources. PDF text can contain instructions aimed at the assistant; extraction does not grant those instructions authority over application behavior.
12 / 15
Budget for reprocessing as well as initial import
Record page counts, formats, change frequency and the proportion of difficult documents. Initial ingestion and repeated processing are different cost categories. A small content correction should not necessarily require reprocessing the whole collection.
Version extraction software and settings. An improved parser may represent tables differently, creating new chunks and citations. Evaluate the change against a fixed reference collection before replacing every document.
Include human review effort. Automated extraction can appear inexpensive while correcting complex tables consumes substantial time. The relevant cost is reaching dependable usable information, not merely the charge per processed page.
13 / 15
How do you evaluate original and output side by side?
Specialist comparison. Have specialists answer selected questions from the originals and compare the assistant's responses. Every consequential claim should preserve number, unit, qualification and effective scope. Include questions the available document cannot answer.
Versions, deletion and access. Test new versions, deleted files and revoked access. Derived material must update or disappear accordingly. Removing the original PDF alone does not prove that its searchable passages were removed.
Retrieval comes afterward. Only then optimize retrieval further. The chunking guide covers passage boundaries, and the RAG acceptance plan connects extraction to the actual task.
Difficult-page sample. Keep a permanent sample of difficult pages for parser upgrades. Include the exact pages that previously failed, along with expected text and relationships. A new extractor should demonstrate improvement on those cases without regressing on ordinary documents. This small collection can provide much more useful evidence than a demonstration using unrelated vendor sample files.
Recorded exclusions. Record explicitly excluded material as part of acceptance. An unreviewed handwritten note or drawing should not appear reliably processed under a broad claim that PDFs are supported. Tell users what the system can extract based on what your tests have shown. If exclusions affect a question, the assistant should identify the missing evidence rather than imply that the complete file was considered. This gives users a meaningful basis for deciding when to consult the original document directly.
14 / 15
Take the worksheet
Worksheet
Download the editable CSV table
| Content | Preparation | Check |
|---|---|---|
| Text PDF | Text and headings | Reading order |
| Scan | OCR with page reference | Critical characters |
| Table | Rows, headers, units | Correct product/value relation |
| Footnote | Preserve qualification | Exception retrievable |
| Columns | Correct sequence | No mixed sentences |
Columns to fill in, in the file: Your value / observation, Owner, Next action.
Download the editable CSV table (CSV). Add your own values, owners and open actions. This worksheet contains no measured client results.
15 / 15
Related decisions
These modernagents guides cover related decisions about AI knowledge assistants:
- AI knowledge assistants: sources, access and answers
- Handle poor scans and handwriting in document capture
- Split RAG content without losing its meaning
- Diagnose wrong RAG answers and useful abstention
For a workflow review, start with the task, systems involved and typical exceptions. Discuss it with modernagents.



