Extract PDF Details
Extract only information supported by the PDF and make every result easy to verify.
Workflow
- Confirm the input PDF and infer the requested fields and output format from the user's prompt. If no fields are specified, extract a practical document summary plus the main labeled facts; do not dump all text by default.
- Inspect the PDF before extracting:
- Determine the page count and whether pages contain selectable text, scans, tables, forms, diagrams, or mixed content.
- Use the available PDF-reading tools for text and layout extraction.
- Render relevant pages when layout, images, labels, or table structure affect meaning.
- Apply OCR to scanned or image-only pages. Inspect the rendered page when OCR is uncertain.
- Search the whole document for each requested field, including synonyms and repeated labels. Preserve relationships between labels, values, units, variants, footnotes, and table headers.
- Normalize the result only when safe:
- Preserve identifiers, SKUs, model numbers, dates, units, decimal precision, capitalization, and leading zeroes.
- Keep the original value when normalization could alter meaning.
- Separate multiple values instead of silently choosing one.
- Verify every extracted value against its page. Recheck nearby text, table headers, footnotes, and continuation pages.
- Return the result in the user's requested format. If none is specified, use a compact Markdown table with Field, Value, Page, and Notes columns.
Evidence and Quality Rules
- Cite PDF page numbers for extracted facts using
p. Norpp. N-M. When printed page numbers differ from PDF page indexes, state which numbering is used. - Do not infer a value from branding, filename, visual resemblance, outside knowledge, or another document unless the user explicitly requests inference or comparison.
- Use
Not foundfor an absent field andUnclearfor an unreadable or ambiguous value. Briefly state what caused the uncertainty. - Flag conflicts when the same field has different values in different places; report all conflicting values with their pages.
- Treat OCR output as provisional. Visually verify easily confused characters such as
0/O,1/I/l,5/S, punctuation, and decimal separators. - Do not expose hidden document metadata as a document fact unless the user asks for metadata.
- Never overwrite the source PDF.
Structured Output
When JSON is requested:
- Use the user's field names as keys when possible.
- Return valid JSON without commentary inside the JSON block.
- Represent missing values as
null, not invented placeholders. - Add a separate
_evidenceobject mapping fields to page numbers and concise notes unless the user supplies an exact schema that forbids extra keys.
When CSV or spreadsheet output is requested:
- Use one row per logical record, such as a product, invoice line, specification variant, or document.
- Repeat shared document identifiers where needed so every row remains understandable on its own.
- Keep source-page information in a dedicated column.
Completion Check
Before responding, confirm that:
- every requested field is present,
Not found, orUnclear; - every reported fact has page evidence;
- tables and multi-column text were read in the correct order;
- OCR-sensitive values were visually checked;
- units and variants remain attached to the correct values; and
- the output matches the requested schema or format.