> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elementum.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Elementum Intelligence File Reader

> AI-powered document analysis for complex text, image, and PDF documents with custom system prompts

The Elementum Intelligence File Reader uses AI to read and analyze text-based, image, and PDF documents. Configure custom system prompts to extract specific information and leverage multimodal AI Services like [OpenAI](/ai-agents/openai-setup) and [Google Gemini](/ai-agents/gemini-setup) to power intelligent document processing in [automation workflows](/workflows/automation-system).

## Key Features

* **AI-Powered Analysis** — Uses advanced AI models to understand document content and extract structured information.
* **Multimodal Support** — Process text documents, images, and PDFs with the same AI-powered approach.
* **Custom System Prompts** — Configure specific instructions to extract exactly the information you need.
* **Testing Interface** — Test your system prompts and field extraction before deploying in automations.

## AI Provider Support

The Elementum Intelligence File Reader works with multimodal AI Services:

### Supported AI Providers

<AccordionGroup>
  <Accordion title="OpenAI Models">
    **Best for**: Advanced reasoning and complex document analysis

    **Supported Models**:

    * **o3** - Maximum intelligence for complex document analysis
    * **o4-mini** - Fast processing for routine document tasks
    * **GPT-4 Omni** - Balanced performance for general document processing

    **Capabilities**: Text analysis, image recognition, PDF processing, complex reasoning
  </Accordion>

  <Accordion title="Google Gemini Models">
    **Best for**: Cost-effective multimodal document processing

    **Supported Models**:

    * **Gemini 2.5 Pro** - Advanced document analysis and large responses
    * **Gemini 2.5** - General-purpose document processing
    * **Gemini 1.5 Flash** - Speed-optimized document analysis

    **Capabilities**: Text analysis, image recognition, PDF processing, multimodal understanding
  </Accordion>
</AccordionGroup>

<Info>
  To use Elementum Intelligence File Reader, you must first configure an AI Provider and create an AI Service. See [AI Services](/ai-agents/ai-services) for setup instructions.
</Info>

## Supported Document Types

The Elementum Intelligence File Reader can process various document formats:

<AccordionGroup>
  <Accordion title="Text Documents">
    * **PDF** - Text-based and scanned PDFs
    * **DOC/DOCX** - Microsoft Word documents
    * **TXT** - Plain text files
    * **RTF** - Rich text format
    * **HTML** - Web pages and HTML documents
  </Accordion>

  <Accordion title="Image Documents">
    * **JPG/JPEG** - Compressed images with text
    * **PNG** - Portable network graphics
    * **TIFF** - Tagged image format
    * **BMP** - Bitmap images
    * **GIF** - Graphics interchange format
  </Accordion>

  <Accordion title="Complex Documents">
    * **Scanned documents** - AI can read text from scanned pages
    * **Multi-page PDFs** - Process entire documents or specific pages
    * **Mixed content** - Documents with text, images, and tables
    * **Handwritten text** - Basic handwriting recognition capabilities
  </Accordion>
</AccordionGroup>

## Creating an Elementum Intelligence File Reader

<Steps>
  <Step title="Prerequisites">
    **Required Setup**:

    * AI Provider configured ([OpenAI](/ai-agents/openai-setup) or [Gemini](/ai-agents/gemini-setup))
    * AI Service created for document processing
    * Access to test documents for validation
  </Step>

  <Step title="Navigate to File Readers">
    In your application, go to **File Readers** section
  </Step>

  <Step title="Create New Reader">
    Click **+ File Reader** and select **Elementum Intelligence** from the document type options
  </Step>

  <Step title="Configure Basic Settings">
    **Name**: Enter a descriptive name (e.g., "Contract Analysis AI")

    **Description**: Optional description for your team

    **AI Service**: Select your configured AI Service
  </Step>

  <Step title="Configure System Prompt">
    Write a custom system prompt that instructs the AI on what information to extract

    **Example**: "Extract the contract parties, effective date, termination date, and key obligations from this document."
  </Step>

  <Step title="Define Output Fields">
    Configure the fields you want the AI to populate based on your system prompt

    **Example Fields**: contract\_parties, effective\_date, termination\_date, key\_obligations
  </Step>

  <Step title="Test with Sample Documents">
    Upload test documents to validate that the AI extracts the correct information
  </Step>
</Steps>

## System Prompt Configuration

### Writing Effective System Prompts

The system prompt instructs the AI on how to analyze documents and what information to extract:

