Skip to main content

05 - Claims Automation: Computer Vision, OCR and Triage

How to automate a car claim: rule-based triage, damage estimates with a confidence threshold, document extraction and the article 148 deadlines.

What do you think about this article?

At a Glance

How to automate a car claim: rule-based triage, damage estimates with a confidence threshold, document extraction and the article 148 deadlines.

What you actually automate in a claim

Automating a claim does not mean letting a model decide: it means establishing, for each case, who works it (a rule, a model or a person) and how much error you are willing to accept on that path. The artificial intelligence part, that is reading a photo or a document, is the most visible but also the smallest: the work that holds the system up is deciding when to trust the model's output and when to stop.

Take a concrete case. Marta rear-ends a car stopped at a traffic light, fills in the joint accident report (the CAI form, constatazione amichevole) with the other driver and uploads four photos from her phone. For this case a well-built system does three things in a few seconds: it recognises a collision without injuries, estimates the damage from the photos and checks that the body shop's quote is consistent with the estimate. If even one of these checks fails, the case goes to a person with the reason written down. Faced with a report involving injured people, the same system must not even try.

In this article you build the pieces of that system with code I actually ran: the triage of the report, the aggregation of damage estimates, the extraction of data from documents and the workflow with its states. I tell you right away where the code stops: the test machine has no PyTorch, so the recognition of damage from photos is a sketch to adapt, while everything around the model runs and is shown with its output. The market figures that circulate about claims automation (percentages of cases closed without human intervention, cost reductions) I do not report: without a verifiable primary source they are not data, they are slogans. Before this article you need the insurance domain and, for the relationship with pricing, underwriting with AI.

Report triage: rules come before models

The claim report (FNOL, first notice of loss) is the first contact. Whoever receives it has to answer a single question: which path will this case follow? A classification model is of little use here, because the decisive information is declared by the customer (are there injured people? are there third parties? is there a report?) and a rule reads it without ambiguity. A model is useful, if anything, upstream, to produce a fraud risk indicator to feed into the rules, as the fraud detection system of the next article does.

The listing below makes three choices worth reading. The first: Segnalazione is a dataclass(frozen=True), so no rule can modify the report while evaluating it. The second: tipo_sinistro looks for word stems (rear-end, windscreen) anchored at the start of the word with \b, because searching for an arbitrary substring produces false positives that you will see in the section on documents. The third, and the most important: in instrada the order of the rules is the behaviour. Injuries come first because no combination of the other signals must ever be able to override them; the fraud signal comes before the third parties involved because a suspicious case must not end up on the guided path just because there is a report.

Claim triage: rules in priority order
import re
from dataclasses import dataclass
from enum import Enum


class Percorso(str, Enum):
    AUTOMATICO = "automatic"
    GUIDATO = "guided"
    UMANO = "human"


@dataclass(frozen=True)
class Segnalazione:
    descrizione: str
    foto: int
    terzi_coinvolti: bool
    lesioni: bool
    verbale_disponibile: bool
    punteggio_frode: float  # 0-1, produced by an upstream model


RADICI = {
    "collision": ("accident", "collision", "rear-end", "crash", "struck"),
    "theft": ("theft", "stolen", "steal"),
    "glass": ("windscreen", "windshield", "glass"),
    "water": ("flood", "leak", "seepage"),
}


def tipo_sinistro(testo: str) -> str:
    """A stem counts only if it starts a word: 'glass' finds 'glasses' but not 'sunglass'."""
    testo = testo.lower()
    punti = {
        tipo: sum(1 for r in radici if re.search(r"\b" + r, testo))
        for tipo, radici in RADICI.items()
    }
    migliore = max(punti, key=punti.get)
    return migliore if punti[migliore] > 0 else "unknown"


