← All blogs

InsurTech

Local LLM extraction for insurance: 24/27 to 27/27 exact matches

In a research experiment, we ran Qwen3.5-9B on one workstation and asked it to pull a fixed set of insurance risk facts out of each record as a JSON object. A small LoRA adapter took exact matches on 27 held-out test cases from 24 to 27. In a narrow sense that's a fine-tuning win. We still didn't put the adapter into service, and the story starts with our first comparison, which was skewed.

Rubix Labs5 min read
Two comparisons of base Qwen3.5-9B and a LoRA adapter on insurance risk extraction. Rejected first run, 5 cases with a 320-token cap: base 20% valid JSON and 0% exact, adapter 100% and 100%, because four base outputs were cut off mid-key. Matched rerun, 27 cases with a 768-token ceiling and every output stopping naturally: both 27 of 27 valid JSON; exact objects 24 of 27 for base and 27 of 27 for the adapter.
From our local research experiment. Test examples were separated from training by account and by time. Exact-match extraction on 27 cases says nothing about insurance knowledge, pricing or coverage decisions.

One workstation, one model, no cloud calls

Everything ran locally on an RTX 5090 with 32 GB of VRAM, and nothing left the machine. The model was Qwen3.5-9B, which Qwen publishes under Apache 2.0 as an image-text-to-text model; chat used a 4-bit GGUF build of it.

The extraction set had 455 training, 89 development and 27 test examples after removing exact duplicate prompt and target pairs. Test examples were separated from training by account and came from a later period, so the model couldn't simply recognise them. Each target was a compact JSON object of permitted facts, and an audit confirmed that no forbidden field appeared in any target.

The first comparison was skewed by a token cap

Our first base-versus-adapter run used five test cases and a 320-token output cap. The base model produced parseable JSON 20% of the time and exact objects 0% of the time. The adapter scored 100% on both, which would have made a nice headline.

The base model pretty-printed its JSON with indentation and line breaks, and four of its five outputs ran into the cap mid-key. The 275-token bound we'd checked applied to compact JSON, which the adapter had learned to write, so the test mostly measured which model wrote shorter JSON. We kept the raw outputs, labelled the comparison as confounded and reran it.

The fair rerun: 24/27 against 27/27

The rerun used all 27 test cases with a 768-token ceiling and recorded every output's token count and stop reason. Every output from both models stopped at end-of-sequence, and none hit the limit. Both produced valid JSON on 27 of 27. The base model matched the expected object exactly on 24 (88.89%) and the adapter on 27.

The base generated 201 to 388 tokens per answer and the adapter 246 to 278, so the adapter was also more consistent in length. The LoRA itself was tiny: 30 BF16 steps in 68.7 seconds, using at most 60 of the 455 training examples.

The fair rerun: 24/27 against 27/27
RunCasesOutput limitBase: valid, exactAdapter: valid, exact
First run, rejected5320 tokens20%, 0%100%, 100%
Matched rerun27768 tokens27, 2427, 27

Why the adapter stayed on the shelf

Three extra exact matches on 27 cases is narrow evidence, and the base model was already at 24. The adapter covers this one extraction format and says nothing about insurance knowledge, coverage, pricing or claims. A second, mixed adapter trained on 35 extraction examples and five question-and-answer examples grounded in reference text (30 steps, 44.14 seconds) showed no comprehension gain.

So chat kept the base Q4 model with constrained source selection. On a fresh, sealed 12-question knowledge test it fully passed 8: 4 of 6 educational questions and 4 of 6 staff-workflow ones, with a mean answer time of 0.452 seconds. The other four answers were safe but incomplete or misrouted: commercial property deductibles and limits, the roles in a surety bond, servicing a vehicle sale, and an address change after a health insurance Marketplace move. An AI reviewer graded them; no licensed insurance expert has reviewed the answers. Rerunning an older, already-used question set gave 12 of 12, which only shows those known cases didn't regress.

Letting the model drive a local CRM, carefully

We also tested whether the 9B model could operate a local EspoCRM install with fictional leads. It never saw a URL, selector, credential or field value. It saw a sanitised snapshot of the page's controls and chose one of seven allowed actions, while a controller held everything else and rejected any malformed, out-of-order or extra-field proposal.

It completed all six read-only verification stages without a fallback. Shown an untrusted external page with instructions in it, it chose to abort. The create test took three tries: the first repeated a previous action and the controller stopped it before a password was typed, the second exposed a bug in our own email locator, and the third chose all eight stages and created a fictional lead, which we confirmed by reading it back through the CRM's API. An earlier 0.6B model failed at the first stage.

That's a bounded workflow under a strict controller, a long way short of general computer use. On this evidence we wouldn't let a model author field values on a real account.

What we'd do with your extraction task

Before fine-tuning anything, we'd fix the measurement: the same output limits for every candidate, stop reasons recorded, test cases separated from training by account and time, and failures you can read. In this experiment that alone moved the headline from 'adapter 100%, base 0%' to 'base 24, adapter 27'.

Rubix builds insurance document and intake workflows, and our AI agents for insurance page shows submission intake, policy change and COI agents working with human approval. If you're weighing a local model for extraction, bring a few redacted examples and the fields you need, and we'll help design a comparison that holds up. Our insurance OCR article covers reconciling the documents before extraction starts.