<Tabs>
  <Tab title="Basic Prompts">
    **Simple Extraction**:

    ```
    Extract the following information from this document:
    - Customer name
    - Order date
    - Total amount
    - Product descriptions

    Return the information in the specified fields.
    ```

    **Best for**: Simple, straightforward document analysis
  </Tab>

  <Tab title="Advanced Prompts">
    **Complex Analysis**:

    ```
    Analyze this legal contract and extract:
    - All parties involved (companies and individuals)
    - Contract effective date and termination date
    - Key financial terms and payment schedules
    - Important obligations and deliverables
    - Risk factors and penalty clauses

    For dates, use YYYY-MM-DD format.
    For financial amounts, include currency symbols.
    For obligations, provide detailed descriptions.
    ```

    **Best for**: Complex documents requiring detailed analysis
  </Tab>

  <Tab title="Industry-Specific Prompts">
    **Medical Reports**:

    ```
    Extract key information from this medical report:
    - Patient demographics (name, age, gender)
    - Diagnosis and conditions
    - Treatment recommendations
    - Medications prescribed
    - Follow-up instructions

    Maintain medical terminology accuracy.
    Flag any critical or urgent findings.
    ```

    **Best for**: Specialized domain documents
  </Tab>
</Tabs>

### System Prompt Best Practices

* **Be specific** — Clearly define what information to extract and in what format.
* **Provide context** — Explain the document type and purpose to help the AI understand context.
* **Define formats** — Specify date formats, number formats, and text formatting requirements.
* **Handle edge cases** — Include instructions for missing information or unusual formats.

## Field Configuration

Configure output fields that match your system prompt requirements:

### Field Types and Configuration

<AccordionGroup>
  <Accordion title="Standard Field Types">
    **Text Fields**:

    * **Text** - General text content
    * **Long Text** - Extended text content
    * **Email** - Email addresses with validation
    * **Phone** - Phone numbers with formatting
    * **URL** - Website addresses

    **Date and Time**:

    * **Date** - Date values (YYYY-MM-DD)
    * **DateTime** - Date and time values
    * **Time** - Time values only

    **Numeric Fields**:

    * **Number** - Integer values
    * **Decimal** - Floating point numbers
    * **Currency** - Monetary values
    * **Percentage** - Percentage values
  </Accordion>

  <Accordion title="Advanced Field Types">
    **Structured Data**:

    * **JSON** - Complex structured data
    * **Array** - Multiple values in a single field
    * **Boolean** - True/false values
    * **Enum** - Predefined options

    **Validation**:

    * **Required** - Field must be populated
    * **Optional** - Field can be empty
    * **Default Value** - Value to use if not found
    * **Format Validation** - Ensure data meets format requirements
  </Accordion>
</AccordionGroup>

## Testing and Validation

<Info>
  Always test your Elementum Intelligence File Reader with representative documents before using in production automations.
</Info>

Upload test documents similar to production, review extracted data for accuracy and format, test edge cases (missing info, unusual formats, poor quality), and refine the system prompt based on results. Test across different layouts, quality levels, and file formats to validate consistent extraction.

## Using in Automations

### Integration with Automation Workflows

The Elementum Intelligence File Reader integrates with [automation workflows](/workflows/automation-system) for sophisticated document processing:

```
Document Upload → Elementum Intelligence Reader → AI Classification → Create Record → Start Process
```

### Common Automation Patterns

<AccordionGroup>
  <Accordion title="Contract Analysis">
    **Trigger**: Email Received (contract attachment)
    **File Reader**: Extract contract terms, parties, dates
    **Actions**:

    * AI Classification to determine contract type
    * Create Record with extracted contract data
    * Start Approval Process for contract review
    * Send Email Notification to legal team
  </Accordion>

  <Accordion title="Invoice Processing">
    **Trigger**: Attachment Added (invoice PDF)
    **File Reader**: Extract vendor, amounts, line items
    **Actions**:

    * Search Records to find existing vendor
    * Run Calculation to validate amounts
    * Update Record Fields with invoice data
    * Start Approval Process based on amount
  </Accordion>

  <Accordion title="Form Processing">
    **Trigger**: Document Upload (application form)
    **File Reader**: Extract applicant information
    **Actions**:

    * Transform Data to standardize formats
    * AI Classification to assess application quality
    * Create Record for applicant
    * Send Email Notification with next steps
  </Accordion>