def instrada(s: Segnalazione) -> tuple[Percorso, str]:
    """Read the rules from the top: the first one that fires decides."""
    if s.lesioni:
        return Percorso.UMANO, "personal injury: a person always decides"
    if s.punteggio_frode >= 0.5:
        return Percorso.UMANO, "high fraud indicator: an investigation is needed"
    if s.terzi_coinvolti and not s.verbale_disponibile:
        return Percorso.UMANO, "third parties involved, no report: accounts to reconcile"
    if s.terzi_coinvolti or s.punteggio_frode >= 0.3:
        return Percorso.GUIDATO, "straightforward case, but with one element to check"
    if s.foto < 2:
        return Percorso.GUIDATO, "not enough photos: ask the customer for them"
    return Percorso.AUTOMATICO, "single damage, documented, no risk signal"


CASI = [
    Segnalazione("A stone cracked the windscreen on the motorway", 3, False, False, False, 0.05),
    Segnalazione("Rear-ended at the traffic light, the CAI form is signed by both", 4, True, False, True, 0.10),
    Segnalazione("Collision at the junction, the other driver denies it", 2, True, False, False, 0.20),
    Segnalazione("Struck a pole in the car park", 1, False, False, False, 0.05),
    Segnalazione("Accident with a fractured instep", 5, True, True, True, 0.10),
]

for caso in CASI:
    percorso, motivo = instrada(caso)
    print(f"{tipo_sinistro(caso.descrizione):<11} {percorso.value:<10} {motivo}")

# Output:
# glass       automatic  single damage, documented, no risk signal
# collision   guided     straightforward case, but with one element to check
# collision   human      third parties involved, no report: accounts to reconcile
# collision   guided     not enough photos: ask the customer for them
# collision   human      personal injury: a person always decides

The output shows five cases, one for each possible outcome. The windscreen with three photos and no risk signal is the only one that reaches the automatic path. The rear-end collision with the CAI signed by both stays guided because there is a third party: the rule does not say "suspicious", it says "a check is needed". The collision at the junction with the other driver denying it, without a report, goes to a person. The strike against a pole in the car park with a single photo is not rejected: the customer is asked for the second photo. And the case with the fracture goes straight to an operator, whatever the rest. Every output carries a reason in plain words, and it is not a whim: the reason is what the operator will read and what you will have to show if a customer disputes the path.

Which data do these rules need? Few, and they must be made mandatory in the report form:

  • whether anyone is injured, even if only suspected;
  • whether other vehicles or people are involved, and whether a report or a joint accident form exists;
  • how many photos were uploaded and whether they are legible;
  • the fraud risk score computed upstream, with the version of the model that produced it.

The last point is the one that gets forgotten: a score without the model version cannot be reconstructed. If in six months someone asks why that case ended up in an investigation, you need to know which model said 0.62, not just that it said it. The other three are data declared by the customer: if they are missing, the right rule is to ask for them, not to guess them.

Estimating damage from photos

The model: a sketch to adapt

Estimating damage from photos is a computer vision problem: given an image, say which part is damaged and how badly. The reasonable starting point is transfer learning: you take a network already trained to recognise images in general, replace the last layer with one that produces your classes and train it on your labelled photos. The sketch below loads a torchvision ResNet-50 without pretrained weights and applies to it the weights you obtained yourself. It is a sketch to adapt, not executed: PyTorch is not available on the machine where I tried the code, and I will not give you an invented output.

Sketch to adapt: classification head on ResNet-50
import torch
from torchvision.models import resnet50

PARTI = ["front_bumper", "left_door", "right_headlight"]   # in real life: every part you need
GRAVITA = ["minor", "moderate", "severe"]


def carica_modello(percorso_pesi: str) -> torch.nn.Module:
    modello = resnet50(weights=None)                   # architecture without pretrained weights
    modello.fc = torch.nn.Linear(modello.fc.in_features, len(PARTI) * len(GRAVITA))
    modello.load_state_dict(torch.load(percorso_pesi, map_location="cpu"))
    return modello.eval()                              # eval(): turns off dropout and the update of the statistics

Three things to know. The constructor resnet50(weights=None) creates the architecture with random weights: you load the real weights with load_state_dict, and the torchvision documentation confirms that the weights parameter is None if you do not specify it. Load with torch.load only files you produced yourself, because the saving format is based on pickle. Finally, a head with nine outputs (3 parts times 3 severities) assigns a single label per photo: fine to start with, but a photo showing two damaged parts requires a detection or segmentation model, which returns several regions per image. In a real product the labelled dataset is the expensive part, not the code.

