Skip to content
Nagendra Inuguri
Go back

Underwriter AI engine: reading medical records to triage health insurance proposals

Every health insurance proposal asks the applicant to declare their pre-existing diseases. When they declare one, the proposal can’t go through straight-through processing. It goes to a team of medical underwriters, often doctors, who read the proposal form and every medical document attached to it, then decide whether to accept it, accept it with exclusions, ask for more information or decline it.

That reading is slow. Discharge summaries, lab reports, prescriptions and doctors’ letters arrive as scans and phone photos, some typed, some handwritten, some barely legible. A large share of all proposals end up in this manual queue.

This post is about the proof of concept we built for a large health insurer to help with that queue: an Underwriter AI engine that reads the documents, pulls out the medical facts that matter, and sorts each proposal into high, medium or low risk so it can go to an underwriter with the right level of experience.

The problem in underwriting terms

The insurer wanted two things: faster turnaround for proposals that need medical review, and more of the underwriting done automatically. We started with the first.

For a non-straight-through proposal, an underwriter typically has to:

  1. Check the applicant’s BMI against product-specific limits
  2. Identify the pre-existing diseases declared on the proposal form
  3. Find and read the supporting medical documents, separating medical documents from ID and other paperwork
  4. Check that every declared disease has evidence, and spot any undeclared ones
  5. Judge the severity of each condition
  6. Reach a decision and record the reasons, including medical codes

Proposals with severe conditions need senior underwriters. Simpler ones don’t. If the system could classify proposals as high, medium or low risk up front, the right cases would reach the right people, and the documents would already be summarised by the time they did.

So the POC objective was narrow and concrete: use OCR and LLMs to categorise these proposals into high, medium and low risk, based on the medical records submitted with them.

Ten weeks, three milestones

The POC ran for about ten weeks in three milestones:

MilestoneDurationFocus
Discovery and definition2 weeksUnderstand the underwriting process, agree the risk criteria, build a validated dataset, design the architecture
Intelligent document processing4 weeksOCR and LLM pipeline that turns forms and medical documents into structured data
Risk decision engine4 weeksLLM-based high/medium/low categorisation, a demo UI, and the plan for production

A few constraints shaped everything:

  • Data residency. Only Azure services available in-country could be used.
  • Redacted data. The insurer removed personal details before sharing documents, and we built in our own environment. That protected privacy, but it also meant we couldn’t check that a document belonged to the person on the form.
  • Limited scope. English documents, one insured person per proposal, and risk criteria codified only for a few selected conditions.
  • LLMs first. The POC used proprietary LLMs for every task, with no custom ML models. Traditional models would be added later only where the LLMs fell short.

Discovery: the ground truth came first

The most important output of discovery wasn’t architecture. It was agreement on what a correct answer looks like.

We ran a series of sessions with the insurer’s head of medical underwriting, going through six sample proposals one at a time: their forms, their medical documents, the diseases in them, and the decision an underwriter would make and why. Those six proposals became the validation (golden) dataset. Together with the medical team, we also defined:

  • A summary template: what the engine should produce for each proposal
  • Risk criteria: the factors that move a case between low, medium and high for the conditions in scope

The criteria were written as tables per body system. For cardiovascular cases, factors included smoking, how well hypertension, diabetes and cholesterol were controlled, ECG and echo findings, and stress test and angiography results. For kidney stones, they included stone size, symptoms and hospitalisation, obstruction, whether intervention had been done, and kidney function. Each factor had a low, medium and high band, defined by the doctors.

A test set of 75 more proposals arrived later. We used the 37 that had medical documents attached for accuracy measurement.

Choosing the OCR

Before building anything, we compared OCR options on the validation documents. These are the per-page prices at the time, with the accuracy we measured:

OptionCost per 1,000 pagesText extraction accuracy
Azure Document Intelligence$1079%
Azure OpenAI GPT-4o (vision)$1996%
Azure AI Vision OCR$1not measured on this set

GPT-4o read handwriting and poor scans far better, at roughly twice the price of Document Intelligence. In the end, the POC architecture used each tool where it was strongest: Azure AI Vision’s layout model to find a page’s structure, Document Intelligence for pages with tables, Vision’s read model for plain text, and GPT-4o for structuring and extraction.

The architecture

At a high level, the engine is a pipeline of classification, extraction and enrichment steps feeding a risk engine:

The document pipeline: read and classify the documents, send each page to the right OCR, then structure, extract and score with LLMs and a risk engine

Inside, an IDP controller routes each uploaded document to the right processor:

  • Proposal forms (online and scanned offline forms): extract age, date of birth, declared diseases and the other fields that matter for underwriting
  • Medical documents (discharge summaries, lab reports, prescriptions, letters): enhance the image, OCR it, split it into documents, classify the report type, then extract diseases, medications, procedures, lab values and more
  • Non-medical documents (ID and age proof): classify and extract basic details, so they’re kept apart from the medical evidence

An aggregator combines everything into a proposal-level summary, and the risk engine applies four checks on top of it:

  • Disease mapping: is there evidence for each declared disease, and are there undeclared ones?
  • BMI validation against the product’s limits
  • Decline conditions: conditions and medications on the insurer’s decline lists
  • Disease severity, compared against the agreed risk criteria

Underwriter AI engine architecture: an IDP controller routes documents to three processors, an aggregator builds the summary, and a risk engine applies four checks

The output for each proposal is a summary in the agreed template (diseases, medications and procedures with dates and sources) plus a structured decision:

