Inspiration

Insurance denials cost the U.S. healthcare system $262 billion every year. For most practices, fighting a denial means a billing specialist manually reading 40-page payer policy PDFs, writing appeal letters from scratch, and hoping they cited the right criteria. Most practices appeal less than 10% of denials, not because the cases aren't winnable, but because the process is too slow, too manual, and too dependent on expertise that's hard to scale.

We wanted to build the system that fights back. One where uploading a denial PDF is the last manual step.

What It Does

CLAIRO is a full-stack AI platform that turns the denial-to-appeal pipeline into an autonomous workflow:

Upload and Extract - Drop any denial PDF. Groq LLaMA 3.3 70B extracts payer, patient ID, CPT codes, denial reason, and billed vs. denied amounts in seconds.

Denial Risk Scoring - Hybrid rule-based and LLM analysis scores every claim 0 to 100, flags prior auth gaps and bundling risks, and ranks full queues by priority.

Appeal Letter Generation - Generates formal, citation-backed appeal letters grounded in real payer policy evidence retrieved from 20+ payer PDFs via ChromaDB semantic search.

Prior Authorization Pre-Check - Evaluates every PA requirement against clinical notes before filing, flagging gaps before the payer can deny.

Analytics Dashboard - Practice-level visibility into denials by payer, CPT code, category, and month, benchmarked against industry data.

InsForge Live Database - Every claim, score, and appeal persisted in InsForge Postgres in real time, with a live feed and autonomous agent query interface.

MCP Server - 7 tools including insforge_query that let any MCP-compatible agent (Claude, Cursor, Copilot) orchestrate the full pipeline autonomously.

How We Built It

The backend is FastAPI with SQLAlchemy, connected to InsForge Postgres as the primary database with a SQLite fallback. Groq powers both the LLM layer (LLaMA 3.3 70B for extraction, classification, risk scoring, and appeal generation) and voice transcription (Whisper Large v3). Payer policies were ingested as real PDFs from Aetna, UHC, BCBS, Cigna, Medicare, and others, chunked, embedded with Sentence Transformers, and stored in ChromaDB with payer-specific relevance boosting and keyword reranking for clinical criteria sections.

The MCP server exposes 7 tools over stdio, including insforge_query, which lets any MCP-compatible agent read the live InsForge database before acting, turning InsForge from passive storage into the agent's working memory. The frontend is React 19 + Vite with Recharts for analytics. The entire stack runs locally or in Docker.

Challenges We Ran Into

The hardest problem was making InsForge a genuine functional dependency rather than a cosmetic integration. Early versions stored data in InsForge but never read it back in any meaningful way. We rebuilt the agentic loop so that every autonomous agent call queries InsForge for historical context before running risk scoring or generating an appeal. The agent's output is literally different depending on what's in the database.

RAG quality was the other major challenge. Generic semantic search across 20+ payer PDFs returned too much irrelevant content. We added payer-specific relevance bonuses and a keyword reranking pass targeting clinical criteria sections, which significantly improved citation quality in the appeal letters.

Accomplishments That We're Proud Of

The insforge_query MCP tool creating a real agentic feedback loop, where the agent reads live InsForge data before every decision rather than working off a static snapshot.

Appeal letters that cite specific policy clauses by payer. Not generic templates, but grounded arguments built from the actual document that would be used to deny the claim.

A prior auth pre-check that evaluates requirements one by one against clinical notes, turning a 40-page policy PDF into a clear pass/fail checklist before filing.

Getting the full stack (FastAPI, ChromaDB, InsForge Postgres, Groq, MCP server, and React frontend) running end to end within the hackathon window.

What We Learned

InsForge's agent-native design changes how you think about database architecture. When the database is MCP-accessible by default, you stop thinking of it as storage and start thinking of it as shared state that agents can read and act on. That shift fundamentally changes what "agentic" means in practice.

We also learned that RAG for high-stakes professional documents requires domain-aware retrieval, not just embedding similarity. Payer policies have specific sections like coverage criteria, coding guidelines, and exclusions that need to be surfaced correctly, and generic chunking strategies miss them.

What's Next for CLΔIRO

Live payer policy sync - Automatically updating the ChromaDB vector store as payers revise their policies, so appeal letters always cite current criteria.

Multi-agent orchestration with LangGraph - Breaking the denial pipeline into specialized agents (extraction, risk, research, writing) that hand off to each other through InsForge as shared state.

EHR integration - Pulling clinical notes directly from Epic or Athena so prior auth pre-checks run without any manual copy-paste.

Appeal outcome tracking - Closing the loop by recording which appeals succeeded and feeding that signal back into risk scoring to improve over time.

Built With

Share this project:

Updates