Illustration of notes organized into trays and checklists.

How to extract document fields with AI and verify the result

To extract document fields with AI, define each field’s meaning and require a reference to its source passage. A tidy table or JSON output does not establish that values are correct.

This exercise uses a fictional internal-training announcement. You will prepare a reviewable extraction before copying anything into a spreadsheet or another system.

1. Choose the fields you need

List only information the task actually uses. For an event, title, date, time and venue may suffice without extracting participant names or unnecessary details.

Explain what each field means as well. “Date” could mean publication, event or registration date; resolve that distinction before prompting.

2. Define types and missing values

Agree on the format and behavior when information is absent. AI should not infer a venue from a city mentioned elsewhere without an explicit connection.

Field Exercise rule
event Name given in the announcement
event_date Event date, not publication date
time Preserve timezone when stated
venue Do not infer from the organization
evidence Passage supporting the value

Use a consistent marker for missing information. That makes gaps reviewable instead of hiding an assumption inside a completed cell.

3. Request a small initial extraction

Begin with a document you can read in full. Separate your rules from the material and identify which version was supplied.

Extract event, event_date, time and venue from the fictional announcement.
For each field, return the value, a short literal supporting passage and ambiguity notes.
Use “not found” if the information is absent from the document.
Do not infer the year or city from outside context.
Do not confuse publication date with event date.
Do not change systems: return only a table for review.

ANNOUNCEMENT
Published March 4. Editing workshop: March 12, at 2pm.
Venue to be confirmed. Materials will be sent later.

The answer should leave venue and year unconfirmed. Convincingly filling those gaps would be an error rather than completeness.

4. Check content before the final structure

Compare every value with the document, including units, dates and uncertainty indicators. A field correct by coincidence remains unsuitable if the evidence does not support it.

The OpenAI structured-output documentation discusses working with defined formats. This exercise does not assume every chat provides a technical schema guarantee merely because you requested JSON.

Also examine duplicated fields and labels that the tool silently renamed. Those changes can break a later import even when a person can understand the displayed result.

5. Then adapt to a table or JSON

After review, choose the format the next stage requires. For automatic consumption, validate types and values appropriately outside text generation too.

An ambiguous date should not silently become a definitive formatted value. Keep the original and the open question until missing information is obtained.

Write down whether blank, missing and explicitly unavailable values are distinct in your workflow. A system importing the result should not accidentally treat all three as a confirmed empty answer.

Common mistakes

Vague field names, truncated documents and reliance on a table’s visual appearance create hard-to-notice failures. Treating “not found” as equivalent to “does not exist” is another error.

Information might belong to a section that was not provided. Record what material was analyzed to limit that conclusion correctly.

Acceptance criterion

Every completed field needs support in the original, and each gap must follow the agreed convention. Another person should be able to repeat the check without guessing your interpretation.

For larger files, see dividing long documents. For organizing requests, use separate instructions and data.

Frequently asked questions

Does a valid table or JSON guarantee correct data?

No. The structure may be valid while values are wrong; check evidence in the document.

How should a missing field be represented?

Define a consistent marker such as not found or null according to the chosen format, without filling gaps by assumption.

Should extraction be written directly into a system?

Validate format and values before any change. This tutorial produces a review draft, not permission to write data.