From detections to the quote, and when to stop

Whatever the model, downstream you get a list of detections: part, severity, confidence. The next listing is the part that runs. It aggregates the detections from all the photos taking, for each part, the worst severity seen in any photo (a door dented in one photo and intact in another is dented), translates it into a cost with a table and stops if the minimum confidence on a part falls below the threshold. The cost table is didactic: the numbers are made up for the example, they are not spare-part prices.

Aggregation of detections and choice of the confidence threshold
import numpy as np

GRAVITA = {"minor": 0, "moderate": 1, "severe": 2}
# DIDACTIC table in euro: these are not real spare-part prices.
COSTI = {
    "front_bumper": {"minor": 200, "moderate": 600, "severe": 1200},
    "left_door": {"minor": 250, "moderate": 700, "severe": 1400},
    "right_headlight": {"minor": 80, "moderate": 200, "severe": 400},
}
SOGLIA_CONFIDENZA = 0.70


def stima(rilevazioni):
    """rilevazioni: (part, severity, confidence) coming from all the photos."""
    per_parte = {}
    for parte, gravita, conf in rilevazioni:
        per_parte.setdefault(parte, []).append((GRAVITA[gravita], gravita, conf))
    totale, dubbie = 0, []
    for parte, voci in per_parte.items():
        _, gravita, _ = max(voci)               # the worst severity seen in any photo
        conf_minima = min(c for _, _, c in voci)
        totale += COSTI[parte][gravita]
        if conf_minima < SOGLIA_CONFIDENZA:
            dubbie.append(parte)
    esito = "inspection" if dubbie else "automatic estimate"
    return totale, esito, dubbie


chiaro = [("front_bumper", "moderate", 0.91), ("front_bumper", "moderate", 0.88), ("right_headlight", "minor", 0.84)]
incerto = [("left_door", "minor", 0.93), ("left_door", "severe", 0.55), ("right_headlight", "minor", 0.80)]
print("clear    :", stima(chiaro))
print("uncertain:", stima(incerto))

# What is the threshold worth? Didactic model: 10,000 synthetic detections, fixed seed.
# Assumption (to be checked on real data): the confidence is CALIBRATED, that is, a
# detection with confidence c is correct with probability c.
rng = np.random.default_rng(2026)
conf = rng.beta(5, 2, size=10_000)
corretta = rng.random(10_000) < conf
print("threshold  automatic_share  errors_among_automatic")
for soglia in (0.50, 0.70, 0.85, 0.95):
    auto = conf >= soglia
    print(f"{soglia:>9.2f}  {auto.mean():>15.1%}  {1 - corretta[auto].mean():>22.1%}")

# Output:
# clear    : (680, 'automatic estimate', [])
# uncertain: (1480, 'inspection', ['left_door'])
# threshold  automatic_share  errors_among_automatic
#      0.50            89.4%                   24.6%
#      0.70            58.5%                   17.8%
#      0.85            23.0%                    9.6%
#      0.95             3.3%                    3.9%

The first two lines of output show the mechanism. In the clear case the bumper is seen twice with high confidence and the automatic estimate is worth 680 euros. In the uncertain case one photo says the door is slightly damaged with confidence 0.93 and another reports it as severely damaged with confidence 0.55: the system takes the worst severity (1,400 euros plus 80 for the headlight makes 1,480) and, since 0.55 is below the 0.70 threshold, asks for an inspection instead of offering that figure.

The final table is a didactic model with a fixed seed, not a measurement on real claims. It generates 10,000 synthetic detections with confidences distributed as a Beta(5, 2) and assumes a calibrated confidence: a detection with confidence c is correct with probability c. Under this assumption, raising the threshold from 0.50 to 0.85 reduces the errors among the cases handled automatically from 24.6% to 9.6%, but brings the share of automatic cases down from 89.4% to 23.0%. At 0.95 errors are 3.9% and automatic cases are 3.3%: a system that automates almost nothing. There is no "right" threshold, there is a trade-off between the cost of an error and the cost of an inspection, and you choose the threshold by measuring the two costs.

