Introduction: Transform Your Email Investigations
This isn’t just an incremental improvement; it’s a fundamental change that can dramatically cut review times, uncover hidden insights, and reduce costs. Our solution is also one of the few on-premises eDiscovery tools offering this advanced capability.
Aid4Mail’s approach fundamentally differs from traditional Technology-Assisted Review (TAR) systems. While TAR platforms require extensive training phases—manually reviewing hundreds or thousands of documents to “teach” the system what’s relevant—Aid4Mail leverages Large Language Models (LLMs) for structured analysis and classification. You start analyzing emails immediately with natural language prompts, without any training data, seed sets, or iterative feedback loops.
Imagine the Possibilities
Important Note Regarding AI Providers
Aid4Mail doesn’t provide direct access to online AI services. For cloud models, you must obtain API keys directly from providers (Anthropic, Google, Meta AI, Mistral AI, OpenAI, or xAI) and manage associated costs independently. Offline models (via Ollama or LM Studio) need no API key.
AI tools can make mistakes and have limitations. For Aid4Mail’s constrained filtering and classification tasks, the risk of AI hallucination is materially reduced by design—though Analyze tasks (summaries, translations, extractions) are less constrained and should be reviewed, as explained in Section 4.
How Aid4Mail’s AI Differs from Traditional TAR
If you’re familiar with Technology-Assisted Review (TAR) platforms used in eDiscovery, the difference is fundamental, not incremental. Our reproducible AI model benchmark retained 11 models (from 42 evaluated) and measured them against published keyword-search and TAR baselines. Every retained model reached at least 99% recall on the primary test—above the top of the published TAR 2.0 recall range (75–96%)—and landed in the upper portion of the TAR 2.0 F1 range.
Traditional TAR Workflow
- 1. Training Phase: Experts manually review 200–2,000+ documents as a “seed set”
- 2. Iterative Learning: System finds documents similar to seed set using statistical models
- 3. Feedback Loops: Additional rounds of manual review refine accuracy
- 4. Project-Specific: Each new case requires training from scratch
Aid4Mail’s AI Approach
- Immediate Operation: No training phase. Write a prompt and start processing instantly
- True Comprehension: LLMs understand language, context, nuance, and meaning
- Universal Flexibility: One model handles filtering, classification, translation, and extraction across multiple languages
- Natural Language Control: Plain language prompts replace training by examples
TAR’s Key Limitations
The Cold Start Problem
Requires substantial upfront manual review before automation begins—days or weeks of delay and significant costs.
Inflexibility
Struggles with new document types, evolving case theories, multiple classification schemes, and multilingual datasets.
Single-Purpose Design
Primarily designed for binary responsive/non-responsive classification. Other analytical tasks require separate tools.
Expertise Requirements
Requires specialized knowledge of predictive coding protocols, statistical validation, and continuous quality control.
The Paradigm Difference
TAR asks:
“Can we find more documents similar to these examples?”
Aid4Mail’s AI asks:
“Can we understand what these documents actually mean and process them accordingly?”
When Might TAR Still Be Relevant?
To provide balanced perspective, TAR retains some advantages in specific scenarios:
- • Established Protocols: Organizations with mature TAR workflows and proven defensibility records
- • Massive Productions: Hundreds of millions of documents where marginal per-document cost differences become significant
- • Highly Repetitive Cases: When exact same legal issues appear repeatedly and training investment can be amortized
However, even these advantages diminish as AI costs decrease, processing speeds increase, and legal acceptance grows.
The Power of AI: Key Benefits
Integrating AI into your email processing workflow with Aid4Mail offers significant advantages over traditional methods.
Enhanced Accuracy
AI-powered filtering produces more accurate results than keyword searches, reducing the risk of false positives and false negatives.
Easier To Create
AI prompts are simpler to create than Boolean queries and can often be improved with the help of AI itself, requiring less specialized knowledge.
Multilingual Support
AI filtering and classification excel at handling multiple languages reliably, a challenge for keyword-based approaches.
Streamlined Classification
Go beyond simple “relevant” or “not relevant.” AI classifies emails into many categories, enabling efficient organization and targeted review.
Automated Analysis
Perform email summarization, translation, information extraction, and inference generation directly in Aid4Mail.
Faster EDRM Workflow
AI can automate many steps in the Electronic Discovery Reference Model (EDRM) process, from collection to production.
Reduced Manual Review Burden
By automating filtering, classification, and analysis, AI significantly lowers the amount of manual review required, saving time and resources.
AI Features in Detail
Aid4Mail offers three core AI-powered features that transform how you process email evidence.
3.1. AI Email Filtering
Problem with Traditional Filtering
- • High false-positive rate (irrelevant emails included)
- • High false-negative rate (relevant emails missed)
- • Requires specialized knowledge for effective queries
- • Language limitations with multilingual datasets
AI Solution
- • Improved precision and recall
- • Natural language prompts, less specialized knowledge needed
- • Robust and efficient multilingual capability
- • Context and meaning-based identification
3.2. AI Email Classification
Classification extends filtering by grouping emails into multiple categories, not just “relevant” or “not relevant.”
Open-Ended Classification
The AI model determines the category based on your prompt.
“Identify the primary language used in this email”
Restricted Classification
You provide a list of allowed categories.
Categories: Responsive, Unresponsive, Review
The Three-Label System
Most review workflows use three labels: Responsive, Unresponsive, and an abstention label—INCONCLUSIVE (you can use Review). The abstention label routes genuinely ambiguous emails to human review instead of forcing a decision. If you supply a restricted category list without an abstention label, Aid4Mail automatically adds INCONCLUSIVE so ambiguous emails always have a category.
Output Options
- • Folder Organization: Automatically sort emails into folders named by classification
- • Archival Output: Include classification as a field in PDF, HTML, CSV, TSV, XML, or JSON
3.3. AI Email Analysis
Perform a wide range of analytical tasks to extract insights and intelligence from email content.
Summarization
Translation
Extraction
Inference
Store analysis results in PDF, HTML, CSV, TSV, XML, or JSON files for review, reporting, and further processing.
Act on AI Results with Python Scripts
In Investigator and Enterprise, Aid4Mail exposes AI classification and analysis results to its Python filter and modifier scripts, so a single session can classify emails and act on those verdicts—no export to an external tool required. Use it for per-category routing, conditional redaction, cross-signal QA (for example, routing an AI-Unresponsive email that contains a high-value keyword to a review queue), and writing AI fields into custom reports.
This is also how you get AI fields into Concordance/Summation load files: native AI-field export covers PDF, HTML, CSV, TSV, XML, and JSON—but not the DAT/OPT load-file formats, which require a modifier script. (The AI Filter pass/fail result is not a script variable; its audit trail lives in Aid4Mail’s processing logs.) See the Python scripting guide for details.
Understanding AI Classification Errors
AI hallucination refers to instances where AI models produce information that appears plausible but is factually incorrect. While this is a legitimate concern in open-ended text generation, Aid4Mail’s structured Filter and Classify tasks constrain the model to predefined labels tied to each email, which materially reduces the risk. Analyze tasks are less constrained and should be reviewed accordingly.
Why Aid4Mail’s AI Implementation Is Different
Constrained Responses
AI responds with predefined categories or simple determinations (e.g., “Responsive” vs. “Unresponsive”), leaving minimal room for fabrication.
Verifiable Input-Output
Every AI response is directly tied to specific email content you can verify. The email being analyzed is always available for review, making any classification decision fully auditable.
No External Knowledge Required
Prompts instruct the AI to evaluate only the email content provided—not to draw on external knowledge or training data.
Grounded in the Evidence
When an AI model selects “English” as a language or “Responsive” as a category, it’s making a judgment based on the email in front of it, not inventing information.
Proven Reliability
Our latest benchmark demonstrates that top-tier models achieve 97–99% classification accuracy, with several scoring perfectly on multi-category and Korean-language tests. These accuracy rates are exceptional for classification tasks and confirm that AI models perform reliably in Aid4Mail’s structured framework.
Important: Not all models perform equally well. Our testing of 42 models revealed significant variation, with some models achieving accuracy rates below 60%. Model selection matters—see Section 5 for detailed performance metrics.
Classification Errors vs. Hallucination
Classification Error
The AI selects an incorrect category based on ambiguous content or misinterpretation of context. Example: An email discussing both legal and technical issues might be classified as “Technical” when “Legal” would be more appropriate.
Hallucination
The AI fabricates information not present in the source material. Example: Claiming an email mentions a person or date that doesn’t appear anywhere in the email. In Aid4Mail’s constrained Filter and Classify tasks this risk is materially reduced by design, because responses are limited to predefined labels tied to the email’s content. Analyze tasks (summaries, translations, extractions) are less constrained and should be reviewed for unsupported statements.
Best Practices for Maximum Accuracy
- Use Clear, Specific Prompts: Well-defined classification criteria help the AI make accurate decisions. Avoid ambiguous language or overlapping categories.
- Start with Small Test Sets: Run a representative sample to verify classifications before processing large volumes.
- Choose Appropriate Models: Some models perform better than others for specific tasks. See Section 5 for model performance data.
- Implement Quality Controls: Sample reviews help maintain accuracy and identify areas for prompt refinement.
AI Speed, Cost, and Model Selection
Choosing the right AI model is crucial for performance and cost-effectiveness. Our comprehensive testing reveals important insights about accuracy, speed, and value.
5.1. Performance Example
Gemini 2.5 Flash (since superseded by Gemini 3.1 Flash-Lite) processed a 3.6 GB mailbox (34,097 emails) in five hours and 20 minutes—about 1.78 emails per second (including document attachments). Cost: $20.65 USD using 67.13 million input tokens and 0.20 million output tokens (~67.33M total). Equivalent runs with the current Gemini 3.1 Flash-Lite are projected at roughly $42 per 100,000 emails via Google AI Studio (about $43 on the Agent Platform).
67.33M
Total tokens
5h 20m
Processing time
~$21
Total cost
Token usage note: Including attachment data can increase token consumption by 30% to 90% and reduce processing speed by ~15%. AI filter and classification tasks consume very few output tokens with non-thinking models (often fewer than 10 per email).
5.2. Choosing the Right AI Model
Performance Criteria
- Context Window: Larger windows (1M+ tokens) handle full emails with attachments without truncation
- Speed: Faster models (1.7+ emails/s in cloud, 2.7+ emails/s offline) 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
- Rate Limits: Enterprise platforms offer better quotas than consumer APIs for large datasets
- Cost Efficiency: Balance per-token pricing against processing speed and accuracy
5.3. Our AI Model Tests
Test Methodology
We ran six tests to evaluate real-world performance, anchored by a 34,097-email production pilot. (The smaller test sets overlap with the pilot corpus, so their email counts are not additive.)
Test 1: 2,000 Insider-Threat Emails
- • 1,880 Podesta + 120 synthetic
- • Binary responsiveness at 6% prevalence; English, French, and Spanish
Test 2: 200 Multi-Category Emails
- • 5 misconduct themes
- • English, French, and Spanish
Test 3+4: 270 Korean Emails
- • Binary and multi-category
- • Korean-language classification
Models Tested
Cloud (retained): Claude 4.7 Opus (Anthropic / Bedrock); Gemini 3.1 Flash-Lite, Gemini 3.5 Flash (Google AI Studio, Gemini Enterprise Agent Platform); Grok 4.2 Non-Reasoning (xAI, Microsoft Foundry); OpenAI GPT-5.4 (OpenAI, Foundry)
Offline (retained): Mistral Small 3.2 24B, Ministral 3 14B (Mistral AI); Llama 3.3 70B (Meta); Gemma 4 26B Think (Google); Qwen 3.6 27B Dense, Qwen 3.6 35B MoE (Alibaba)—all via Ollama
A further 31 models were tested but excluded for being superseded, underperforming, or dominated by a smaller sibling. The full list is in the published benchmark report.
Reproduce the benchmark yourself
You don’t have to take our numbers on faith. Aid4Mail publishes a downloadable benchmark kit containing the exact Test 1 prompt and the full 2,000-email corpus, so you can rerun Test 1 on your own provider, model, and hardware and compare against the published results. A cloud run costs about $1. It’s a practical way to validate a model on data you control before committing to it.
5.4. Test Results
Consider Enterprise-Grade Platforms for large jobs: For sustained, high-volume processing, models hosted on Amazon Bedrock, the Gemini Enterprise Agent Platform, or Microsoft Foundry offer more predictable throughput and quotas, regional data-residency control, and fewer rate-limit interruptions than consumer APIs. For evaluation and small-to-medium jobs, a direct provider API is usually simpler and sufficient.
Top Commercial Models (Accuracy)
1. Grok 4.2 Non-Reasoning
MOST ACCURATE CLOUD99.2%
F1
Highest F1 of any retained cloud model and tied for top Automation Yield (99.85%, 1,997 of 2,000 emails resolved). Deterministic.
2. Claude 4.7 Opus (low effort)
PREMIUM ANALYSIS97.2%
F1
100% accuracy on Korean multi-category and Test 2; strongest cloud option for analysis, translation, and reasoning beyond classification alone.
3. OpenAI GPT-5.4
STRONG CONTENDER97.6%
F1
4. Gemini 3.5 Flash
PERFECT MULTI-CATEGORY96.8%
F1
Perfect 100% on Tests 2, 3, and 4. Higher cost than Gemini 3.1 Flash-Lite (roughly 6×); production-payload throughput (Test 5) not yet measured.
5. Gemini 3.1 Flash-Lite (AI Studio)
BEST CLOUD VALUE96.0%
F1
Perfect 100% on Tests 2, 3, and 4. Lowest-cost cloud option; strong multilingual performance. (Agent Platform deployment available at $0.275/M and 1.72 emails/s for enterprise EU residency.)
Top Commercial Models (Speed)
1.72
Gemini 3.1 Flash-Lite (Agent Platform)
emails/sec — $0.275/M
1.30
Gemini 3.1 Flash-Lite (AI Studio)
emails/sec — $0.25/M
1.35
Grok 4.2 Non-Reasoning
emails/sec (Test 1 basis) — $1.25/M
Top Open-Source Models
Mistral Small 3.2 24B (Q4_K_M)
99.6%Best Test 1 F1 in the benchmark (on decided emails); strong throughput on 24 GB GPUs.
Llama 3.3 70B (Q4_K_M)
99.2%Top offline Automation Yield (99.85%); requires ~80 GB VRAM for full speed.
Qwen 3.6 27B Dense (Q4_K_M)
98.8%Only offline model with perfect 100% on Tests 2, 3, and 4.
Ministral 3 14B (Q4_K_M)
94.9%Fastest offline model in the benchmark (3.94 emails/s); 16 GB VRAM minimum.
Weekend-Throughput Reference
A useful planning yardstick is a 62-hour unattended run (Friday evening to Monday morning) at Test 5 production-payload sizes: roughly 879,000 emails with the fastest offline model (Ministral 3 14B), about 614,000 with a balanced offline model (Mistral Small 3.2 24B), and about 384,000 with the fastest measured cloud deployment (Gemini 3.1 Flash-Lite, Agent Platform). These are planning estimates—actual throughput varies with payload size, prompt complexity, hardware, provider load, and rate limits.
5.5. AI Model Features
Pricing and throughput (emails/sec) can change; always verify with the provider. For best performance, use enterprise platforms rather than consumer APIs. Offline models were configured with a 32K context length in most of our tests.
| Model | Context | Input $/M | Speed (e/s) | Platforms |
|---|---|---|---|---|
| Claude 4.7 Opus | 1M | $5.00 | 0.47 (T1) | Anthropic, Bedrock, Agent Platform |
| GPT-5.4 | 922K | $2.50 | 0.98 (T5) | OpenAI, Foundry |
| Grok 4.2 Non-Reasoning | 2M | $1.25 | 1.35 (T1) | xAI, Foundry |
| Gemini 3.1 Flash-Lite (AI Studio) | 1M | $0.25 | 1.30 (T5) | AI Studio, Agent Platform |
| Gemini 3.1 Flash-Lite (Agent Pl.) | 1M | $0.275 | 1.72 (T5) | Gemini Enterprise Agent Platform (EU) |
| Gemini 3.5 Flash | 1M | $1.65 | n/a* | AI Studio, Agent Platform |
| Mistral Small 3.2 24B | 128K | offline | 2.75 (T5) | Ollama |
| Ministral 3 14B | 256K | offline | 3.94 (T5) | Ollama |
| Qwen 3.6 27B Dense | 256K | offline | 0.08 (T1) | Ollama |
| Qwen 3.6 35B MoE | 256K | offline | 0.16 (T1) | Ollama |
| Llama 3.3 70B | 128K | offline | 0.14 (T5) | Ollama |
T5 = Test 5 production-payload (~81 KB avg email); T1 = Test 1 (size-filtered 1–68 KB; production-payload not yet measured). n/a* = production-payload throughput not yet measured for this model.
5.6. Regional Availability by Platform
Amazon Bedrock
Claude 4.7 Opus: Brazil, Canada, USA, France, Germany, Ireland, Italy, Spain, Sweden, Switzerland, UK, Australia, Japan, Korea
Gemini Enterprise Agent Platform
Gemini 3.5 Flash: us multi-region; eu multi-region (excludes UK and Switzerland)
Gemini 3.1 Flash-Lite: us multi-region; eu multi-region (excludes UK and Switzerland)
Claude 4.7 Opus: USA, Belgium
Microsoft Foundry
GPT-5.4, Grok 4.2: USA, Sweden
Regional availability changes frequently. Always verify with your platform provider before deployment. For GDPR compliance, European organizations should prioritize providers with EU-based infrastructure.
5.7. Multilingual Support
AI models can process multiple languages within a single prompt, recognizing context and meaning regardless of language. Not all models handle all languages equally well—select a model that reliably handles the languages in your dataset.
| Model | Primary | Strong Support |
|---|---|---|
| Claude 4.7 Opus | English | Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean, Arabic, Hindi, Indonesian |
| Gemini 3.5 Flash / 3.1 Flash-Lite | — | 35+ languages including English, Arabic, Chinese, Japanese, Korean, and most European languages |
| Grok 4.2 Non-Reasoning | English | Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean, Arabic, Hindi, Russian, Dutch, Turkish, Polish, Swedish |
| GPT-5.4 | English | Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean, Arabic, Hindi, Indonesian, Bengali |
| Mistral-family | French, English | Spanish, German, Italian, Portuguese (strong choice for French-language datasets) |
Gemini models offer the broadest multilingual coverage (35+ languages). Always test with a representative sample before large-scale processing in a non-primary language.
5.8. Offline AI: Maximum Security with Local Processing
Complete Data Privacy
Keep all information within your security perimeter
Regulatory Compliance
Meet stringent legal standards for data handling
Consistent Performance
Avoid external API quotas and service availability constraints
Cost Efficiency
Eliminate recurring token charges after initial setup
Implementation
Aid4Mail uses JSON configuration files (in the program folder under the AI Config subfolder) to control model interactions.
Recommended Hardware for Offline Models
- • Latest-generation CPU with 12+ cores
- • NVIDIA RTX 5090 (32 GB VRAM) or equivalent—fits every retained offline model except Llama 3.3 70B in VRAM (GPU-resident). Note that Qwen 3.6 27B Dense and 35B MoE fit but remain slow (0.08–0.16 emails/s), so they suit small-to-medium corpora rather than production-scale batches.
- • 64–128 GB system RAM
16 GB VRAM is the minimum for Ministral 3 14B. Llama 3.3 70B needs ≥80 GB VRAM (e.g., NVIDIA A100/H100) for full-speed GPU residency.
5.9. Enterprise-Ready Alternatives
Retained offline throughput varies widely: 3.94 emails/s for Ministral 3 14B and 2.75 emails/s for Mistral Small 3.2 24B on Test 5—both outpacing the fastest retained cloud deployment (Gemini 3.1 Flash-Lite Agent Platform, 1.72 emails/s)—while Gemma 4 26B (0.20 emails/s), Llama 3.3 70B (0.14 emails/s), and the newer Qwen 3.6 models (0.08–0.16 emails/s on Test 1) are slower than cloud. Enterprise platforms offer a practical compromise—delivering high performance while meeting data residency, compliance, and security requirements.
Microsoft Foundry
GPT-5.4 & Grok 4.2 with enterprise compliance, regional data residency
Gemini Enterprise Agent Platform
Gemini & Claude models with scalable multi-region infrastructure
Amazon Bedrock
Claude models in AWS ecosystem with compliance tools and reservable throughput
Configuration Support: Aid4Mail gives you full control over your AI setup. For step-by-step provider setup, see the AI Provider and Model Configuration Guide. For model-by-model recommendations, pricing, and regional availability, see the AI Provider and Model Selection Guide. Full methodology and per-model results are in the AI Classification Benchmark Report.
Getting Started: AI Provider Setup
To use a cloud AI provider, you need an account and API key from that provider. Follow the provider’s instructions to create an account, generate an API key, and manage billing. Offline models (via Ollama or LM Studio) don’t use an API key—you configure them as Available instead (see Section 7).
Anthropic
Claude Opus & Sonnet models
Google AI
Gemini Flash models
Meta AI
Llama models (via LLMAPI)
Mistral AI
EU-based Mistral & Magistral models
OpenAI
GPT models
xAI
Grok 4.2 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
This applies to cloud providers. Offline models (Ollama or LM Studio) need none of the above—no account, API key, or billing.
Configuring Aid4Mail for AI Processing
Follow these steps to configure your provider, set up AI tasks, create sessions, and run your processing.
7.1. Configuring Your AI Provider
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 provider configuration.
- 4
Configure the Provider
Select your provider and click “Configure.” For a cloud provider, paste your API key. For an offline provider (Ollama or LM Studio), set it to Available and confirm the local endpoint.
Enterprise platforms use different credentials
A direct cloud provider needs only an API key. Enterprise platforms and offline providers configure differently:
- • Google Vertex AI / Gemini Enterprise Agent Platform: region, Google Cloud Project ID, and a Service Account JSON key file
- • Amazon Bedrock: region and AWS IAM credentials (Provisioned Throughput optional for sustained jobs)
- • Microsoft Foundry: Azure API key and resource name
- • Ollama / LM Studio (offline): no API key—set the provider to Available, then specify a local endpoint URL and matching context length
Treat Service Account JSON files and API keys as sensitive credentials. Full setup is in the AI Provider and Model Configuration Guide.
7.2. Configuring AI Tasks (Filter, Classify, Analyze)
Open Project Settings (View menu or left-side toolbar) and select the AI tab. You’ll see sections for Filter, Classify, and Analyze, each configured independently.
Common Configuration Options
1. Select an AI Model
Choose a model whose provider you’ve configured—an API key for a cloud provider, or set to Available for an offline provider (Ollama or LM Studio). Smaller models are often faster and cheaper.
2. Create or Load a Prompt
- • Write your own prompt, 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)
Extracted text from Word, PDF, Excel, and PowerPoint files; plain-text/CSV/Markdown content; camera metadata from photos (typically under 1 KB); and nested files from archives or cloud attachments.
Note: Aid4Mail always sends each attachment’s filename and extension regardless of this setting—often a strong signal on its own (for example, client_list_2026.xlsx).
Filter
Configure model and prompt to identify relevant emails based on meaning and context. The result is True/False: the email either continues through the pipeline or is rejected.
Classify
Organize emails into categories. Optionally enter a comma-separated list of predefined categories.
Analyze
Summarization, translation, extraction. Specify the maximum output tokens.
Attachment Text Size Limit
Under the Options heading, set an appropriate limit to control token usage and costs. These are per-attachment starting caps, not guaranteed-safe totals: the whole payload—headers, body, prompt, category list, and every included attachment—must still fit the model’s context window. Validate on a representative sample for attachment-heavy mailboxes. Even when the context window is large, a smaller limit can produce better results (less noise) and cost less—bigger isn’t automatically better.
| Model Context Window | Recommended Size Limit |
|---|---|
| 2,097,152 tokens | 200 KB |
| ~1,000,000 tokens | 150 KB |
| 200,000 tokens | 75 KB |
| 128,000 tokens | 50 KB |
| 32,000 tokens | 20 KB |
7.3. Creating AI Tasks in Sessions
AI Filter Tasks
- 1. Go to the Settings tab on the Sessions screen
- 2. Under Filter, select “Enable AI filtering”
When to use: AI filtering is powerful but incurs costs. Use it when you need to analyze meaning or context—not for simple date ranges, participants, or keyword matching where standard Aid4Mail queries are faster and free.
Pass/reject only: Unlike AI Classification, AI filtering has no “uncertain” outcome—there is no Review or INCONCLUSIVE label. Each email is either kept or rejected (True/False). When you need an abstention or human-review category, use AI Classify or export an AI field instead.
AI Classification Tasks
- 1. Go to the Settings tab on the Sessions screen
- 2. Under Target, select Use a template from the Folder structure list
- 3. In Folder structure template, insert
{Classify}
Prefer an auditable field? To preserve the classification in the output (not just the folder name), choose a target of PDF, HTML, CSV, TSV, XML, or JSON and add the classification field: AI.Classify for CSV/TSV/XML/JSON, or X-AI-Classify for HTML/PDF.
Review AI classifications in the portable Email Viewer
Export to HTML with Include portable email viewer checked, and Aid4Mail bundles a zero-install, browser-based viewer with the results—no server or internet required. It’s purpose-built for working through AI output:
- • A dedicated Classification column shows each email’s AI label; click the header to sort by it.
- • Fielded search isolates any label instantly—
class:Responsiveorclass:INCONCLUSIVE—and combines with other filters (e.g.,class:INCONCLUSIVE has:attachment). - • Tag emails as you review (confirm false positives, flag items for a second pass), then export the tags as an MIH+ list to archive decisions or feed them back into Aid4Mail filtering.
- • Scales to 50,000+ emails with sandboxed previews, so even untrusted mail renders safely offline.
AI Analysis Tasks
Available for PDF, HTML, CSV, TSV, XML, and JSON output.
- 1. Go to Settings tab, ensure target format is PDF, HTML, CSV, TSV, XML, or JSON
- 2. Open the output configuration editor and select Add
- 3. Add the analysis field—
AI.Analyzefor CSV/TSV/XML/JSON orX-AI-Analyzefor HTML/PDF (optionally add the matching Classify field) - 4. Include other relevant fields (Subject, From, To, Date) and Save
7.4. Running Your Session
You’re Ready to Process
Click Run to start processing. Aid4Mail sends the relevant data to your chosen AI provider(s) and applies 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” to resume from where you left off
- • Saves time and costs by avoiding reprocessing of completed emails
- • Note: Incremental processing is not available when pre-acquisition (server-side) filtering is enabled. For a resumable long AI run, collect first (or use post-acquisition filtering), then apply AI to the local set.
7.5. Common Errors Explained
Invalid JSON response / Failed to extract response from schema
The AI API returned data in an unexpected format. Usually a temporary server-side issue. Wait and try again.
HTTP 400: Bad Request
Email data exceeds the AI model’s processing limit. Consider a model with a larger context window or reduce attachment text size limits.
HTTP 403: Forbidden
The provider doesn’t support your region, or your account lacks access to the requested model. Verify model access and region, or choose a different provider. (Note: xAI returns 429—not 403—when the account credit is depleted.)
HTTP 429: Too Many Requests
Rate or token quota exceeded. Aid4Mail retries automatically with backoff—this is expected on large jobs, not an error. If it persists, switch to an enterprise platform with higher quotas, or check provider-specific causes (Bedrock provisioning, Vertex default-0 quota, depleted xAI credit, or a low usage tier).
HTTP 500/502/503: Server Errors
Temporary server issues or high demand at the AI provider. Wait a few minutes and retry.
Cannot connect to local model (Ollama / LM Studio)
For offline models, confirm the local inference server is running (run “ollama serve” if needed, or start the LM Studio server), verify the endpoint URL and port, confirm the model is downloaded and loaded, and make sure the context length in Aid4Mail matches the local tool.
Pre-Written Prompt Library
Aid4Mail includes a library of over 200 pre-written prompts spanning 72 themes, organized by task (Filter, Classify, Analyze), helping you get started quickly with proven templates.
Accessing Pre-Written Prompts
- 1. Go to Project Settings
- 2. Click on the AI tab
- 3. Find the Prompt field for your AI task
- 4. Click Open above the Prompt field
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.
Digital Forensics
34 specialized themes
- • Cybercrime & financial fraud
- • Crypto fraud & human trafficking
- • Cybersecurity threats
- • State-sponsored espionage
eDiscovery
24 litigation themes
- • Antitrust & IP theft
- • Harassment & insider threats
- • M&A due diligence
- • Whistleblower investigations
FOIA/Public Records
14 government themes
- • Environmental impact
- • Government misconduct
- • Surveillance practices
- • Lobbying influence
Why Use Pre-Written Prompts?
- • Time Savings: Don’t start from scratch
- • Best Practices: Follow proven AI interaction guidelines
- • Targeted Scenarios: Quickly find prompts relevant to your tasks
Customization Is Key
- • Review: Make sure the prompt’s logic matches your goals
- • Customize: Refine prompts to suit your specific project
- • Test: Verify and test on a small sample after customizing
Troubleshooting & Best Practices
Maximize efficiency, reduce costs, and improve results with these proven strategies.
Recommended Workflow
Server-Side Pre-Filtering (Collection)
In the collection session, select appropriate date ranges, folders, and deterministic criteria, and download to a local drive using EML format with MIH+ file names.
Local Post-Filtering
Further narrow the local dataset with Aid4Mail’s filters before AI processing.
Cloud Attachments (Optional)
Collect cloud attachments only for relevant emails after post-acquisition filtering.
Enable Incremental Processing (AI Session)
In the local AI session, enable incremental processing so a long run can resume after any interruption. Incremental processing cannot be combined with pre-acquisition filtering in the same session, which is why collection (step 1) and AI processing run as separate sessions.
Test and Refine
Test prompts with small samples before processing large datasets to verify results and estimate costs.
Tip: Two-Pass Cost Optimization
On corpora with low-to-moderate responsiveness (roughly 5–15%), run a fast, low-cost model first (for example, Gemini 3.1 Flash-Lite), then send only the Responsive and INCONCLUSIVE items to a premium model (for example, Claude 4.7 Opus) for a closer look. This concentrates the expensive model on the small gray-zone subset. Treat it as a workflow heuristic to validate on your data, not a measured benchmark result.
Troubleshooting Tips
Provider / API Key Errors
For cloud providers, make sure your API key is correct and active, with sufficient credits. Offline providers (Ollama/LM Studio) use no API key—confirm the local server is running and the provider is set to Available.
Prompt Errors
Use “Verify” to check for invalid prompts before processing.
Rate Limits
Monitor your provider’s rate limits. Consider enterprise platforms for large jobs.
Processing Speed
Consumer API throughput can vary with provider load. For predictable speed on large jobs, use an enterprise platform with explicit quotas, or run an offline model. For slow offline runs, reduce the context length first.
Context Window Limits
Use a model with a larger context window if needed. Avoid including attachment data with small context windows.
Output Errors
If output isn’t as expected, review your content configuration (Analyze) or folder structure (Classify).
Reproducibility & Defensibility
No current LLM is fully deterministic, even at temperature 0. Aid4Mail uses temperature 0 (greedy decoding) wherever the model supports it, which makes classification more stable across runs, but cloud batching, mixture-of-experts routing, and borderline emails can still shift a small number of results—typically ambiguous emails near the responsive/unresponsive boundary. Cloud providers can also revise a model without notice.
- •Treat the exported output produced at the time of the run as the controlling record—don’t rely on reruns to reproduce it.
- •Archive the prompt, model, provider, region, settings, run date/time, and processing logs (including AI Filter passed/rejected records).
- •For long-running matters where repeatability matters, prefer an offline model (reproducible once downloaded) or a pinned cloud model version.
- •When an auditable label must accompany every email, use Classify or an exported AI field rather than AI Filter alone before culling.
Legal Considerations
Sending data to a cloud AI provider raises important privacy and data protection considerations, especially for sensitive investigations. (Offline models process everything on your own hardware, so email content never leaves your environment—see Section 5.8.)
Disclaimer
This information is general guidance only and not legal advice. You must consult legal professionals to ensure compliance with applicable laws and regulations.
Key Principles (Regardless of Location)
- Data Minimization: Only process the minimum personal data required
- Purpose Limitation: Use processed data only for defined investigation purposes
- Data Security: Protect data under your control
- Data Retention: Delete or anonymize data when no longer needed
- Chain of Custody: Maintain a clear chain of custody
- Accuracy: Ensure data is accurate
GDPR Considerations (Europe)
- • Establish a GDPR-compliant lawful basis (legitimate interests or legal obligation)
- • Ensure Data Processing Agreement (DPA) in place with AI provider
- • Use EEA-hosted models when possible (Mistral AI, Agent Platform, or Bedrock with EU config). Note that “EU” ≠ “Europe”: the Gemini
eudeployment excludes the UK and Switzerland—use an offline model where Swiss or UK residency is required. - • Document transfer mechanisms (EU SCCs or UK Addendum)
US Considerations
- • Review applicable federal and state laws (HIPAA, COPPA, CCPA/CPRA)
- • Consider Section 702 of FISA implications
- • Understand Stored Communications Act (SCA) obligations
- • Document compliance measures thoroughly
Recommendations for All Users
- Minimize Data: Use Aid4Mail filtering to limit what is sent to AI providers
- Consult Legal Counsel: Always verify your approach with privacy and forensics experts
- Document Everything: Record your legal basis, data transfer mechanisms, and risk assessments
- Review Provider Terms: Check your AI provider’s terms of service and privacy policies
- Stay Updated: Data protection laws frequently evolve