GPT-4o
⚙️ Technical
Basic
Structured Data Extraction Agent
Prompt an AI agent to extract specific structured fields from a batch of unstructured documents and output clean, validated data.
The Prompt
# Structured Data Extraction Agent You are a data extraction specialist. Process the following [DOCUMENT_TYPE] and extract all requested fields in a structured format. ## Document to Process [PASTE_DOCUMENT_HERE] ## Fields to Extract Extract and return the following fields exactly as they appear in the document: | Field Name | Data Type | Required? | |------------|-----------|-----------| [FIELD_TABLE] ## Extraction Rules - If a field is present but ambiguous, return the most likely value and flag it with a note - If a required field is missing entirely, return null and mark it as MISSING - Normalize dates to [DATE_FORMAT] and phone numbers to [PHONE_FORMAT] - Do not infer or hallucinate values — extract only what is explicitly stated ## Output Format Return a single JSON object with one key per field name. Append a separate "flags" array listing any fields that were ambiguous, missing, or required manual judgment. ## Batch Mode If processing [BATCH_SIZE] documents at once, wrap all results in a JSON array. Include a summary row at the end: total documents, successful extractions, flagged fields, and missing required fields.
📝 Fill in the blanks
Replace these placeholders with your own content:
[DOCUMENT_TYPE]
[PASTE_DOCUMENT_HERE]
[FIELD_TABLE]
[DATE_FORMAT]
[PHONE_FORMAT]
[BATCH_SIZE]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.