Beware of the calibration assumption: it is the one that in the real world almost never holds. The authors of On Calibration of Modern Neural Networks show that modern neural networks are poorly calibrated, that is, their confidence does not match the frequency with which they are right. Before setting the threshold you measure, on photos the model has never seen, how often it is right at each confidence level; if the curve does not follow the diagonal, you either calibrate the model or choose the threshold on the measured curve.

Reading documents: regex, OCR and their errors

Every case carries documents: the joint accident form, the police report, the body shop quote, the invoice. To extract their fields (plate, date, amounts) there is a family of tools, from regular expressions to entity recognition models such as spaCy; here I use only the standard library, because for fields with a fixed shape a well-written rule beats a model and can be explained to a customer who disputes it. The listing shows three real defects, the kind that go unnoticed until a large amount disappears. The document of the example is written in English, but its amounts keep the Italian notation of the original (1.250,00 means one thousand two hundred and fifty euros: the dot separates thousands, the comma the decimals), because that is exactly what the parsing has to cope with.

Extraction of plates, amounts and dates, with the three most common errors
import random
import re
import string
from datetime import datetime
from decimal import Decimal

# 1. The false positive that comes from "in" on a string
testo = "The driver reports an incident on Via Roma"
print("'cid' in text       :", "cid" in testo.lower())
print("\\bcid\\b in the text :", bool(re.search(r"\bcid\b", testo.lower())))

# 2. Amounts in Italian notation: the dot separates thousands, the comma the decimals
IMPORTO = re.compile(
    r"(?:€|EUR)\s*(\d{1,3}(?:\.\d{3})+(?:,\d{1,2})?|\d+(?:,\d{1,2})?)"
    r"|(\d{1,3}(?:\.\d{3})+(?:,\d{1,2})?|\d+(?:,\d{1,2})?)\s*(?:€|EUR)"
)


def importo(grezzo: str) -> Decimal:
    return Decimal(grezzo.replace(".", "").replace(",", "."))


# The naive version: it replaces only the comma
try:
    float("1.250,00".replace(",", "."))
except ValueError as e:
    print("naive on 1.250,00:", e)
print("correct on 1.250,00:", importo("1.250,00"))

TARGA = re.compile(r"\b[A-Z]{2}\d{3}[A-Z]{2}\b")
DATA = re.compile(r"\b(\d{1,2})/(\d{1,2})/(\d{4})\b")

# The quote is written in English, but the amounts keep the Italian notation
# of the original document (1.250,00 = one thousand two hundred fifty euro).
DOCUMENTO = """Body shop quote of 14/03/2026 for the car with plate FK123RT.
Front bumper replacement € 1.250,00, labour 380,50 EUR, total 1.630,50 €.
Declared date of loss: 31/02/2026."""

print("plates :", TARGA.findall(DOCUMENTO))
print("amounts:", [str(importo(a or b)) for a, b in IMPORTO.findall(DOCUMENTO)])
for g, m, a in DATA.findall(DOCUMENTO):
    try:
        print("date   :", datetime(int(a), int(m), int(g)).date())
    except ValueError:
        print(f"date   : {g}/{m}/{a} has the right shape but does not exist")

# 3. What OCR does to plates: 5,000 synthetic plates, fixed seed.
# The noise swaps similar digits and letters (0/O, 1/I, 5/S, 8/B) in both directions.
rng = random.Random(7)
A_LETTERA = {"0": "O", "1": "I", "5": "S", "8": "B"}
A_CIFRA = {v: k for k, v in A_LETTERA.items()}
targhe = ["".join(rng.choices(string.ascii_uppercase, k=2)) + f"{rng.randrange(1000):03d}"
          + "".join(rng.choices(string.ascii_uppercase, k=2)) for _ in range(5000)]


def rumore(targa: str, p: float) -> str:
    out = []
    for c in targa:
        scambio = A_LETTERA if c.isdigit() else A_CIFRA
        out.append(scambio.get(c, c) if rng.random() < p else c)
    return "".join(out)


def correggi_per_posizione(t: str) -> str:
    """Positions 2-4 are digits, the others letters: the error is fixed where the shape demands it."""
    if len(t) != 7:
        return t
    return "".join(A_CIFRA.get(c, c) if 2 <= i <= 4 else A_LETTERA.get(c, c) for i, c in enumerate(t))