{
  "Risk": "Medium",
  "Score": 50,
  "Decision": "Pending",
  "Reason": "History of a chronic condition that needs monitoring; severity and duration not documented.",
  "Query": [
    "Duration and severity of the condition",
    "Recent evaluations or treatment",
    "Current status and management plan"
  ]
}

The Query field matters. In the real process, a large share of proposals end with the underwriter asking for more documents. An engine that can say exactly what’s missing is useful even when it can’t make the decision.

For the POC, the stack was Azure OpenAI (GPT-4o), Azure Document Intelligence and AI Vision, Blob Storage for documents, a document database for extracted details and decisions, and a simple Streamlit UI where an underwriter uploads a proposal and its documents and gets back the summary and decision. Container Registry and App Service were planned for hosting later in the build.

The hard part: real-world documents

The data told us early where the difficulty would be. In the test set’s 120 medical pages, only half were cleanly typed. A quarter were handwritten, and about a sixth were low-quality scans or photos. A few were in other languages, weren’t medical documents at all, or were report types we hadn’t seen before. We kept those last groups out of POC scope, because handling them properly needed more data.

Low-quality images were the biggest threat. Blur, poor lighting and pages photographed at an angle all make OCR fail. We built an image quality enhancer that:

  1. Scores each page’s image quality, to find the ones that need help
  2. Corrects orientation
  3. Handles blur and poor lighting before OCR

We later extended it to mobile phone photos, which proved common.

Here’s how OCR accuracy came out across page types:

Page typeValidation setTest set
Machine typed99%98%
Handwritten96%91%
Low quality95%91%
Mobile photos96%94%
Overall97%95%

How accurate was it?

We measured each stage separately on the 37 test proposals, which made it much easier to see where errors came from:

CapabilityTest-set result
OCR95%
Medical report type classification100%
Pre-existing disease extraction72% → 81% after a second iteration
Disease severity79% → 95% after a second iteration
ICD-10 medical coding (selected diseases)88%
Decline conditions and medicationsall cases found
BMI extraction6 of 8 cases (the misses were handwriting)
High/medium/low categorisationabout 82% of proposals correct

Two of these are worth looking at more closely.

Disease extraction was the weakest stage at first. When we went through the misses, only some were caused by OCR (bad handwriting or low-quality images). More came from the model flagging things that underwriters don’t treat as pre-existing diseases: procedures, complications, pregnancy-related conditions, or vague terms that weren’t specific enough. The second iteration targeted exactly that: more specific extraction that matched the underwriters’ definition of a pre-existing disease, a reflection step where the model checks its own output, and better handling of page orientation. Accuracy rose from 72% to 81%.

Medical coding also improved a lot between iterations. For diseases that had been extracted correctly, ICD-10 coding accuracy went from 76% to 97%. Even for diseases garbled by OCR, it went from 47% to 79%.

Making it fast enough

Latency was out of scope for the POC, but underwriters still had to use the demo. Processing ran page by page, and a five-page document took more than a minute and a half end to end, with orientation correction and OCR taking most of that time. Three changes helped:

  • Page-level parallelism: OCR and entity extraction run on six to eight pages at a time instead of one after another
  • Caching: OCR and extraction results are stored in the database, so re-running a proposal doesn’t repeat the expensive steps
  • Bulk upload: multiple PDFs can be submitted and processed together

Lessons learned

  • Agree the ground truth before you build. Six proposals, worked through in detail with doctors, gave us a shared definition of “correct” that every later conversation could refer back to.
  • Encode the domain’s definitions. Much of our accuracy gain came from extracting what an underwriter actually means by a pre-existing disease, and having the model check its own output against that.
  • Measure every stage separately. Separate scores for OCR, extraction, severity, coding and categorisation showed exactly where each error came from.
  • Plan for bad images. In real document workflows, handwriting, phone photos and skewed scans are the norm. Image enhancement earned its place in the pipeline.
  • Use each OCR where it’s strongest. The most accurate option wasn’t the cheapest, and the cheapest wasn’t the most accurate. A routed, hybrid pipeline gave a better balance than any single service.
  • Respect the privacy constraint, then design around it. Redacting personal data was the right call, but it removed the ability to tell family members’ documents apart. For multi-person (floater) proposals, we treated all the medical documents as one set for the POC and made proper attribution a next-phase item.
  • Make “ask for more” a first-class output. A precise query is often more useful to an underwriter than an uncertain decision.

What’s next

The POC was followed by user acceptance testing with the insurer’s underwriters and a proposal for the next phase. The roadmap went in a few directions:

  • Broader coverage: risk criteria for all pre-existing diseases instead of a selected few, and medical coding for all of them
  • Inference-based extraction: recognising conditions and severity that are implied by the documents rather than stated outright
  • Closer to the real workflow: offline proposal form extraction, matching each proposal to its medical documents, telling family members apart in floater proposals, and integration with the insurer’s underwriting system
  • More automation: automatic queries, counter-offer recommendations, customer letters, medical image analysis and fraud detection
  • A dedicated ICD-coding track: a fine-tuned model trained on tagged medical records, which would also serve claims processing

The takeaway

An underwriter AI engine isn’t one clever model. It’s a careful pipeline: clean up the image, pick the right OCR, structure the text, extract the medical facts the way an underwriter defines them, and only then apply the risk rules. Every stage has its own failure modes, so every stage needs its own measurement.

The other lesson is about the people. The doctors who defined the criteria and the ground truth did as much to make this work as any model choice we made.

If you’re working on document AI in insurance or healthcare, I’d love to compare notes. Find me on LinkedIn.



Previous Post
Copilots as living systems: evolving an enterprise copilot into a multi-brain architecture
Next Post
Building an AI foundation platform on Azure: one home for ML and LLM workloads