Streamlining Accounting with GenAI: An OCR and Data Comparison Solution

The Client
By using the power of GenAI, First Line Software helped a leading U.S.-based printing and marketing company drastically reduce document processing time and improve accuracy. Our client serves diverse industries such as retail, publishing, and healthcare. Renowned for its quality and customer service, the client counts many premiere brands among its customers. For years, they have partnered with First Line Software to develop custom applications.
The Challenge
Our client needed to modernize its proprietary Electronic Document Management (EDM) System and improve employee efficiency by integrating generative AI (GenAI). Its accounting department spent a significant amount of time verifying incoming documents against the data entered into its ERP systems. Additionally, errors often occur during field comparisons, such as mismatches in company names, invoice numbers, invoice amounts, supplier numbers, and more.
To optimize these processes, First Line Software developed an application with an integrated GenAI module. This tool performs multi-step data recognition from uploaded documents, converts the extracted information into text, and, through integration with a web application, conducts a comparative analysis.
As a result, matching or incorrect data is highlighted. Accountants or responsible employees can easily review the findings and simply approve or resolve discrepancies, saving time while maintaining high efficiency.
The Solution
First Line Software proposed and built an automated tool to recognize text and compare it with correct index fields in the Electronic Document Management (EDM) system application, leveraging OpenAI to analyze product attachments in various formats (PDF, TIFF, PNG).

Key implementation steps included:
- Azure Function: A function accepting a list of imported files from email or CRM/ERP systems in formats like PDF, DOC, JPEG, TIFF, and PNG.
- .NET Framework Console Application: A console app that calls the Azure function and displays output.
- Web Application Integration: Securing and incorporating the Azure function into the client’s existing .NET web app, along with a configuration page for managing keys, endpoints, and subscriptions.
- LLM-based Values Extractor: The tool, enriched by the database using keywords, precisely identifies index fields in the documents retrieved from external systems.
- Azure OpenAI GPT-4 Model: This component is responsible for OCR operations to process the document.
- Azure Cost Control: To limit and prevent high costs, Microsoft Azure’s native tools provide cost analysis, budgets, and alerts.
- Email Server or File Upload: A component integrated with the GenAI tool for further text recognition.
Data Ingestion, Analysis, and Classification with Generative AI
Leveraging generative AI for optical character recognition (OCR), First Line Software developed a solution that analyzes uploaded documents and compares extracted data with existing fields. Based on predefined conditions, the solution highlights discrepancies for the user, significantly reducing document processing time within the company’s workflow.
The solution required both front-end and back-end updates and was completed within a week.
The Team
- AI Engineer
- Prompt Engineer
- DevOps Specialist
- Senior Developer
Outcomes
- Processing Velocity Improvement: Users can now find values in the system instantly.
- Improved User Experience: AI-driven highlighting of similarities provided relevant results, decreasing users’ daily tasks.
- Reduced Manual Labor: Automation reduces the amount of time users spend comparing values in documents.
- Streamlined Electronic Document Management (EDM): Semi-automatic document processing of any documents ‘on the fly.’
- Future-Ready Infrastructure: Integrating generative AI prepares the client to adopt future AI advancements.
- Client Satisfaction and Retention: The solution strengthens the partnership between our client and their clients, promoting future collaboration.
This generative AI-driven approach streamlined the client’s accounting processing, aligning with both operational and business growth goals.