Skip to content
Illustration of a magnifying glass linking data points across a stack of documents, raising an alert

Document analyser for fraud investigation

Updated · 3 min read

  • machine learning
  • national security
  • fraud detection

A document analyser we built for a government investigation agency in India. It reads mixed documents, links data points and flags possible fraud.

· Founding Product Engineer at Klarent

LinkedIn

TL;DR

  • We built this document analyser at Lsquared AI for one of India's government investigation agencies, to help officers spot possible fraud in large volumes of documents.
  • Each document is grouped, labelled, mined for data points, classified and combined with others, and the system raises alerts on suspicious patterns and on rules officers add.
  • Everything runs on the agency's own servers, including the machine learning models, with no calls to LLMs or any outside AI service.
  • It flagged useful alerts from the first day, helped uncover a first case within about two weeks, and processes more than a million data points a week.

This document analyser helps investigating officers spot possible fraud in large piles of paperwork. It reads documents in many formats, pulls out the useful data points, links them across files, and raises an alert when something looks off. We built it at Lsquared AI for one of India’s government investigation agencies, and it runs entirely on their own internal servers.

Some details are intentionally not mentioned here, for security reasons.

What problem did it solve?

Senior investigating officers were going through hundreds of documents every day, in all sorts of formats, to figure out where fraud might be happening. A lot of it came down to experience: remembering a similar case, or a hunch.

That works well for someone who has seen a lot of cases. But it’s slow, it’s hard to pass on, and a detail in one document doesn’t easily meet a related detail in another.

How does the document analyser work?

The idea was simple: turn the documents into connected data, then let the system watch that data alongside the officers.

Diagram: documents go through group, label, extract, classify and combine steps, ending in alerts for officers

Each document goes through the same steps:

  1. Group documents of the same kind, whatever format they come in.
  2. Label each document and its parts.
  3. Extract the data points that matter.
  4. Classify those data points, so they can be compared.
  5. Combine data points from different documents.

On top of that, the system raises alerts in two ways. It flags patterns that look suspicious on its own, and officers can also add their own rules, based on what they know from the field.

Fully local, by design

With data this sensitive, security came before everything else. The whole system runs on a server inside the agency’s own premises, and so does every machine learning model it uses.

There are no calls to LLMs or any outside AI service. No document and no data point leaves the building. All of the processing, including more than a million data points a week, happens locally.

That made some things harder. We couldn’t reach for a hosted model when something was tricky, so the models had to be trained, tuned and run on hardware we could control.

Getting it accurate

Most of the time went into iteration. The first version worked, but it wasn’t accurate enough, so we kept improving it in rounds.

The balance we kept coming back to was trust. Too many false alerts and people stop looking at them; too few and the system isn’t doing its job.

How did it turn out?

The system started flagging useful alerts from the first day, and the first case it helped uncover came within about two weeks. It now processes more than a million data points a week, all on its own servers, and it’s still in use.

My part

This was a service project at Lsquared AI, the company I co-founded. I worked on the design, much of the implementation, and the rounds of iteration on accuracy, together with the team.

I’m glad I got to work on it. It’s a different kind of project from the products I usually build, and it taught me a lot about building something people have to trust.

For more about Lsquared AI and the rest of my path, see the About page. For what I’m working on now, see Klarent.

Frequently asked questions

What does the document analyser do?

It reads documents in many formats, pulls out the useful data points, links them across files and raises an alert when something looks off. Officers can also add their own rules based on what they know from the field.

Does it use LLMs or cloud AI services?

No. The whole system runs on a server inside the agency's own premises, and so does every machine learning model it uses. No document or data point leaves the building.

How much data does it process?

More than a million data points a week, all on its own servers. It is still in use.

What was your part in the project?

It was a service project at Lsquared AI, the company I co-founded. I worked on the design, much of the implementation and the rounds of iteration on accuracy, together with the team.