Objective
Adjusters spend 40–60% of their time looking across systems for policy clauses, prior claims by the same VIN/provider, and fraud signals. In this recipe you'll seed a tiny claims database, embed policy documents, and call a claims-adjuster persona via SELECT AGENT_RUN('claims-adjuster', 'review claim …') — the agent reads the claim, retrieves policy by meaning, and recommends an action with citations. One process, one transaction, one query.
Requires: SynapCores v1.6.6.9+ (
AGENT_RUNSQL function). Configure[query.ai_service]with a tool-capable model — recommended:qwen2.5-coder:7bvia the embeddedlocalprovider (v1.8 default — no Ollama daemon required), or via Ollama / OpenAI / Anthropic.
Step 1: Create the claims + policy tables
CREATE TABLE IF NOT EXISTS recipe_ins_claims (
claim_id INTEGER PRIMARY KEY,
policy_number TEXT,
vin TEXT,
provider TEXT,
amount DOUBLE,
description TEXT,
filed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS recipe_ins_policy_docs (
doc_id INTEGER PRIMARY KEY,
section TEXT,
body TEXT,
embedding VECTOR(384)
);
Step 2: Seed claims + policy clauses
INSERT INTO recipe_ins_claims (claim_id, policy_number, vin, provider, amount, description) VALUES
(1001,'P-AAA-001','VIN-9912','Acme Body Shop', 3200.00,'Rear-end collision, bumper replacement'),
(1002,'P-AAA-001','VIN-9912','Acme Body Shop', 3850.00,'Same vehicle, hail damage'),
(1003,'P-AAA-001','VIN-9912','Acme Body Shop', 4100.00,'Same vehicle, alleged theft of stereo'),
(1004,'P-BBB-077','VIN-2210','Citywide Auto', 1800.00,'Side mirror replacement after parking-lot incident'),
(1005,'P-CCC-411','VIN-7733','Reliable Repair',12500.00,'Total loss after flood');
INSERT INTO recipe_ins_policy_docs (doc_id, section, body) VALUES
(1,'Collision Coverage','Collision coverage applies to physical damage caused by impact with another vehicle or object. Standard deductible is $500 unless rider 3.b applies. Excludes damage during commercial use.'),
(2,'Comprehensive — Weather','Hail, flood, and lightning damage fall under Comprehensive (not Collision). Filing must occur within 30 days of the event. Documentation required: photographs and a contemporaneous police or weather-service report.'),
(3,'Comprehensive — Theft','Theft claims require a police report filed within 48 hours of discovery. Sound-system theft over $500 requires receipts or a registered installation record. Repeated theft claims from a single vehicle within 12 months trigger fraud review.'),
(4,'Total Loss','A vehicle is deemed a total loss when repair cost exceeds 80 percent of market value. Settlement is at market value minus the deductible; salvage rights pass to the insurer.'),
(5,'Fraud Indicators','Three or more claims on the same VIN within 90 days, or claims from the same provider exceeding 5 in 12 months, are referred to Special Investigations Unit.');