AI Data Extraction: Benchmarking GPT-4o vs. Veryfi

A comparative AI pipeline, extracting structured financial data from irregular scans into Excel using Python. Benchmarked across multiple document types. Identified cost-per-extraction and accuracy tradeoffs between both approaches.

Overview

Benchmarked across multiple document types. Identified cost-per-extraction and accuracy tradeoffs between both approaches.

PDF to Excel using AI

This project addresses the challenge of “dark data” trapped in irregular, low-quality scans and PDFs. By building a dual-engine extraction system, I compared OpenAI’s GPT-4o (a general-purpose Multimodal LLM) and Veryfi (a specialized financial OCR API).

The goal was to evaluate which system better handles real-world “noise” like faded text, line-item multipliers, and complex document layouts for downstream financial analysis.


Demo (Video)



Tech Stack


Python Scripts Explanation

OpenAI GPT-4o Integration

The OpenAI script utilizes the instructor library to enforce a strict Pydantic schema. Because GPT-4o is a reasoning model, the script uses specialized “System Prompts” to handle mathematical extraction.

Veryfi API Integration

The Veryfi script uses a dedicated financial OCR engine designed specifically for receipts and invoices.


Key Learnings & Conclusion

Excel Output




← Back to projects