Skip to content
Home / Portfolio / AI fraud detection in production
Software

AI fraud detection in production

For In-house Smart BI module

AI fraud detection in production
Client
In-house Smart BI module
Category
Software
Delivered
January 2025

Live anomaly-detection pipeline flagging cash-variance and inventory-shrinkage patterns for CEO review via Telegram. Trained on eighteen months of operational data.

Live anomaly-detection pipeline that watches cash-variance and inventory-shrinkage events at AandA and flags the ones that don't look like the historical pattern. Built as a module inside the Smart BI platform, running in production for 14 months.

The problem

Cash discrepancies are normal in a shop with foot traffic. A ₦500 variance nobody can explain but everyone accepts. A ₦200 short at closing. These are noise. The problem is that once you accept a certain level of noise, a real ₦12,000 fraud event hides comfortably inside it until someone gets suspicious enough to audit.

The model

We deployed an Isolation Forest model that reads every closing-shift reconciliation event. For each event it considers the amount, the shift, the day of the week, the seasonal position, and the individual staff member's baseline. It produces an anomaly score — a measure of how surprising this event is compared to the historical pattern — and posts to Telegram immediately when the score exceeds threshold.

The two hard lessons

The threshold isn't fixed. Seasonality is real. December is not August. The model self-tunes against a rolling baseline so it doesn't spam alerts during known-busy periods. Retraining is automated and runs weekly.

Alerts must include context. “Anomaly detected” is useless. “Anomaly detected: variance ₦8,400, staff member Aisha, shift 12–8, expected variance range ₦0–₦2,000” — that's actionable in one glance. Every Telegram alert we send now includes the transaction reference, the anomaly score, and one-line context.

What it does now

The CEO receives an alert within 90 seconds of a suspicious close-out event. Most alerts turn out to be legitimate variance the model didn't recognize (which then feeds back into training). A small number turn out to be real problems — sometimes fraud, sometimes just a miscount that would have compounded silently if nobody had noticed.

Numbers

  • 14 months in production without downtime
  • 90 seconds from anomaly to Telegram alert
  • Weekly auto-retraining against rolling baseline
  • Isolation Forest + PostgreSQL feature store + Telegram delivery

The AI story that matters in a Nigerian SME right now isn't chatbots. It's watchdogs. We would build the same thing for you if you have a shop-floor or field operation where variance is the signal you can't afford to miss.

Let’s work together

Have a project
in mind?

Tell us what you need. We come back with a written scope and quote within 48 hours.