Adamantia by-design
With Giorni Ferro
15/10/2024
30/04/2025
15/10/2024
30/04/2025
Welcome to our official case study featuring Giorni Ferro: a deep dive into a real-world customer journey, showcasing how we are conquering modern industry challenges with cutting-edge Artificial Intelligence.
Background
Meet Giorni Ferro
Established in 1950 by Ferdinando Giorni, Giorni Ferro S.p.A. initially stepped up to supply critical materials and machinery during Italy’s post-war rebuilding era.
Driven by non-stop growth, the company has consistently expanded its corporate offices, storage units, and specialized labs. Today, its massive facilities span 25,000 square meters, with 10,000 square meters fully covered, offering clients unparalleled technical expertise and specialized support.
THE CHALLENGE
Needs & Objectives
Every year, Giorni Ferro receives approximately 1,000 documents (including transport documents (DDT) and certificates of origin or quality) from its suppliers.
These documents arrive either via email as PDFs or in physical paper format. Operators are currently responsible for archiving these files and entering them into the WMS (Warehouse Management System).
The existing archiving and classification process is manual and time-consuming, requiring staff to organize files into folders and rename them by hand.
Once archived, operators must also link the quality and origin certificates to the corresponding DDTs. This step is crucial to ensure certificates are readily available for shipments and that clients receive all necessary compliance documentation.
To achieve this, operators have to manually split multi-page certificates into individual images and attach them to the matching DDT lines within the WMS.
The primary goal of this project is to drastically reduce the time spent on archiving and classifying documents by shifting to a nearly fully automated process.
THE SOLUTION
Generative AI
To meet these objectives, we designed and implemented a system that includes:
Document archiving in a centralized database
Advanced document search using user-defined attributes (supplier, document number, date, etc.)
Automated document splitting into individual images
Template creation for automated data extraction
Generative AI integration to handle and process unrecognized or unstructured documents
Document Processing Pipeline
The document processing pipeline consists of the following steps:
Document splitting into individual images
Orientation and deskew correction using Hough Lines transformation
Full-text extraction via OCR (Optical Character Recognition)
Template-based extraction application (if a match is found)
Generative AI fallback for unstructured data extraction
HOW THEY WORK
The template
Users can select key areas of interest within the document. The extraction of relevant fields is then performed via regex-based matching, and the extracted data is automatically mapped to the corresponding database fields.
During the template creation phase, the user can also define a set of similar documents to validate extraction accuracy. This step ensures that the template has been correctly implemented and that the captured data is precise.
HOW IT STEPS IN
Generative AI
If no match is found within the predefined templates, the system automatically routes the document to a Generative AI model for data extraction.
For this phase, multiple architectural solutions are viable. The system can leverage either an external cloud service (such as OpenAI) or a locally deployed model. In both scenarios, we can employ generalized foundation models (like GPT-4o) or models that have undergone fine-tuning on domain-specific data (such as T5 or GPT-4o-mini).
Every single one of these solutions has been thoroughly tested and successfully implemented within the project framework.
FEATURES
Technologies & Architecture
We selected a client-server architecture featuring a web interface for user interaction. The server handles document processing and database management, while the client delivers an intuitive user interface for document search and visualization. The core advantage of this architecture lies in the decoupling of the frontend and backend, which ensures greater flexibility and scalability. Furthermore, the backend exposes a RESTful API for client interaction, seamlessly enabling integration with external systems and applications.
Backend: Developed in Python, leveraging its rich ecosystem of libraries and frameworks for advanced document processing and AI model implementation.
Frontend: Built with Angular (Google’s framework) to deliver a modern, highly responsive web application.
Database & Storage: We chose SQLite, a lightweight and efficient relational database. Given the specific data volume, a dedicated database server was unnecessary; the raw files (PDFs and images) are securely stored directly within the filesystem, leaving the database to manage only the document metadata.
OCR Engine: All optical character recognition and baseline data extraction are powered by Tesseract, the renowned open-source OCR engine developed by Google.
Generative AI Models: For AI-driven data extraction, we benchmarked several models including GPT-2, T5, GPT-4o, and GPT-4o-mini. The results were thoroughly compared and analyzed to determine the optimal balance between performance and accuracy.
Performance & Results
The following results are based on data from the year 2023 (approximately 800 documents).
By defining around 40 custom templates, the system successfully and precisely classified 70% of the documents in a fully automated manner.
The captured data was subsequently used to train various Generative AI models, with performance metrics detailed below.
On-premise model training (GPT-2 and T5) was executed locally leveraging an NVIDIA RTX 3060 Ti GPU, while cloud-based models were processed using the OpenAI platform.