for p in (0.0, 0.02, 0.10):
    letto = [rumore(t, p) for t in targhe]
    grezze = sum(1 for t in letto if TARGA.fullmatch(t))
    corrette = sum(1 for t, l in zip(targhe, letto) if correggi_per_posizione(l) == t)
    print(f"OCR error {p:>4.0%}: direct regex {grezze/len(targhe):.1%}, after positional correction {corrette/len(targhe):.1%}")

# Output:
# 'cid' in text       : True
# \bcid\b in the text : False
# naive on 1.250,00: could not convert string to float: '1.250.00'
# correct on 1.250,00: 1250.00
# plates : ['FK123RT']
# amounts: ['1250.00', '380.50', '1630.50']
# date   : 2026-03-14
# date   : 31/02/2026 has the right shape but does not exist
# OCR error   0%: direct regex 100.0%, after positional correction 100.0%
# OCR error   2%: direct regex 96.4%, after positional correction 100.0%
# OCR error  10%: direct regex 83.3%, after positional correction 100.0%

The first defect is the substring. Classifying a document as a CAI form because it contains "cid" seems harmless, but "cid" in text is True even for the word "incident": every report that mentions an incident would have been mistaken for a form. With \bcid\b the word must stand on its own. The second is the amount in Italian notation: replacing the comma with a dot on "1.250,00" produces "1.250.00", and float raises an error. Code that swallowed it with an except ValueError: pass would have discarded precisely the highest amounts, the ones that matter. The correct conversion first removes the thousands dots and only then turns the comma into a dot, using Decimal because money is not handled with floating point. The limit is declared: the rule presupposes amounts written in the Italian way, and "1.250" on its own is read as one thousand two hundred and fifty.

The third defect concerns the date: "31/02/2026" has the right shape and does not exist. The regular expression does not know, validation with datetime does, and that is why extraction and checking remain two distinct steps. The last part of the output instead measures the effect of OCR on 5,000 synthetic plates: with 2% of characters swapped (0 with O, 1 with I, 5 with S, 8 with B) the regex finds 96.4% of the plates, with 10% it finds 83.3%. The positional correction, which exploits the fact that in current plates the third, fourth and fifth positions are digits and the others letters, recovers all of them. This 100% is an artefact of the test: the synthetic noise uses the same swaps as the correction. With a real OCR the recovery is lower, and what is left out must be an empty field with low confidence, not a guessed value. Plates issued in earlier periods have different shapes and require patterns of their own.

The workflow: allowed states and legal deadlines

When the pieces are many, the typical mistake is to let each one change the state of the case as it likes. The remedy is a state machine: a table declares which transitions are allowed and a single method, porta_a, carries them out, writing each time a history row (when, from where, to where, why). A transition that is not allowed raises an exception instead of corrupting the case. The listing does not read the system clock: the moment is passed in by the caller, so the result is the same at every run and the test is simple.

State machine of the claim and the deadlines of article 148
from datetime import date, datetime, timedelta
from enum import Enum


class Stato(str, Enum):
    RICEVUTO = "received"
    INSTRADATO = "routed"
    DOCUMENTI_MANCANTI = "missing_documents"
    ISTRUTTORIA = "investigation"
    OFFERTA = "offer"
    REVISIONE_UMANA = "human_review"
    CHIUSO = "closed"


S = Stato
AMMESSE = {
    S.RICEVUTO: {S.INSTRADATO},
    S.INSTRADATO: {S.DOCUMENTI_MANCANTI, S.ISTRUTTORIA, S.OFFERTA, S.REVISIONE_UMANA},
    S.DOCUMENTI_MANCANTI: {S.INSTRADATO},
    S.ISTRUTTORIA: {S.OFFERTA, S.REVISIONE_UMANA, S.CHIUSO},
    S.OFFERTA: {S.CHIUSO, S.REVISIONE_UMANA},
    S.REVISIONE_UMANA: {S.OFFERTA, S.CHIUSO},
    S.CHIUSO: set(),
}


class TransizioneNonAmmessa(Exception):
    pass


