• Insurance analytics
  • Direct client

SpryFox

Reading veterinary invoices line by line, with a model that knows how sure it is.

The challenge

Each line on a veterinary invoice is free text, such as "Canine Junior Bloodwork Profile" or "Leptospirosis Vaccine - 1 year". For pet insurance claims, every line needs a coverage code and a type: wellness, illness or accident.

What I did

I turned the invoice lines into biomedical sentence embeddings with BioLORD-2023-C, which I compared with BioBERT and all-MiniLM-L6-v2. I reduced them to 256 dimensions with UMAP and trained PyTorch MLP and LightGBM classifiers.

I calibrated the predicted probabilities and built precision-targeted variants, one tuned for 75% precision, so the model can say how sure it is. A confidence-breakpoint analysis decides which lines are automated and which go to a human.

I tracked the experiments in Neptune.ai and also tested LLM prompting with DSPy.

Results

The model scored about 604,000 invoice lines, and 84% of its predictions were correct. The average confidence is 0.91 on correct predictions versus 0.50 on wrong ones. That gap makes a clean threshold for routing uncertain lines to a human reviewer.

Contact

Bring me your analytics question


Send a short email. I reply within two working days with whether I can help, a rough plan and a fixed quote.