Introduction: A Paradigm Shift
Aid4Mail Investigator and Enterprise editions now integrate cutting-edge artificial intelligence, fundamentally changing how you handle email analysis. As the first and only digital forensics tool to integrate AI analysis of emails, including modern attachments, Aid4Mail sets a new industry standard.
Imagine the Possibilities
Important Note
Aid4Mail doesn’t provide direct access to online AI services. You’ll need to obtain API keys directly from providers (Anthropic, Google, Meta AI, Mistral AI, OpenAI, or xAI) and manage associated costs independently.
Key Benefits
Integrating AI into your email processing workflow offers significant advantages over traditional methods.
Enhanced Accuracy
AI understands context and meaning, dramatically reducing false positives and negatives compared to keyword searches.
Multilingual Support
Excel at handling multiple languages reliably, a significant challenge for traditional keyword approaches.
Streamlined Classification
Classify emails into multiple categories, enabling efficient organization and targeted review workflows.
Faster EDRM Workflow
Automate many steps in the Electronic Discovery Reference Model process, from collection to production.
AI Features in Detail
Aid4Mail offers three core AI-powered features that transform how you process email evidence.
AI Email Filtering
Use natural language prompts to identify relevant emails based on meaning and context, not just keywords.
Prompt: "Find emails discussing potential financial fraud, money laundering, or suspicious transactions involving amounts over $10,000"
Traditional Method Problems:
- • High false-positive rate
- • Misses relevant emails
- • Requires specialized knowledge
- • Language limitations
AI Solution Benefits:
- • Improved precision and recall
- • Natural language prompts
- • Multilingual capability
- • Context understanding
AI Email Classification
Automatically organize emails into multiple categories for efficient review and analysis.
Open-Ended Classification
AI determines the category
“Identify the primary language of this email”
Restricted Classification
Choose from predefined categories
Categories: Responsive, Unresponsive, Review
AI Email Analysis
Perform a wide range of analytical tasks to extract insights and intelligence from email content.
Summarization
Translation
Extraction
Inference
AI Model Selection
Choosing the right AI model is crucial for performance and cost-effectiveness. Our comprehensive testing reveals surprising insights.
Performance Example
Gemini 2.0 Flash processed a 5 GB mailbox (50,900 emails) in just under 8 hours at approximately 1.8 emails per second. Total cost: under $12 USD.
115.5M
Tokens processed
8 hours
Processing time
$12
Total cost
Model Selection Checklist
When choosing an AI model for your investigation, consider these critical factors:
Performance Criteria
- Context Window: Larger windows (1M+ tokens) handle full emails with attachments without truncation
- Processing Speed: Faster models (4,000+ tokens/sec) significantly reduce investigation time
- Accuracy: Test models on sample data to verify classification and analysis quality
Technical Requirements
- Output Schema Support: Essential for filtering; important for predefined classification tasks
- Rate Limit Tiers: Higher tiers (Anthropic Tier 3, OpenAI Tier 2) recommended for large datasets
- Cost Efficiency: Balance per-token pricing against processing speed and accuracy needs
Top Model Recommendations
Gemini 2.5 Flash
TOP PERFORMER7,127
tokens/sec
Gemini 2.0 Flash
BEST VALUE6,286
tokens/sec
Magistral Medium
GDPR COMPLIANT4,709
tokens/sec
Getting Started: Setup & Configuration
Before using Aid4Mail’s AI features, you’ll need to set up an account with a supported AI provider and configure your project settings. This section guides you through the complete setup process.
Step 1: Set Up Your AI Provider Account
Aid4Mail supports multiple AI providers. Choose the provider that best fits your needs based on model performance, cost, and data compliance requirements.
Anthropic
Claude models including Haiku and Sonnet
Google AI
Gemini 2.0 & 2.5 Flash models
Meta AI
Llama, Qwen, & Gemma models
Mistral AI
GDPR-compliant Magistral models
OpenAI
GPT-4.1 & GPT-4o models
xAI
Grok 3 & Grok 3 Mini models
What You’ll Need
- • Create an account with your chosen provider
- • Generate an API key from the provider’s console
- • Set up billing and add credits to your account
- • Review the provider’s terms of service and privacy policy
Step 2: Enter Your API Key in Aid4Mail
Configuration Steps
- 1
Open Aid4Mail
Launch the Aid4Mail application on your computer.
- 2
Navigate to App Settings
Access through the View menu or the left-side toolbar.
- 3
Select the AI Tab
Click on the AI tab to access API key configuration.
- 4
Enter Your API Key
Paste your API key in the appropriate field for your chosen provider (Anthropic, Google, Meta AI, Mistral AI, OpenAI, or xAI).
Step 3: Understanding Data Sent to AI Providers
Before configuring AI tasks, it’s important to understand exactly what data Aid4Mail sends to AI providers when processing emails.
What Data Is Included
Aid4Mail sends a decoded UTF-8 plain-text version of each email with a reduced header to minimize data usage and avoid exceeding context limits.
Essential Email Header Fields
Date, Subject, From, To, Cc, Bcc, Message-ID, status flags, and other key metadata
Email Body Text
Converted to plain text (UTF-8 for multilingual support) with URLs preserved
Attachment Names
Names of all attachments (without content unless you enable attachment data inclusion)
Attachment Data (Optional)
When enabled, includes:
- • Camera metadata from photos (JPEG, TIFF, raw formats)
- • Plain text documents (TXT, MD, CSV)
- • Extracted text from Word, PDF, Excel, PowerPoint files
- • Cloud attachments and files from archives (ZIP, 7z, gz)
Important: Including attachment data can increase token consumption by up to 90% and reduce processing speed by approximately 15%. Use the attachment text size limit setting to control costs while maintaining comprehensive coverage.
Step 4: Configure AI Tasks
Aid4Mail provides three AI-powered tasks: Filter, Classify, and Analyze. Each task is configured independently in the Project Settings.
Accessing Project Settings
- 1. Open Project Settings from the View menu or left-side toolbar
- 2. Select the AI tab
- 3. Configure the sections you’ll use: Filter, Classify, and/or Analyze
Common Configuration Options
1. Select an AI Model
Choose a model for which you’ve entered an API key. Smaller models are often faster and cheaper, while larger models may provide better accuracy for complex tasks.
2. Create or Load a Prompt
- • Write your own prompt from scratch, or
- • Click Open to access the library of pre-written prompts
- • Use Verify to test your prompt with the selected AI model
- • Click Save to store custom prompts for future use
3. Include Attachment Data (Optional)
Choose whether to send attachment content to the AI model along with email text:
- • Camera metadata from photos
- • Plain text documents (TXT, MD, CSV)
- • Extracted text from Word, PDF, Excel, PowerPoint
Filter
Configure model and prompt to identify relevant emails based on meaning and context.
Classify
Organize emails into categories. Optionally enter a comma-separated list of predefined categories.
Analyze
Perform tasks like summarization, translation, or extraction. Specify the maximum output tokens for AI responses.
Attachment Strategy: Balancing Coverage with Efficiency
Strategic attachment inclusion requires careful consideration based on your investigation’s specific needs. The attachment text size limit setting helps you optimize this balance.
Case-Specific Scenarios
Email Attack Vectors
Focus on message content and attachment names. Full attachment text rarely adds value for phishing/malware detection.
Digital Evidence Cases
Camera metadata (typically under 1 KB) reveals crucial details like capture time, location, and lighting conditions.
Compliance & Litigation
Prioritize word processor files and PDFs, which often contain the most relevant evidence in FOIA or political influence cases.
Data Protection Incidents
Include all document types to ensure comprehensive coverage of potential IP theft and data leakage.
Understanding LLM Limitations
Large Language Models face challenges when processing very large inputs:
- • Recall degradation: Difficulty accurately recalling information buried deep within long inputs (the "lost in the middle" problem)
- • Positional bias: Potentially giving more weight to information at the beginning or end of the text
- • Complex reasoning challenges: More difficult as input size dramatically increases
Strategic Truncation Benefits
Setting appropriate text limits can actually improve accuracy for specific tasks by removing irrelevant ‘noise’ from oversized attachments. This helps the AI focus on core email content and pertinent attachment sections, mitigating recall and bias issues.
Important: Balance optimizing AI focus against the risk of excluding critical data beyond the truncation point. If essential information resides deep within large files, it will be missed.
Recommended Text Size Limits by Context Window
Model Context Window | Recommended Size Limit |
---|---|
2,097,152 tokens | 200 KB |
1,048,576 tokens | 150 KB |
200,000 tokens | 75 KB |
128,000 tokens | 50 KB |
32,000 tokens | 20 KB |
These optimized limits ensure AI can determine document content and relevance while maximizing processing speed and minimizing costs.
Step 5: Create AI Tasks in Sessions
After configuring your AI settings, you’ll enable AI tasks within your processing sessions. Each AI feature requires specific session settings.
Creating AI Filter Tasks
- 1. Navigate to the Settings tab on the Sessions screen
- 2. Under the Filter section, select Enable AI filtering
Best Practice: Use AI filtering only when you need to analyze meaning or context. For simple date ranges, participants, or keyword matching, use standard Aid4Mail queries for faster, cost-free filtering.
Creating AI Classification Tasks
- 1. Go to the Settings tab on the Sessions screen
- 2. Under Folder structure, select Use a template
- 3. In Folder structure template, insert
{Classify}
Emails will be automatically sorted into folders named according to their classification results.
Creating AI Analysis Tasks
AI analysis is available for PDF, HTML, CSV, TSV, XML, and JSON output formats.
- 1. Go to the Settings tab on the Sessions screen
- 2. Ensure the target format is PDF, HTML, CSV, TSV, XML, or JSON
- 3. Above the configuration field (Content, Column, or Email header), select Add
- 4. In the editor window, add AI.Analyze (and optionally AI.Classify) to Selected Items
- 5. Include other relevant fields (Subject, From, To, Date) for comprehensive output
- 6. Save your configuration
Step 6: Run Your Session
You’re Ready to Process
Once you’ve configured your AI tasks and session settings, click Run to start processing. Aid4Mail will send the relevant email data to your chosen AI provider(s) and apply the results according to your configuration.
Pro Tip: Enable Incremental Processing
- • Turn on “Automatically record each email to allow incremental processing” in Source settings
- • If interrupted, use “Incremental processing” option to resume from where you left off
- • Saves time and costs by avoiding reprocessing of completed emails
Common Errors Explained
Understanding common error messages helps you troubleshoot issues quickly and keep your processing on track.
Invalid JSON response / Failed to extract response from schema
The AI API returned data in an unexpected format. This is usually a temporary server-side issue. Wait a moment and try again.
HTTP 400: Bad Request
Email data exceeds the AI model’s processing limit. Consider using a model with a larger context window or reducing attachment text size limits.
HTTP 403: Forbidden
Either your credit balance has been depleted, or the AI provider doesn’t support your region. Consider using a different AI provider.
HTTP 500/502/503: Server Errors
Temporary server issues or high demand at the AI provider. These are usually short-lived; wait a few minutes and retry.
Pre-Written Prompt Library
Aid4Mail includes over 60 specialized prompts organized by investigation type, helping you get started quickly with proven templates.
Windows Security Note
If pre-written prompts don’t appear when you click Open, Windows’ "Controlled folder access" protection may be blocking the installation. Check the AI Prompts subfolder in your Aid4Mail program folder to access them manually.
Digital Forensics
32 specialized themes
- • Cybercrime
- • Financial fraud
- • Crypto fraud
- • Human trafficking
- • State espionage
eDiscovery
20 litigation themes
- • Antitrust
- • IP theft
- • Harassment
- • Insider threats
- • M&A due diligence
FOIA/Public Records
14 government themes
- • Environmental impact
- • Government misconduct
- • Surveillance practices
- • Lobbying influence
- • Public interest
Offline AI: Maximum Security
Aid4Mail offers seamless integration with on-premises AI models, providing a powerful solution for organizations handling sensitive information or facing strict data sovereignty requirements.
Key Benefits
Complete Data Privacy
Keep all information within your security perimeter
Regulatory Compliance
Meet stringent legal standards for data handling
Consistent Performance
Avoid API rate limits and service disruptions
Cost Efficiency
Eliminate recurring token charges after setup
Implementation Process
Aid4Mail uses a JSON configuration file (AI-Config.json
in the program folder under the Data subfolder) to control model interactions. This flexible approach makes adding local models remarkably straightforward.
Our helpdesk team is available to assist clients with configuring this file for offline use, ensuring a smooth transition to local processing.
Recommended Hardware for Qwen 2.5 32B
- Latest-generation CPU with 16+ cores
- NVIDIA A100 (80GB VRAM) or equivalent GPU
- 128GB system RAM minimum
Enterprise-Ready Alternatives to Offline AI
While Aid4Mail supports offline AI processing for maximum data privacy, local deployment requires high-end hardware and typically delivers much slower inference speeds (around 150 tokens per second) compared to native cloud-hosted models (4,000–7,000 tokens per second).
Practical Third-Party Hosting Options
For many organizations, enterprise hosting platforms offer a practical compromise—delivering high performance while meeting requirements for data residency, compliance, and security:
Microsoft Azure
Access to GPT-4.1 and Mistral models with enterprise compliance
- • Regional data residency
- • Enterprise security
- • High performance
Google Vertex AI
Gemini models with scalable infrastructure
- • Multi-region deployment
- • Advanced monitoring
- • Native integration
Amazon Bedrock
Claude and other models in AWS ecosystem
- • AWS compliance tools
- • Flexible deployment
- • Model variety
Configuration Support: Aid4Mail gives you full control over your AI setup. If you’re interested in deploying on Azure, Vertex AI, or Bedrock, our helpdesk can assist with customizing your AI-Config.json
file to ensure full compatibility and performance.
Optimization Best Practices
Maximize efficiency, reduce costs, and improve results with these proven strategies.
Recommended Workflow
Server-Side Pre-Filtering
Use native pre-acquisition filtering to reduce data at the source. Select appropriate date ranges, folders, and keywords.
Local Post-Filtering
Further narrow your dataset with Aid4Mail’s powerful local filters before AI processing.
Strategic Attachment Inclusion
Include cloud attachments only when necessary. Set appropriate size limits (20-200 KB recommended).
Enable Incremental Processing
Allow resumption from any interruption point without reprocessing completed work.
Test and Refine
Test prompts with small samples before processing large datasets to verify results and estimate costs.
Legal Considerations
Sending data to AI providers raises important privacy and data protection considerations, especially for sensitive investigations.
Disclaimer
This information is general guidance only and not legal advice. You must consult legal professionals to ensure compliance with applicable laws and regulations.
GDPR Considerations (Europe)
- • Establish lawful basis for processing
- • Ensure Data Processing Agreement in place
- • Use EEA-hosted models when possible
- • Document transfer mechanisms
US Considerations
- • Review state-specific laws (CCPA/CPRA)
- • Consider HIPAA for healthcare data
- • Understand SCA obligations
- • Document compliance measures
PIPA Considerations
- • Obtain explicit consent for data processing
- • Minimize personal information collection
- • Ensure data destruction after purpose fulfilled