Inspiration
Every year, healthcare providers lose billions of dollars to denied medical claims. Keeping up with dense, constantly changing insurance policies is practically impossible for human billing teams. A single procedure modifier applied incorrectly, or a diagnosis code that doesn't strictly align with Medicare's latest documentation, can lead to a rejected claim. Recognizing that this manual review process is a major bottleneck in revenue cycle management inspired the creation of an automated, intelligent auditor designed to shoulder this burden.
What it does
Covance is an AI-driven medical billing auditor that catches coding errors and policy violations before a claim is submitted.
Users simply upload a raw medical claim PDF. The platform instantly extracts the complex procedural data (diagnoses, procedure codes, modifiers) and processes it through an AI pipeline. This pipeline cross-references the claim against a massive database of embedded medical policies. Instead of requiring hours of manual review to check if a specific modifier is allowed for a procedure, Covance flags compliance issues instantly, highlighting the exact policy clause violated alongside cited evidence from the source documents.
How it was built
Covance is a full-stack application built around a powerful Retrieval-Augmented Generation (RAG) architecture:
- Frontend: The user interface was built with Next.js (React) and TailwindCSS, maintaining a clean design focused on usability for healthcare professionals.
- Backend & Data Processing: The core logic is powered by a FastAPI Python backend. When a PDF is uploaded,
pymupdf4llmis utilized to extract the text, and an OpenAI LLM parses the unstructured data into clean, structured JSON. - RAG Pipeline & Database: PostgreSQL with the
pgvectorextension serves as the database. Complex medical policies are embedded usingsentence-transformers. During a claim audit, a semantic search query is generated to retrieve the most relevant policy chunks based on vector distance. The retrieved policy chunks and the structured claim data are then fed into an LLM reasoning engine to evaluate overall compliance. - Infrastructure: To ensure robustness and scalability, the cloud architecture was provisioned on AWS using Terraform, and the frontend is deployed on Vercel.
Challenges faced
Developing the platform presented several technical hurdles:
- Unstructured Data Parsing: Medical claim PDFs are notoriously messy and inconsistent. Building a reliable extraction pipeline to convert these PDFs into structured JSON required significant tuning and prompt engineering.
- Frontend-Backend Connectivity: Configuring seamless communication between the Next.js frontend and FastAPI backend required resolving complex CORS and API routing issues to ensure real-time feedback for the user.
- RAG Precision: Tuning the retrieval pipeline to return highly relevant, specific policy clauses without overwhelming the LLM's context window required extensive experimentation with chunking strategies and embedding models.
Key accomplishments
- End-to-End RAG Engine: Successfully engineering a reliable compliance engine from scratch that genuinely understands the nuances of medical coding and accurately cites its sources using vector search.
- Automated Data Extraction: Taming the unstructured complexities of raw medical PDFs and consistently transforming them into clean, parsable JSON data for backend processing.
- Scalable Cloud Architecture: Establishing a complete, reproducible AWS deployment utilizing Terraform. Designing the system with Infrastructure as Code ensures the platform is highly professional and ready to scale.
What I learnt
- Vector Databases in Production: Gaining deep, hands-on experience integrating and optimizing
pgvectorfor semantic search over dense, domain-specific text. - Advanced Prompt Engineering: Learning how to reliably structure outputs from LLMs, forcing them to act as strict reasoning engines rather than creative generators.
- Full-Stack Orchestration: Managing the entire stack, from the React frontend to the Python backend to the AWS infrastructure, greatly improved the understanding of how complex, multi-service applications communicate.
What's next for Covance
Moving forward, the goal is to expand the Covance rules engine to encompass a broader range of commercial and state-specific insurance policies beyond standard Medicare rules. Furthermore, future plans include building direct integrations with major Electronic Health Record (EHR) systems, allowing providers to audit claims directly within their existing workflows without needing to manually upload PDFs.
Built With
- amazon-web-services-(aws)
- base-ui
- fastapi
- framer-motion
- javascript
- langchain
- lucide-react
- next.js
- openai-api
- pgvector
- postgresql
- pydantic
- pymupdf
- pymupdf4llm
- python
- pytorch
- react
- sentence-transformers
- shadcn/ui
- sqlalchemy
- tailwind-css
- terraform
- typescript
- uvicorn
- vercel
Log in or sign up for Devpost to join the conversation.