Telebit manages energy and water costs across its branch offices through a modular intranet platform built from independent, specialized services. Our project focuses on the Utilities Analytics module: a backend system that routinely imports vendor utility bills from SharePoint, parses and archives them by company, utility type, and year, and generates normalized monthly invoices for analyzing consumption, total amounts, and unit pricing. This significantly reduces manual data entry and makes heterogeneous vendors and supply points (POD/PDR) directly comparable.
At the core of the solution is the parsing engine: a configurable pipeline that applies dedicated parsers for electricity, gas, and water in sequence. The first tier is deterministic, using specialized regex readers tailored to 14 utility providers—including Enel, Hera, Alperia, Acea, Iren, AcqueVenete, BrianzaAcque, Cafc, NovaReti, RuzzoReti, UmbraAcque, PiaveServizi, LivenzaTagliamentoAcque, and Ponzese—to extract invoice numbers, billing periods, POD/PDR codes, consumption figures, cost items, and tax details.
When a PDF contains no extractable native text, an advanced OCR fallback takes over: pages are rendered as PNG images and processed by a local vision-language model via Ollama, with OCR text caching for reuse across retries, image compression, and fragment reassembly. Structured data extraction is then completed in a second AI pass, guided by database-versioned prompts and Fluid templates with JSON schemas, and reinforced by anti-hallucination validation rules.
IDE: Rider, Visual Studio Code
Tecnologie: .NET 6, ASP.NET Core Web API, Entity Framework Core, SQL Server, OData, Hangfire, RabbitMQ / Rebus, Ollama (VLM locale), OpenRouter (AI remota opzionale), iText7, Docnet.Core, ImageSharp, Fluid, OpenAPI / Swagger / NSwag, OpenID Connect / Keycloak, SharePoint / Microsoft Graph, ClosedXML, Docker, CI/CD