class Pratica:
    def __init__(self, pratica_id: str):
        self.id, self.stato, self.storico = pratica_id, S.RICEVUTO, []

    def porta_a(self, nuovo: Stato, motivo: str, quando: datetime) -> None:
        if nuovo not in AMMESSE[self.stato]:
            raise TransizioneNonAmmessa(f"{self.stato.value} -> {nuovo.value}")
        self.storico.append((quando.isoformat(timespec="minutes"), self.stato.value, nuovo.value, motivo))
        self.stato = nuovo


def termine_offerta(documentazione_completa: date, lesioni: bool, modulo_firmato_da_entrambi: bool) -> date:
    """Deadlines of art. 148 of the Private Insurance Code: 90 days with injuries,
    otherwise 60, reduced to 30 if the claim form is signed by both drivers."""
    giorni = 90 if lesioni else (30 if modulo_firmato_da_entrambi else 60)
    return documentazione_completa + timedelta(days=giorni)


p = Pratica("SX-0001")
t0 = datetime(2026, 3, 2, 9, 0)
p.porta_a(S.INSTRADATO, "guided path: third parties involved", t0)
p.porta_a(S.DOCUMENTI_MANCANTI, "the body shop quote is missing", t0 + timedelta(minutes=2))
p.porta_a(S.INSTRADATO, "quote received", t0 + timedelta(days=3))
p.porta_a(S.OFFERTA, "estimate within threshold", t0 + timedelta(days=3, minutes=5))
for riga in p.storico:
    print(riga)

try:
    p.porta_a(S.ISTRUTTORIA, "attempt to go back", t0 + timedelta(days=4))
except TransizioneNonAmmessa as e:
    print("rejected:", e)

completa = date(2026, 3, 5)
for lesioni, firmato in ((False, False), (False, True), (True, True)):
    print(f"injuries={lesioni!s:<5} signed form={firmato!s:<5} -> offer by {termine_offerta(completa, lesioni, firmato)}")

# Output:
# ('2026-03-02T09:00', 'received', 'routed', 'guided path: third parties involved')
# ('2026-03-02T09:02', 'routed', 'missing_documents', 'the body shop quote is missing')
# ('2026-03-05T09:00', 'missing_documents', 'routed', 'quote received')
# ('2026-03-05T09:05', 'routed', 'offer', 'estimate within threshold')
# rejected: offer -> investigation
# injuries=False signed form=False -> offer by 2026-05-04
# injuries=False signed form=True  -> offer by 2026-04-04
# injuries=True  signed form=True  -> offer by 2026-06-03

The history in the output tells the life of a case: routed as guided, held for three days for a missing quote, then an offer. The attempt to go back from "offer" to "investigation" is rejected: if you want to allow it you add it to the table, but knowing that you are changing a business rule, not a code detail. The last three lines apply article 148 of the Codice delle assicurazioni private (the Italian Private Insurance Code), which for damage to property sets at 60 days from receipt of the documentation the deadline by which the insurer makes a reasoned offer or communicates why it does not, reduced to 30 when the claim form is signed by the drivers involved; with personal injuries the deadline is 90 days. The scope is that of article 148: the rules on direct compensation (article 149) are distinct and are not reported here.

What the rules say about a system that decides

Three rules bear on the project. The first is article 148 itself: besides the deadlines, paragraph 2-bis governs the case of suspected fraud. The insurer must consult the integrated computer archive and, if the anomaly indicators defined by IVASS or other indicators emerge, it may make no offer within the deadlines, stating the need for further investigation; the communication goes to the injured party and to IVASS, and the final determinations must arrive within thirty days of the communication. Translated into the project: the "human for fraud" path of our triage is not a choice of prudence, it has a procedure provided for by law, and the system must produce the documents that the procedure requires.

The second is article 22 of the GDPR: the data subject has the right not to be subject to a decision based solely on automated processing that produces legal effects or similarly significantly affects them; paragraph 2 provides exceptions (contractual necessity, authorisation by law, explicit consent) with safeguards. A refusal of an offer decided by a model with no human intervention is exactly the case to avoid, whereas an automatic offer in the customer's favour is something else; whether your situation falls within an exception is for your legal counsel to decide, not this article. The third is the AI Act: Annex III, point 5 lists among the high-risk systems those for risk assessment and pricing for natural persons in life and health insurance. Literally, claims handling is not on that list; but the classification of a real system has to be assessed case by case with whoever is responsible for compliance.

