The work these systems do#
Insurance runs on documents. A business fills in an application for insurance. A broker sends the application by email. A policy form changes, and each company that uses the form must review the change.
The sources describe four causes of the workload:
- Volume. Travelers1 receives millions of emails a year from agents and customers who ask for a change to a policy.
- Many formats. Anzen2 describes the applications: insurers accept almost any format, and the forms are long and dense.
- Manual reading. At a traditional insurer, a team reads each application, checks for a duplicate and copies out the data for the underwriter.
- Slow reviews. Verisk’s3 customers needed days or weeks to adopt a change to a policy form.
The systems do three jobs:
- Classification gives a document one label from a fixed list. Travelers sorts each email into one of 13 categories. A model that does this job is a classifier.
- Extraction copies named facts out of a document. Anzen extracts the name of the company that applies for insurance. The glossary entry is data extraction.
- Comparison finds what changed between two versions of a document. Verisk’s tool does this job.
I use three words in a fixed way in this post:
- An application is the form that a business fills in to ask for insurance. It is not software.
- A system is the software that a team built.
- Underwriting is the decision to insure a risk, and at what price. An underwriter makes that decision.
The six case studies#
The six come from ZenML’s LLMOps Database4, which lists 29 entries for insurance. I chose the entries in which a model sorts, reads or compares documents. Anzen has two entries, so the six entries cover five companies. For each entry, I read the original article or talk, and not only ZenML’s summary.
| Company | Use Case | Job | Model | Reported result |
|---|---|---|---|---|
| Anzen2 | Document classification and data extraction at an insurer with under 20 staff | Classification and extraction | A classifier based on BERT, and AWS Textract | About 95% accuracy for the classifier |
| Anzen5 | How Anzen limits hallucinations when it reads insurance applications | Classification and extraction | A layout model, a classifier and a large language model | 99.9% accuracy for one document classifier |
| Vouch6 | Data pipelines for risk classification and document processing | Classification and extraction | Hosted models, from OpenAI first | No figure |
| Roots7 | A small fine-tuned model that Roots hosts itself to read insurance documents | Classification, extraction and summaries | Mistral 7B, fine-tuned | 20 to 30 million documents a year for about $30,000 |
| Travelers1 | A classifier that sorts service emails into 13 categories | Classification | Claude 2 | 91% accuracy |
| Verisk3 | A tool that compares versions of a policy document and summarises the changes | Comparison | Claude 3 Sonnet | Over 90% of summaries graded good or acceptable |
Every figure comes from the company or from its technology supplier.
1. Three ways to fit a model to the task#
A general large language model does not know your categories or your forms. The five companies close this gap in three ways.
| Way | Company | What the team needed | Reported result |
|---|---|---|---|
| A prompt for a hosted model | Travelers, Verisk, Vouch | Instructions, definitions and examples in the prompt | Travelers: from 68% to 91% accuracy |
| A small trained classifier | Anzen | About 300 labelled documents | About 95% accuracy, 90% precision, 100% recall |
| A fine-tuned model that the team hosts | Roots | Training examples and a GPU | No accuracy figure |
A prompt: Travelers#
Travelers built its classifier with the AWS Generative AI Innovation Center. The classifier reads the text of an email and of any PDF attachment. It returns one of 13 categories, such as an address change or a payroll update. The team trained no model.
The prompt has six parts:
- A persona for the model
- The overall instruction
- A few examples of emails with the correct category, which is few-shot prompting
- A detailed definition of each category
- The email
- An instruction for the format of the output
Accuracy is the share of the emails that get the correct category. The first test, with no work on the prompt, gave 68% accuracy. The team then changed the prompt, merged categories, adjusted the document processing and improved the instructions. Accuracy rose to 91% with Claude 2. A second model, Claude Instant, reached 90%.
The team wrote the category definitions with the business experts. It also read the emails by hand to find the phrases that separate one category from the next.
Travelers did not use fine-tuning. Its article states the reason: accuracy was already high, so the gain from fine-tuning would have to justify the cost. The article also names advantages of a prompt over a trained classifier:
- The team builds the system faster.
- The team can change the model.
- The same method extends to other classification tasks.
- The model can give a reason with each label.
A small trained classifier: Anzen#
Anzen is an insurer with under 20 people. Brokers send applications to the team’s inbox, together with other attachments. The first job is to decide if an attachment is an application.
In one afternoon, the team downloaded about 300 attachments from the inbox and labelled each one by hand. It then trained a classifier based on Google’s BERT model. BERT is an older and much smaller kind of language model than the models behind a chat assistant.
Anzen reports three figures for this classifier:
- About 95% accuracy.
- 90% precision: of the attachments that the classifier marks as applications, 90% are applications.
- 100% recall: the classifier finds every application.
Anzen tested settings with higher precision, but recall fell. The team accepted a little noise, because it wanted to catch every application. The whole system worked in under a week.
For extraction, Anzen used the query feature of AWS Textract. You give it a question, such as “What is the company applying for insurance?”. It returns the answer from the PDF.
In September 2023, Anzen’s second talk5 gave a rule: use a generative model only for the work that only a generative model can do. A classifier decides first if a document is an application. Only then does a large language model read the document. Anzen’s speaker gives two sizes for the training data:
- A few hundred examples give a good classifier.
- A few thousand examples give an excellent classifier. One of Anzen’s classifiers reaches 99.9% accuracy across several document types.
Anzen trained its application classifier on a few thousand examples by that time.
A fine-tuned model: Roots#
Roots7 fine-tunes a model for each customer. The base model is Mistral 7B Instruct v2, an open model with 7 billion parameters. Roots runs the model itself on a rented GPU, and does not call the API of a model supplier.
Roots states that accuracy is the main reason. A fine-tuned model can find the claim numbers and the claimant names of one business in its documents. Roots writes that its fine-tuned models outperform a general frontier model on such tasks. Its article gives no accuracy figure. It gives speed and cost, which section 4 covers.
When each way fits#
From the three sources, I read the choice like this:
| Way | It fits when | Source |
|---|---|---|
| A prompt | The categories need explanation, you want a first result fast, and you want a reason with each label | Travelers |
| A small trained classifier | The job is a plain sort, and you can label a few hundred examples | Anzen |
| A fine-tuned model | The data is specific to one business, and the volume is millions of documents a year | Roots |
2. The model does one narrow step#
No team gives a raw document to a model and asks for everything. Each team puts steps before and after the model.
Before the model: clean text#
Travelers prepares each email in a pipeline. The pipeline removes the HTML tags from the body text. It splits a PDF attachment into pages and saves each page as an image. Amazon Textract then reads the text, the tables and the entities, such as names, policy numbers and dates. This step is optical character recognition (OCR). The body text and the attachment text go into one prompt. About 25% of the emails had a PDF attachment, and most attachments were ACORD insurance forms.
Anzen found that OCR alone gives poor text for an application. The text loses the layout of the form, such as the yes and no check boxes. Even a person cannot rebuild the application from that text. Anzen first uses a model named LayoutLM to mark the questions and the answers on the page. From these marks and the OCR text, it rebuilds a text version that follows the original. The large language model then answers questions about the application more accurately. Anzen’s speaker also recommends Markdown as an intermediate format.
Verisk splits each policy form into chunks of 500 characters with a 15% overlap. It stores each chunk as an embedding. It also stores the document type, the jurisdiction, the version number and the effective dates with each chunk. These fields make sure that the comparison uses the correct two documents.
Give the model less#
- Anzen’s classifier runs first, so only applications reach the extraction step. A duplicate application stops before it reaches an underwriter.
- Verisk finds the sections that differ before it calls the model. Only these sections go to the model, which writes the summary of the change. Verisk reports fewer model calls and higher accuracy from this design.
- Verisk builds the tracked-changes view, with its red lines, with code that uses no model.
- Vouch checks if it already has a prediction for a record. If it has one, it makes no model call.
After the model: a fixed format#
Software reads the output of these systems, so the format must not change. This is the subject of structured output.
- Vouch uses output parsers. When a parser fails, a pipeline step repairs the output. The pipeline then writes the prediction to a database, and an API serves it to the product engineers.
- Anzen’s speaker recommends a schema, passed to the model as a function call. The model then returns data in exactly that shape. The speaker calls this more reliable than long format instructions in the prompt.
- Travelers shows the model examples of the output in the prompt. The team reports less variation in the structure and the content of the output.
- Verisk stores each result as JSON, and an API passes it to the screen.
A person still decides#
Anzen’s system does not underwrite. It sends an alert to the underwriting team, and an underwriter decides to insure the company or not, and at what price. This design is a form of human in the loop. Verisk’s tool gives its summary to the people who review the form.
3. How the teams check the results#
| Company | What the team measures | Where the correct answer comes from | Figure |
|---|---|---|---|
| Travelers | Accuracy | Over 4,000 labelled emails | 91% |
| Anzen | Accuracy, precision and recall | About 300 labelled documents | About 95%, 90% and 100% |
| Verisk | Accuracy, consistency and adherence to context, each on a scale of 1 to 10 | Verisk’s own insurance experts | Over 90% of summaries good or acceptable |
| Roots | Output tokens per second, and time per request | No correct answer is needed | Up to 130 tokens per second |
| Vouch | Reports on the stored predictions | Not stated | No figure |
Travelers tests against ground truth: a set of over 4,000 emails with the correct category. An accuracy of 91% means that about 9 emails in 100 get the wrong category. The article gives no accuracy for each category, and it does not describe what happens to those emails.
Verisk has no single correct answer for a summary, so its experts grade each one. The first results were below the level that Verisk wanted. After each round of grading, the team added instructions to the prompt for the problems that the experts found. Verisk also changed the design, the chunking and the model. Verisk measures the response time as well.
Anzen keeps the check simple after release. Every result of the classifier goes to a Slack channel. The engineer notes each wrong result, and colleagues report each miss. From time to time, the engineer goes back and improves the classifier.
Anzen’s second talk gives the reasons for a permanent check:
- A hosted model can change without notice, so a system that works today can do worse later.
- The same input can give a different output on the next call.
- The documents that arrive change over time.
So the talk recommends three things. Assume that the model will be wrong at times. Put a button in the product that reports a wrong result. Store every input and every output.
Vouch copies its predictions back into its data warehouse, so that the team can report how well they work.
4. Roots gives the only cost figure#
Travelers writes that a prompt avoids the cost of training. Verisk writes that it lowered its cost in two ways: fewer model calls, and a cheaper model when one appeared. Neither gives a number. Roots does.
Roots measured its fine-tuned model on three GPUs. Its documents have 8 to 10 pages on average, or about 8,000 input tokens. The output for each document is short: usually 100 to 200 tokens.
| GPU | Memory | Cost a year, on demand | Output tokens per second |
|---|---|---|---|
| NVIDIA A100 | 80 GB | About $30,000 | 83.00 |
| NVIDIA T4 | 16 GB | About $10,000 | 21.96 |
| NVIDIA RTX 3090 | 24 GB | About $5,000 | 72.14 |
The table gives the speed for one request at a time. A production system serves many requests at the same time. In a second test, the A100 served 32 requests at the same time and wrote 130 output tokens per second. The T4 gave server errors above 4 requests at the same time.
Roots concludes that one A100 can process 20 to 30 million documents a year for about $30,000. The arithmetic agrees:
- 130 tokens per second for one year is about 4.1 billion output tokens.
- 4.1 billion tokens for 20 to 30 million documents is 137 to 205 output tokens per document.
- This matches the output length that Roots states.
From Roots’ two figures, the GPU costs 0.10 to 0.15 cents per document. This is the cost at full load. A GPU that waits for work costs the same per year, so the cost per document rises when the volume is lower. The figure covers the GPU for inference only. Roots trains its models on other GPUs.
Roots serves the model with vLLM, an open-source inference server. In its test, vLLM generated text about 25 times faster than the plain Hugging Face version of the same model.
Three more notes on cost come from the other sources:
- Vouch runs its risk classification pipeline once an hour, and it processes a document when the document arrives.
- Anzen warns about the cost of change. When you test a new prompt or change the logic after the model, you call the API again. These calls can make a change too expensive.
- Anzen ran its small models on ordinary CPU servers for its prototypes.
Travelers’ classifier matches the classification archetype in my post on the cost of classification. That post shows the cost of a hosted model for this kind of work, and how a strict schema lowers it.
Key takeaways#
If you plan a system of this kind, these steps follow from the case studies.
- Label a few hundred real documents before you choose a model.
- Write a definition of each category with the business experts.
- Test a prompt on a hosted model first.
- If the job is a plain sort, train a small classifier.
- Send a document to the large language model only after the classifier accepts it.
- Rebuild the layout of a form before the model reads it.
- Find the changed sections with ordinary code.
- Send only the changed sections to the model.
- Define the output as a schema.
- Check each output against the schema.
- Store each input and each output.
- Give users a button that reports a wrong result.
- If you process millions of documents a year, compare a GPU’s cost with the cost of API calls.
Steps 1, 4, 5, 6, 9, 11 and 12 follow Anzen. Steps 2 and 3 follow Travelers. Steps 7 and 8 follow Verisk. Step 10 follows Vouch, and step 13 follows Roots.
Sources#
Travelers: How Travelers Insurance classified emails with Amazon Bedrock and prompt engineering. AWS blog, 31 January 2025. ↩︎ ↩︎
Anzen: Using LLMs to Punch Above your Weight!, a talk by Cameron Feenstra. LLMs in Production conference, 26 May 2023. ↩︎ ↩︎
Verisk: Accelerating insurance policy reviews with generative AI: Verisk’s Mozart companion. AWS blog, 7 March 2025. ↩︎ ↩︎
ZenML: LLMOps Database, insurance entries. ↩︎
Anzen: Reality Check: Overcoming the Hallucination Hurdle in Generative AI, a talk by Cameron Feenstra. AI Infrastructure Alliance, 14 September 2023. ↩︎ ↩︎
Vouch: Insuring Success: Vouch’s GenAI and LLMs Revolutionize Small Business Coverage, a talk at Metaflow office hours. Outerbounds, 21 December 2023. ↩︎
Roots: What We Learned from Deploying Fine-Tuned LLMs in Production. Roots’ blog, 26 August 2024. ↩︎ ↩︎