Extracting Information
AI can extract specific information from documents quickly. Extraction prompts work best when you tell AI exactly what to look for and how to format the extracted data.
10 min•By Priygop Team•Updated 2026
Information Extraction Prompt Examples
- Names and contacts: 'Extract all names and email addresses from this document. Format: Name | Email, one per line.'
- Key numbers: 'Extract all financial figures from this report. Include: the metric name, the value, and the context (what it refers to).'
- Dates and deadlines: 'List all dates and deadlines mentioned in this document. Format: Date | Event | Responsible party.'
- Action items: 'Extract all action items from these meeting notes. Format: Action | Owner | Deadline.'
- Key claims: 'List the 5 most important claims made in this research summary. Include the page or section reference if available.'
Extraction Prompt Best Practices
Extraction Prompt Best Practices
# Information extraction best practices
extraction_prompt = """
Extract [WHAT TO EXTRACT] from this document.
Format the output as:
[SPECIFY THE EXACT FORMAT, e.g. Column 1 | Column 2 | Column 3]
If [ITEM] is not found in the document, write 'Not mentioned'.
Do not add information that is not in the document.
[PASTE DOCUMENT]
"""
# Key best practices:
# 1. Specify exactly what to extract
# 2. Define the output format precisely
# 3. Tell AI what to do if the item is missing
# 4. Include 'do not add information not in the document'
# 5. Always verify the extraction against the original
print("Extraction prompts need precise instructions on what to find.")
print("Always verify extracted data against the source document.")Diagram
Loading diagram…
Deep Learning ⊂ Machine Learning ⊂ Artificial Intelligence
Key Takeaways
- Extraction prompts should specify exactly what to look for and the output format
- Tell AI what to do when information is not found in the document
- Instruct AI not to add information that is not in the source
- Always verify extracted data against the original document
- Extraction is most reliable for structured information like names, dates, and numbers
Key Takeaways
- AI can extract specific information from documents quickly.
- Names and contacts: 'Extract all names and email addresses from this document. Format: Name | Email, one per line.'
- Key numbers: 'Extract all financial figures from this report. Include: the metric name, the value, and the context (what it refers to).'
- Dates and deadlines: 'List all dates and deadlines mentioned in this document. Format: Date | Event | Responsible party.'