</AccordionGroup>

## Best Practices

* **Prompt engineering** — Use clear, specific language; include formatting instructions and examples of desired output; specify handling of edge cases.
* **Document quality** — Use high-quality documents when possible to improve AI accuracy.
* **Validation testing** — Test extensively with real documents before production deployment.
* **Error handling** — Implement automation logic to handle extraction errors gracefully.
* **Avoid** — Overly complex or ambiguous prompts, missing format specifications, unclear field definitions, and insufficient testing.

## Advanced Features

* **Multi-document processing** — Configure automations to handle multiple uploads; use AI to understand relationships and validate consistency across documents.
* **Dynamic field extraction** — Use AI Classification to detect document type, then route to the appropriate reader or prompt for optimized extraction.
* **AI search integration** — Use extracted data for indexing and search; build searchable knowledge bases from document insights.

## Error Handling and Troubleshooting

### Common Issues

<AccordionGroup>
  <Accordion title="Poor Extraction Quality">
    **Symptoms**: AI extracts incorrect or incomplete information

    **Causes**:

    * Unclear system prompt
    * Poor document quality
    * Inappropriate AI model selection
    * Insufficient context in prompt

    **Solutions**:

    * Refine system prompt with more specific instructions
    * Improve document quality before processing
    * Try different AI models for better results
    * Add more context and examples to prompts
  </Accordion>

  <Accordion title="Processing Failures">
    **Symptoms**: File Reader fails to process documents

    **Causes**:

    * AI service unavailable
    * Document format not supported
    * File size too large
    * Network connectivity issues

    **Solutions**:

    * Verify AI service configuration
    * Check supported document formats
    * Optimize document size
    * Implement retry logic in automations
  </Accordion>

  <Accordion title="Inconsistent Results">
    **Symptoms**: Same document types produce different extraction results

    **Causes**:

    * Ambiguous system prompt
    * Variable document quality
    * Model temperature settings
    * Insufficient training examples

    **Solutions**:

    * Make system prompts more specific
    * Standardize document formats
    * Adjust AI model parameters
    * Provide more examples in prompts
  </Accordion>
</AccordionGroup>

### Validation Strategies

Implement validation in automations: required-field checks, format validation (dates, numbers, emails), range checks for numeric fields, and cross-field validation for consistency.

## Performance Optimization

* **Processing** — Use appropriate AI models for task complexity; optimize document size and format; use faster models for simple extraction.
* **Cost** — Choose cost-effective models for routine tasks; optimize prompts to reduce token usage; use batch processing and monitor usage.

## File Reader Comparison

<Tabs>
  <Tab title="When to Use Elementum Intelligence Reader">
    **Choose Elementum Intelligence when**:

    * Processing complex, unstructured documents
    * You need intelligent content understanding
    * Working with various document formats
    * Requiring custom field extraction logic
    * Handling documents with mixed content types
  </Tab>

  <Tab title="When to Consider Alternatives">
    **Consider alternatives when**:

    * Processing simple text extraction ([Text File Reader](/workflows/text-file-reader))
    * Working with standard business forms ([Purchase Orders Reader](/workflows/purchase-orders-file-reader))
    * Handling structured data files ([Table File Reader](/workflows/table-file-reader))
    * Processing JSON data ([JSON File Reader](/workflows/json-file-reader))
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="AI Services" icon="brain" href="/ai-agents/ai-services">
    Configure AI providers and services to power your document processing
  </Card>

  <Card title="Automation System" icon="gear" href="/workflows/automation-system">
    Learn how to integrate AI document processing with automation workflows
  </Card>

  <Card title="OpenAI Setup" icon="https://mintcdn.com/elementum/zEtDA8cEluOX9_Yd/images/openai-logo.svg?fit=max&auto=format&n=zEtDA8cEluOX9_Yd&q=85&s=b86775beefbc0aabbf223f8226c84519" href="/ai-agents/openai-setup" width="512" height="512" data-path="images/openai-logo.svg">
    Set up OpenAI for advanced document analysis capabilities
  </Card>

  <Card title="Gemini Setup" icon="google" href="/ai-agents/gemini-setup">
    Configure Google Gemini for cost-effective multimodal document processing
  </Card>
</CardGroup>

***

*The Elementum Intelligence File Reader brings the power of AI to document processing, enabling sophisticated extraction and analysis of complex documents. Use it when you need intelligent understanding of document content beyond simple text extraction.*
