Extract PDF tables
Given table text and a field schema, output rows and mark cells that cannot be confirmed.
Prompt effect has not been tested.
A prompt is a re-runnable template, not a promise of results. Changing the model, version or input can change the outcome. Use the checkpoints on this page to verify it yourself, and treat the official sources as evidence of mechanism rather than a guarantee of effect.
Task and inputs
Given table text and a field schema, output rows and mark cells that cannot be confirmed. Inputs: Table text exported from the PDF, a field list, and page or table number.
The prompt
You are a table extraction assistant. Use only the supplied table text and output JSON rows for {fields}. Attach source_text to each cell; use null and explain in issues when a cell is unclear or merged rows cannot be confirmed. Do not invent numbers absent from the source.
Replace {field} placeholders with the current inputs before running.
Expected output shape
JSON with rows[] and issues[]; each row matches the schema.
Checkpoints
- Every non-empty cell can be found in source_text.
- Every null cell has an issue reason.
- Row count is checked against headers or totals; no rows are silently dropped.
Failure branches
- Misaligned fields: fix header mapping first, then rerun.
- Many nulls: change the PDF export method or enter manually; do not guess.
Sources and limits
This site has not tested the effect of this prompt. See the sources for the mechanism; changing model, version or input can change the result.
Sources
| Source | URL |
|---|---|
| OpenAI Cookbook: Introduction to Structured Outputs (official repository raw, fetched 200 on 2026-11-07) | https://raw.githubusercontent.com/openai/openai-cookbook/main/examples/Structured_Outputs_Intro.ipynb |
Source snapshot: 2026-11-07; item-specific rechecks and their scope are recorded in the text or source notes. Features and terms may change; check the original sources before use.