Automated Invoice-to-Transaction Matching

In a real-world application involving approximately 1000 invoices spread across 10 different markets, the manual workload that previously took several days was reduced to just one or two hours of automated reading, followed by near-instant calculations.
Tedious and Error-prone
One of the biggest challenges in corporate accounting is manually reconciling incoming invoices with outgoing company card transactions. Accountants need to confirm that each invoice matches a real financial transaction. This requires checking amounts, payment dates, and identifying information like company names and registration numbers (IČO). This work is tedious and time-consuming. It is also prone to errors, especially when done at scale.
Secure and AI-Powered
In medium to large companies, accounting teams often handle hundreds or thousands of invoices each month. Many of these invoices arrive as photos, scans, or PDFs, typically emailed or uploaded without consistent formatting. Processing them manually takes a lot of time and attention to detail.
We developed a tool to streamline and automate the process while ensuring complete data privacy. We created an internal solution using Gemma 3, a powerful open language model that we run locally with Ollama. This setup guarantees that no invoice data leaves the company’s internal systems, allowing full control over sensitive financial documents while using AI-powered automation.
How It Works
This year, Google released Gemma3, a new state-of-the-art open model available in multiple sizes with multimodal capabilities, including image processing. Users can provide the model with both an image and a textual prompt, allowing it to generate context, reason about the image, or extract relevant information from it. The model comes in several variants. In this example, we use the second-highest version, which has 12 billion parameters. The largest version, with 27 billion parameters, offers higher performance but is more challenging to run locally due to its greater GPU memory requirements. Specifically, we use the Gemma 3-12B model quantized to 4 bits, which requires around 10 GB of GPU VRAM, a manageable amount for on-prem deployment.
To run the model locally, we use Ollama, a tool designed to simplify the management of local large language models. Ollama provides a graphical interface for chatting and testing models, and it also runs as a background service that listens for API requests. This enables easy programmatic access to the models from Python or other programming languages.
Combining Gemma 3 with Ollama creates a powerful system for converting image data into structured representations. In our workflow, documents are first converted from PDF to PNG, since Gemma 3 cannot process PDFs natively. Then, we apply a tailored prompt to extract the necessary information into a structured format. The automation continuously monitors for new documents, converts them to text, and stores the results in a central location for further analysis or calculations.
Like all LLMs, Gemma 3 is prone to hallucinations - occasional inaccuracies or fabricated outputs. To mitigate this, we process each document multiple times and select the most frequently occurring values across the runs. Finally, the results are verified by a human. This verification step only takes a few moments per document as almost all of the symbols are already entered correctly, much faster than entering all the data yourself.

The Impact
This leads to a significant reduction in manual workload and a much lower risk of oversight or human error. Accountants no longer need to sift through emails, manually extract values, or manage multiple spreadsheets and PDFs. To put this into perspective, in a real-world application involving approximately 1000 invoices spread across 10 different markets, the manual workload that previously took several days was reduced to just one or two hours of automated reading, followed by near-instant calculations. While a human remains in the loop for the final verification, smaller teams can still save several hours each month. For larger organizations with thousands of transactions monthly, this can add up to tens of hours saved each month, equivalent to several workdays regained.

More importantly, since this entire process runs securely on internal systems, companies remain fully compliant with data protection regulations and internal policies. There is no reliance on external APIs or cloud-based models, making this solution both effective and secure.
Easy to use
This tool was developed based on real feedback from finance and operations teams who faced time-consuming and error-prone invoice reconciliation. The goal was not just to automate tasks but to create a practical solution that fits into existing workflows without requiring extensive technical knowledge.
Whether for a growing startup or an established enterprise, this tool reduces cognitive load for accounting professionals, simplifies document tracking, and ensures that payments and invoices remain in sync.