How we cut a healthcare partner's LLM spend to $0 per chart
HEALTHCARE & LIFE SCIENCES

Private AI for HCC risk adjustment coding, at near-zero cost per chart.

We replaced a cloud LLM pipeline with small, fine-tuned AI models that code a chart in about a minute on an ordinary CPU, with better HCC capture and no patient data leaving the building.

  • Clinical NLP
  • Fine-tuned Models
  • Private, Local AI
Client
Risk adjustment coding partner
Industry
Healthcare & Life Sciences
Deployment
One container, CPU only
Capabilities
NLP / ML / Fine-tuning
Clearer coding
$0 model spend per chart
THE CHALLENGE

The problem wasn't the coding. It was the cost of reading every page.

"Risk adjustment coding is a reading job. A missed code costs money, and an unsupported one creates audit risk."

A coder opens a patient's chart, often hundreds of pages of progress notes, scanned faxes, lab reports and medication lists, and finds every chronic condition the provider actually addressed at a visit. Each becomes an ICD-10 code, and codes that map to HCCs drive how a health plan is paid.

Messy charts

Typed, scanned and copy-forwarded text mixed together; one condition on twenty pages, mostly as history.

Subtle rules

Only current, supported conditions count. "History of", "rule out" and "denies" do not.

Visit-level output

Every code needs its date of service and pages, not just a list.

Volume

Charts reviewed by the hundred thousand: dollars or minutes per chart don't scale.

OUR APPROACH

From chart to code.

Instead of one large model doing everything, we split coding into the steps a human coder takes and used the smallest AI component that does each step well.

Read the chart

Text layer first, OCR only on scans; tables become sentences

Find conditions

Biomedical NER marks every disease mention

Find the code

Medical embeddings search the full ICD-10-CM catalogue

Apply rules

Negation, history, combination codes, excluded pairs

Decide like a coder

Fine-tuned model asks: would a coder code this?

Find the visits

A learned model picks the date that starts each visit

THE SOLUTION

Intelligence designed around the coder.

A private coding engine that proposes codes with their evidence, so coders review in seconds instead of re-reading the chart.

Evidence for every code

Page, sentence, TAMPER support and V24 / V28 HCCs.

Always valid codes

Every code comes from the ICD-10-CM catalogue.

Tunable precision

A threshold trades recall for fewer suggestions.

Human in the Loop

AI supports the coder rather than replacing them.

Illustrative coding review screen with visits, an assessment and plan note with a highlighted condition, and suggested ICD-10 codes with HCC mappings
INSIDE THE SYSTEM

Built for privacy.
Built for scale.

The whole system ships as one container with every model inside it, so accurate medical coding runs on commodity CPUs inside the client's own environment.

See the results
Layered system architecture
  • Document readingText layer, selective OCR, table rebuild
  • Entity recognitionCompact biomedical NER
  • Code retrievalMedical embeddings + ICD-10-CM index
  • Rules engineDeterministic, explainable guidelines
  • Coder-decision modelFine-tuned clinical LM, ~30 ms on CPU
  • Visit date modelScores every date on a page
PrivateNo chart data to third-party APIs
CPU onlyNo GPUs, ~1 minute per chart
One containerEvery model inside, on-premise
ExplainableEvidence attached to every code
THE RESULTS

Meaningful results for better coding.

Measured at chart level against professional coders' results, on charts held out from all training.

20×

Faster coding

~20 min down to ~1 min per chart, on CPU.

$0

LLM spend

Down from ~$0.31 per chart.

77% / 74%

HCC capture

Recall / precision, up from 73% / 70%.

83%

Visit-date recall

Up from 51%, at 75% precision.

Head-to-head on the same charts

Cloud LLM pipelineMedGemma 4B, asked directlyTathastha approach
HCC (V28) recall / precision73% / 70%31% / 62%77% / 74%
ICD-10 category (3 characters)67% / 70%32% / 64%72% / 62%
Exact ICD-10 code52% / 53%24% / 56%66% / 47%
Visit dates51% / 74%not produced83% / 75%
Invalid ICD-10 codes returnednot measured13%0%
Coder-decision AUC—0.81 (~500 ms, GPU)0.91 (~30 ms, CPU)
Time per chart~20 min~6.5 min (GPU)~1 min (CPU)
Data sent to a third partyyesnono

At the exact-code level the approach outputs some extra codes, so precision is lower than the LLM pipeline's; the decision model's threshold trades recall for precision when a client prefers fewer suggestions.

BEFORE AFTER

From cloud LLM calls to private, focused models.

The same charts. The same coders. A fundamentally cheaper and safer way to code.

  • Before: LLM pipeline
  • ~20 minutes per chartAbout a hundred LLM calls each
  • ~$0.31 model spendPlus GPUs for document conversion
  • PHI leaves the buildingEvery page to a third-party API
  • 51% visit-date recallCodes often not tied to the right visit
  • After: Tathastha pipeline
  • ~1 minute per chartOn an ordinary CPU
  • $0 model spendNo per-chart API bill
  • Data stays localNo chart data sent to any third party
  • 83% visit-date recallEvery code with its visit and evidence
WHAT WE LEARNED

Small models win when the task is narrow.

LLMs are a great way to get a first version working. For a high-volume, privacy-sensitive workflow, a pipeline of small, focused, fine-tuned models went further, faster and cheaper. Several ideas that sounded good, like bigger rerankers and zero-shot verifiers, made results worse and were dropped.

Decompose

Most coding is search and rules.

Fine-tune

Beats prompting for narrow decisions.

Measure every step

Keep a change only if it helps.

INSIGHTS

Related insights

Use Fine-tuning

NER: general vs fine-tuned, and when to switch

Start with a general NER model to learn what you need. Fine-tune a small model once your entities are specific to your domain, and handle negation and context separately.

Try LLMs

Small LLMs on-device: what a 0.5B model can do

A small local language model is a good fit for narrow, text-in text-out jobs where the answer is already in the input. It is a poor source of knowledge, and it needs a person checking its output.

Use Fine-tuning

Small fine-tuned models vs per-chart LLM calls

For a high-volume, privacy-sensitive coding workflow, a pipeline of small, task-specific models beat repeated LLM calls on cost, speed, privacy and recall. We would not assume that holds for every task.

READY TO BUILD WHAT'S NEXT?

Not sure where to start? Start with the problem.

Tell us what you're trying to achieve. We'll help you explore the right approach from idea to impact.

View All
Contact us

Have a problem worth getting right?

Send us the paragraph you'd normally write to a colleague. We'll get back to you within 24 hours.

hello@tathastha.com