Objective
A new claim's story often echoes a past one — a related incident, a repeat pattern, or a fraud ring reusing the same script. Keyword search misses the echo when the words differ. This recipe ranks prior claims by narrative meaning, so an adjuster sees the related history and triages consistently.
Step 1: Prior claims with narrative embeddings
DROP TABLE IF EXISTS claims_hist;
CREATE TABLE claims_hist (
claim_id TEXT PRIMARY KEY,
peril TEXT,
narrative TEXT,
emb VECTOR(384)
);
INSERT INTO claims_hist VALUES
('CLM-4401','auto',
'Rear-ended at a stop light; minor bumper damage; sudden neck pain reported days later.',
EMBED('Rear-ended at a stop light; minor bumper damage; sudden neck pain reported days later.')),
('CLM-4402','property',
'Kitchen water damage from a burst pipe overnight; hardwood floor buckled.',
EMBED('Kitchen water damage from a burst pipe overnight; hardwood floor buckled.'));
Step 2: Retrieve the most similar prior claim
SELECT claim_id,
peril,
COSINE_SIMILARITY(
emb,
EMBED('Vehicle struck from behind at a red light, low-speed impact, delayed whiplash claim.')
) AS sim
FROM claims_hist
ORDER BY sim DESC
LIMIT 1;
Result — the new rear-end whiplash claim matches the prior auto claim, not the property one:
| claim_id | peril | sim |
|---|---|---|
| CLM-4401 | auto | 0.48 |
Why it matters
Similar-narrative retrieval routes a new claim to the right adjuster, surfaces related history, and flags the repeat "delayed whiplash after a low-speed rear-end" pattern that fraud rings reuse. Log the triage disposition to a tamper-evident decision record, and see the agent form in insurance claims triage.