ClaimPilot prepares a travel insurance claim decision that the claims handler only reviews and approves: it extracts data from documents in six languages, matches it to the policy terms, calculates the payout and writes the letter. In testing it reads 99.3 % of critical fields correctly.

Public portfolio project. Runs entirely on one computer with local models, on synthetic data only.

Problem

For every claim, the handler retypes amounts, dates and diagnoses from medical reports, invoices and airline confirmations, looks up the matching policy clauses and calculates the payout. Personal data must not reach an external model.

Solution

Before every model call, names, national ID numbers, IBANs and addresses are replaced with tokens. Rules run before the models, the models read and classify, and Python calculates amounts, limits, deductibles and exchange rates. Every value links to the place in the document where it was read, and the handler approves every decision.

Results

  • Critical fields (amounts, dates, policy number, IBAN, diagnosis): 99.3 % correct in testing
  • Document type 98.7 %, payout exact to the cent 88.9 %
  • Letters: 0 invented numbers, dates or clauses in 54 texts
  • Instructions planted in documents didn't change a single decision

Stack

  • Python, FastAPI, Next.js
  • Ollama: Qwen3 30B-A3B, Qwen3-VL 8B, bge-m3
  • Postgres + pgvector, Redis
  • Evaluation on 40 development and 20 test claims

What I learned

In the test set, one doctor's name on a signature line slipped through anonymization, so I added another detector based on the field label. A mixture-of-experts model matched the accuracy of a smaller model and was 2.4 times faster: choose the model by measuring, not guessing.

GitHub: claimpilot

Related