Combine multiple OCR engines + two LLMs and pick the best JSON by majority voting to boost invoice OCR accuracy and speed.

December 23, 20246 min

Overview

Production Readiness

0.5

Novelty Score

0.6

Cost Impact Score

0.6

Citation Count

1

Authors

Osama Abdellatif, Ahmed Ayman, Ali Hamdi

Links

Abstract / PDF

Why It Matters For Business

Combining multiple OCR engines with LLM-based JSON conversion and majority voting can cut extraction errors and improve throughput for invoice automation, reducing manual fixes and speeding up batch processing.

Summary TLDR

LMV-RPA is a production-style pipeline that runs four OCR engines (PaddleOCR, Tesseract, EasyOCR, DocTR), sends each OCR output to two Large Language Models (LLMs) to convert text into JSON, and picks the final structured result by majority voting. On a 100-image invoice test set the authors report 99% extraction accuracy versus a 94% baseline and an average runtime of 121.27s versus 212–218s for UiPath/Automation Anywhere. The study is promising but uses a small invoice-focused dataset and constrained free-tier APIs, so expect more validation before deploying at scale.

Problem Statement

Standard OCR in RPA struggles with ambiguous characters and complex layouts. Single-engine OCR often misreads noisy or varied invoices and manual fixes are expensive. The paper seeks a reliable, automated pipeline that both improves accuracy of extracted fields and outputs structured JSON for downstream RPA tasks.

Main Contribution

LMV-RPA pipeline: multi-OCR (PaddleOCR, Tesseract, EasyOCR, DocTR) + two LLMs to convert each OCR output to JSON, then majority-vote across JSON outputs.

Empirical comparison showing higher extraction accuracy (reported 99% vs 94%) on a 100-image invoice dataset.

Runtime comparison against UiPath and Automation Anywhere showing shorter average run time for LMV-RPA (121.27s) under the paper's test conditions.

Key Findings

LMV-RPA achieved higher extraction accuracy than the baseline.

Numbers99% vs 94% (reported on 100 invoices)

LMV-RPA ran faster, on average, than two commercial RPA platforms in authors' tests.

NumbersAverage runtime 121.27s vs UiPath 212.33s and Automation Anywhere 217.80s

Experiments used a small, invoice-focused dataset and free-tier tooling with a 5s added delay.

Numbers100 images; 5s artificial delay noted

Results

Accuracy

Value99%

BaselineTraditional (1 OCR + 1-layer LLM)

Average runtime

Value121.27 sec

BaselineUiPath 212.33 sec; Automation Anywhere 217.80 sec

Who Should Care

What To Try In 7 Days

Run LMV-RPA on a small sample of your invoices (50–200) and compare field-level accuracy to your current tool.

Log per-file runtimes to check throughput under your hardware and adjust polling interval.

Test failure cases: low-quality scans, unusual layouts, and non-invoice documents to map limitations.

Agent Features

Memory

  • Short-term file tracking (seen vs new files)

Planning

  • Simple event-driven monitoring (detect new files and process)

Tool Use

  • Uses multiple OCR engines and LLMs as tools

Frameworks

  • Custom RPA pipeline (LMV-RPA)

Is Agentic

true

Architectures

  • Pipeline: multi-OCR → 2 LLMs → majority voting
  • Continuous directory-watching loop

Collaboration

  • Voting across independent OCR+LLM outputs

Optimization Features

System Optimization

  • Asynchronous multi-engine processing to shorten end-to-end time

Inference Optimization

  • Parallel OCR engines to improve robustness
  • Majority voting reduces need for heavier single-model correction

Reproducibility

Code Urls

  • Repo

Data Urls

  • data set

Code Available

Data Available

Open Source Status

  • partial

Risks & Boundaries

Limitations

  • Small dataset (100 images) focused on invoices only.
  • Authors used free-tier OCR/APIs and added a 5s delay, which may alter runtime behavior.
  • No public, standardized benchmark comparisons beyond UiPath/Automation Anywhere runtimes.
  • Missing detailed LLM prompts, model sizes, and inference hardware details.

When Not To Use

  • For non-invoice or very different document types without retesting.
  • When strict, provable privacy constraints forbid sending text to external LLMs.
  • If real-time per-document latency below the reported seconds-level is required without further optimization.

Failure Modes

  • Majority voting can reinforce a common OCR misread if all engines err the same way.
  • LLMs may alter or hallucinate critical field text when converting to JSON.
  • Ties or inconsistent JSON structures across engines can break downstream parsing.

Core Entities

Models

  • LLaMA 3
  • Gemini-1.5-pro
  • PaddleOCR
  • Tesseract
  • EasyOCR
  • DocTR

Metrics

  • Accuracy
  • average runtime (seconds)

Datasets

  • 100-image invoice dataset (Kaggle/Roboflow/Kozlowski samples)
  • Kaggle invoice-like images
  • Roboflow invoice_data
  • Kozlowski Samples of Electronic Invoices