fileAI Docs home page
Search...
⌘K
Ask AI
Status
Trust
Go to fileAI
Go to fileAI
Search...
Navigation
Key Functions
Extraction prompts
User Guide
API
MCP
Changelog
Website
Discord
Support
fileAI API
Introduction
Quick Start
Key Functions
Upload
AI OCR Models
AI Schemas
Supported Data Types
Extraction Prompts
Schema Locking
Processing Callback
Endpoints
GET
Get application health check
GET
Get workspace subscription
GET
Get project setting
PATCH
Update project setting
GET
Get all files
POST
Upload a file
PATCH
Approve a file type
POST
Create a file preview
GET
Get a file upload processing steps for that uploadId
GET
Get file ocr
GET
Get file type schemas
GET
Get file types
PATCH
Rename a file type
GET
Get file schema values by fileIds
DEL
Delete multiple files
GET
Get all schemas
PATCH
Patch a schema
PATCH
Rerun file form filling
PATCH
Update file schema
On this page
1. Be Explicit and Specific
2. Match Field Names Exactly
3. Use Clear Instructions
4. Set Expectations for Format
5. Provide Context When Necessary
6. Use Examples (if supported)
Key Functions
Extraction prompts
Copy page
Best practices for writing effective prompts to extract structured data in fileAI
Copy page
1. Be Explicit and Specific
Instead of “Extract important details”, use “Extract the invoice_number, total_amount, and due_date from the text.”
2. Match Field Names Exactly
Use field names as defined in your schema, e.g., customer_name, not name or client.
3. Use Clear Instructions
Example: “Extract the delivery_status_enum as one of: shipped, pending, delayed.”
4. Set Expectations for Format
For dates: “Extract received_date in the format YYYY-MM-DDTHH:MM:SSZ.”
For yes/no: “Is the payment confirmed? Respond with true or false.”
5. Provide Context When Necessary
If the field is ambiguous, clarify in the prompt
Example:“Extract the contract_date_time (the date the contract was signed, not created).“
6. Use Examples (if supported)
If your system supports few-shot prompting, include examples of expected input/output.
Supported Data Types
Schema Locking
Assistant
Responses are generated using AI and may contain mistakes.