How to measure a claims automation system

The model's metrics (precision, recall) tell you whether the computer vision works, not whether the process improves. You need process metrics, and a target value for each is set by your company, not by an article: that is why here you find the definitions and not the thresholds, which without a source would not be data.

MetricHow it is calculatedWhat it tells you
Automatic sharecases closed without human intervention / cases closedhow much work the system removes; to be read together with the error
Error among the automatic onesautomatic cases later corrected or disputed / automatic casesthe hidden cost of the automatic share
Estimate deviation|AI estimate - final cost| / final cost, per casewhether the estimate is reliable, and for which parts it is not
Time from report to offerdays between FNOL and offer, median and 90th percentilewhether the article 148 deadlines are met with margin
Referrals to a person by reasoncount for each reason in the historywhich rules generate manual work, and whether they make sense

None of these figures has an absolute right value. The most deceptive is the automatic share: you can raise it by lowering the threshold, and you saw it in the earlier table, but you pay the price in the error among the automatic ones, which arrives later and in the form of complaints. The two metrics are always read as a pair.

Four design mistakes to avoid

  • No confidence threshold: a model that always answers sends even blurry photos down the automatic path.
  • National prices for everyone: the cost of a repair varies by area and by body shop, so the cost table must be calibrated on the territory.
  • Unchecked photos: a quality check (sharpness, light, part in frame) before the model avoids estimates built on nothing.
  • History not kept: without the model version, input and rule applied you cannot reconstruct a disputed decision.

They are four faces of the same defect: treating the model's output as a fact instead of as a hypothesis with a margin. The remedy is always the same and you have seen it in the code: an explicit threshold, a written reason for each transition, a history that is never erased. If you build a service that exposes these operations through an API, the article on ACORD exchange standards tells you how to make systems talk to each other across companies and brokers.

What you can do now

You can split a claims automation system into pieces you can test one by one: triage rules with an explicit order and a reason in plain words, aggregation of estimates with a threshold you chose by measuring a trade-off, extraction of fields that copes with amounts in Italian notation, non-existent dates and OCR noise, and a state machine that rejects unplanned transitions. You also know where the boundary lies: the vision model is a sketch to adapt with your own data, and the law (article 148, GDPR, AI Act) decides which paths must stay in the hands of a person. The next step in the series addresses the other side: how to recognise cases built to deceive the system, with graphs and behavioural signals.

Frequently asked questions

Can a claim be settled without human intervention?

Technically yes for the simplest cases (single damage, well documented, no risk signal), but with two cautions: paths with injuries or suspected fraud stay with a person, and an automatic refusal of an offer raises the issue of article 22 of the GDPR. Which cases to automate is decided by the company with its lawyers, not by the code.

Within what time must the insurer make the compensation offer?

According to article 148 of the Codice delle assicurazioni private (the Italian Private Insurance Code), 60 days from receipt of the documentation for damage to property, reduced to 30 if the claim form is signed by the drivers involved, and 90 days if there are personal injuries. Direct compensation (article 149) has its own rules.

Do I need spaCy to extract data from insurance documents?

Not for fields with a fixed shape such as plates, dates and amounts, where an explicit rule is more predictable and explainable. An entity recognition model is useful for names of people and places in free text, where rules are not enough; in that case its output must be treated with a confidence and a human fallback.

Sources

The listings with an output were run with Python 3.14 on synthetic data and fixed seeds, in two consecutive runs with the same output. The PyTorch sketch was not run: PyTorch was not available in the test environment. The legal deadlines are those of the text consulted on the date indicated: always check them against the text in force.

Try These Tools

Free developer tools related to this topic.

Commenti

Caricamento commenti...

Sign in to comment

New articles and tools on Telegram too

The Telegram channel flags the site's new articles and tools.

Did you like this article?

Explore other content on the blog or discover my projects