AI-Powered Processing

Learn how to use Gemini and Ollama AI models for invoice extraction

Introduction to AI Processing

Invoices Reader offers advanced AI-powered processing capabilities that go beyond traditional OCR and QR code reading. These AI models can:

  • Extract data from complex invoice layouts
  • Handle invoices without QR codes
  • Process non-standard invoice formats
  • Understand context and relationships between invoice elements

AI processing is particularly useful for invoices that don't follow standard formats or don't include QR codes. The AI can "understand" the document context and extract relevant information even from varied layouts.

AI Processing Mode Selection

AI Models Overview

Gemini Logo

Google Gemini

  • Cloud-based AI model by Google
  • Requires internet connection
  • Fast processing (3-5 seconds per invoice)
  • High accuracy for complex invoices
  • Requires API key (free tier available)
Ollama Logo

Ollama

  • Local AI model that runs on your computer
  • Works offline (no internet required)
  • Slower processing (10-30 seconds per invoice)
  • Good accuracy for standard invoices
  • Free and open-source

Setting Up Gemini

To use Google Gemini for invoice processing, you'll need to set up an API key:

  1. Get a Google AI Studio API Key

    Google AI Studio and sign in with your Google account." data-ar="قم بزيارة Google AI Studio وتسجيل الدخول باستخدام حساب Google الخاص بك.">Google AI Studio and sign in with your Google account." data-ar="قم بزيارة Google AI Studio وتسجيل الدخول باستخدام حساب Google الخاص بك.">Visit Google AI Studio and sign in with your Google account.

    Create a new API key from the API Keys section.

  2. Configure Invoices Reader

    In Invoices Reader, click on the Gemini Settings button in the toolbar.

    Gemini Settings

    Enter your API key in the provided field and click Save.

  3. Select Gemini Processing Mode

    Click on the Processing Mode button and select GEMINI - fast, then click Apply.

API Usage Limits

Google AI pricing page for current limits and rates." data-ar="يقدم Google Gemini مستوى مجاني مع عدد محدود من استدعاءات API شهريًا. للمعالجة عالية الحجم، قد تحتاج إلى الترقية إلى خطة مدفوعة. تحقق من صفحة تسعير Google AI للحصول على الحدود والأسعار الحالية.">Google AI pricing page for current limits and rates." data-ar="يقدم Google Gemini مستوى مجاني مع عدد محدود من استدعاءات API شهريًا. للمعالجة عالية الحجم، قد تحتاج إلى الترقية إلى خطة مدفوعة. تحقق من صفحة تسعير Google AI للحصول على الحدود والأسعار الحالية.">Google Gemini offers a free tier with limited API calls per month. For high-volume processing, you may need to upgrade to a paid plan. Check the Google AI pricing page for current limits and rates.

Setting Up Ollama

To use Ollama for offline invoice processing:

  1. Install Ollama

    official website." data-ar="قم بتنزيل وتثبيت Ollama من الموقع الرسمي.">official website." data-ar="قم بتنزيل وتثبيت Ollama من الموقع الرسمي.">Download and install Ollama from the official website.

    Follow the installation instructions for your operating system.

  2. Download a Model

    Open a terminal or command prompt and run:

    ollama pull llama2

    This will download the Llama 2 model, which works well for invoice processing.

  3. Select Ollama Processing Mode

    In Invoices Reader, click on the Processing Mode button and select OLLAMA - slow, then click Apply.

System Requirements

Ollama requires at least 8GB of RAM and a modern CPU. For better performance, 16GB of RAM is recommended. The model files can take up several gigabytes of disk space.

Comparing Processing Modes

Feature QR Code Modes GEMINI OLLAMA
Speed Very Fast (1-3s) Fast (3-5s) Slow (10-30s)
Internet Required No Yes No
Accuracy for Standard Invoices Excellent Very Good Good
Accuracy for Complex Invoices Poor Excellent Good
Cost Free Free tier available Free
System Resources Low Low High

When to Use Each Mode

  • QR Code Modes: Best for standard electronic invoices with QR codes
  • GEMINI: Best for complex invoices, varied formats, or when highest accuracy is needed
  • OLLAMA: Best when working offline or when privacy is a concern

Best Practices for AI Processing

Image Quality Matters

AI models perform better with clear, high-resolution images. Ensure your invoices are scanned at 300 DPI or higher, and the text is clearly visible.

Test Different Models

Try processing the same invoice with different AI models to see which gives the best results for your specific invoice types.

Verify Results

Always verify the extracted data against the original invoice, especially for critical fields like amounts and tax information.

Batch Similar Invoices

Process similar invoices (same vendor or format) together using the same AI model for more consistent results.

Next Steps

Now that you understand AI-powered processing, you might want to explore: