
If you are the engineer handed "make our denials go down with AI," the first instinct is usually wrong: nobody needs you to replace the EHR or the practice-management system. What you are building is an intelligence layer that reads the data those systems already emit, runs three models over it, and pushes actions back through the interfaces you already have. Rip-and-replace is how these projects die. A well-scoped layer is how they ship in a quarter.
The problem is worth solving. Experian's 2025 numbers show 41% of providers with at least one in ten claims denied, rework runs $25-$118 per claim, and about two-thirds of denials are never resubmitted. That is 3-5% of net revenue leaking out through a process most orgs run entirely by hand. This is a data and modeling problem, and it decomposes cleanly.
The three data flows you are wiring
Think of the layer in terms of I/O first, models second:
-
Data in: 835 remittances, 837 claims, 270/271 eligibility, and EHR clinical data — ideally over FHIR APIs where they exist.
-
Intelligence in the middle: prediction, classification, and generation models, plus the orchestration that decides what routes where.
-
Actions out: pre-submission holds pushed back into the PM system, corrected claims to the clearinghouse, drafted appeals into the specialist worklist.
Keep it a layer and the blast radius stays small, ROI is measurable per module, and you can sequence the rollout. This integration-first pattern is standard in serious custom software development for regulated environments.
Model 1: the predictive scoring pipeline
This is the highest-ROI component, so build it like a real ML product rather than a notebook. The training set is your historical 835/837 pairs — labeled examples of claims that paid and claims that were denied. Features live at the claim level: payer, plan, procedure and diagnosis codes, provider, place of service, authorization status, eligibility, plus derived signals. At inference, every claim is scored before submission, and anything over threshold routes to a pre-submission review queue.
The reason a model beats a rules engine here is specificity. A rules engine flags a blank field. The model learns that a given payer denies a given CPT code 34% more often on Fridays against one plan. That is a pattern, not a rule, and it drifts, which is the whole point: schedule retraining, wire drift and bias monitoring, and treat the score as a living artifact. A well-tuned model prevents 20-30% of the denials you used to absorb. Scope it alongside proper AI development services so the MLOps is real from day one.
Data-foundation checklist before you start training:
-
Depth: at least 18-24 months of 835/837 history for seasonal payer behavior and enough examples per category.
-
Labeling: denials tied back to root causes, not just codes.
-
Feature richness: all the claim-level signals reliably captured.
-
Pipelines: a repeatable flow that feeds the model fresh data daily. A model you can't feed daily is a science project.

Model 2: LLM classification and routing
When a denial comes back, understanding it and routing it are both language problems. Remittance advice is dense, abbreviated, and inconsistent across payers, and the CARC/RARC code rarely tells the full story. An LLM classifier reads the full remittance context and outputs two things: a normalized category (clinical, technical, eligibility, authorization) and a resolution path.
That routing decision is where the automation earns trust:
-
Hard denial, non-covered service → patient billing.
-
Soft coding mismatch → automated correct-and-resubmit flow.
-
Authorization denial → the retro-auth team.
This classifier is the connective tissue that makes everything downstream possible, and it slots naturally into your platform via LLM integration. The engineering discipline: fully automate low-dollar, high-confidence technical denials, and always send high-dollar or clinically complex ones to a human with evidence pre-assembled. Confidence thresholds and dollar gates are first-class config, not an afterthought.
Ship classification first, before prediction. It is lower-risk because it doesn't touch your submission process, it immediately cleans up reporting, and — critically — it produces the labeled root-cause data your predictive model needs. Phase ordering matters.
Model 3: appeals as an agentic workflow
Appeals are the most time-expensive stage, and the one place to reach for agentic patterns instead of a single prompt. The workflow chains discrete, verifiable steps:
-
Retrieve the relevant clinical documentation from the EHR for the specific denial reason.
-
Match the denial against the payer's published medical policy and cite the applicable criteria.
-
Draft the appeal letter in the payer's preferred format for specialist review.
Nothing auto-submits. The specialist reviews, adjusts, sends — but the labor drops from thirty minutes to a couple. Build it as an agentic workflow so each step is auditable, which you need anyway for compliance. When source records are scanned PDFs rather than structured FHIR data, add computer vision for document extraction to the retrieve step.
Compliance is an architecture decision, not a feature
Because you are moving PHI, governance is designed in at the start:
-
Process PHI inside a compliant, auditable environment — which usually rules out a public consumer AI endpoint and favors a controlled or private deployment.
-
Emit an audit trail for every automated action: what the model predicted, what it did, who reviewed it.
-
Keep human oversight non-negotiable for clinical and high-dollar decisions.
-
Monitor for drift and bias, because payer behavior changes and last year's model quietly degrades.
Get this right early and it is a competitive advantage; get it wrong and one compliance finding shuts the program down.
Sequence it so each phase funds the next
Baseline your metrics, ship classification, then prediction, then generative appeals, then closed-loop prevention that feeds root causes back to registration. Each phase is independently valuable, so you can stop, measure a real dollar recovery per module, and justify the next build with numbers instead of a promise. The full end-to-end walkthrough lives in denial management automation in healthcare if you want the business framing alongside the engineering.
Frequently Asked Questions
What is the minimum viable architecture for AI denial automation?
At minimum: a repeatable pipeline that pulls 835/837 and eligibility data, one model (start with LLM classification), and an actions-out path that writes results back into your worklist. Classification alone cleans up reporting and generates labeled data without touching submission, so it is the safest first module. You expand into predictive scoring and agentic appeals from that base rather than trying to stand all three models up at once.
Why build classification before the predictive model?
Because prediction is only as good as its labels, and classification produces them. Ship the LLM classifier first and it normalizes messy remittance text into root-cause categories, which becomes the clean, labeled training set your scoring model depends on. Classification is also lower-risk — it never changes what you submit — so it delivers reporting value in weeks while quietly preparing the ground for the higher-ROI prediction phase.
How much historical data does the scoring model actually need?
Aim for 18-24 months of 835/837 history. That window gives the model enough denial examples per category to be reliable and lets it learn seasonal payer behavior that a shorter sample would miss. If your history is thin or poorly labeled today, that is an argument for starting with classification and data cleanup, not for abandoning prediction — the cleanup pays for itself while it builds the dataset.
Where does computer vision fit in a denial pipeline?
In the retrieval step of the appeals workflow, whenever source documentation is scanned PDFs rather than structured EHR or FHIR data. Computer-vision document extraction pulls the clinical evidence a generative appeal needs out of unstructured images so the drafting step has something to cite. If all your source data is already structured, you can skip it; many provider environments have enough scanned records that it matters.
How do I keep an LLM appeal workflow HIPAA-compliant?
Process PHI inside a controlled or private deployment rather than a public consumer AI endpoint, encrypt data in transit and at rest, enforce access controls, and log every step of the agentic workflow for the audit trail. Keep the human at the send: nothing auto-submits, and a qualified specialist reviews clinical and high-dollar drafts. Building the workflow as discrete, verifiable steps is what makes that logging and oversight practical.