Inspiration: Addressing Financial Loss due to Incorrect Medical Billing

We've all felt it, that wave of anxiety and confusion when a massive, unreadable medical bill arrives. The U.S. medical billing system is facing three interconnected crises:

A Financial Crisis: Billing errors cost Americans over $125 billion each year, adding to the financial strain already caused by medical debt.

A Data Integrity Crisis: Over 80% of U.S. medical bills contain errors, from duplicate charges to invalid codes and unjustified overcharges.

A Personal Impact Crisis: Patients can save $200–$3,000 per bill by catching and correcting these billing mistakes.

Patients are systematically disadvantaged. We built BillBuddy to close this "confidence gap" and put an AI advocate in every patient's corner.

What it does

BillBuddy is a web app that empowers patients to fight back. It leverages AI to automatically find expensive errors in your medical bills and gives you the tools to dispute them in minutes.

Here's the simple workflow:

  1. Upload Your Bill: Securely upload a PDF or even just a photo of your medical bill.

  2. AI Analysis: Our system uses a hybrid OCR approach to extract every line item:

    • PDF.js extracts text directly from PDF documents
    • GPT-4o Vision performs accurate OCR on image files (JPG, PNG)
  3. Then, GPT-4o analyzes the bill for common errors, like duplicate charges, invalid CPT or ICD-10 codes, and overcharges compared to industry benchmarks.

  4. Review Your Report: BillBuddy gives you a simple, clear report: "Here are the errors we found" and "Here's your estimated potential savings."

  5. Dispute with Confidence: We automatically generate a professional dispute letter template citing the specific errors, ready for you to send to the hospital or insurance provider.

How we built it

We needed a stack that was fast, secure, and powerful.

Category Technologies / Tools Purpose / Description
Frontend React.js Core framework for building the dynamic, single-page application.
Tailwind CSS Clean, responsive, and mobile-friendly UI design.
Backend & Database Supabase All-in-one backend for database, authentication, and file storage.
Supabase Auth Manages secure user sign-up, login, and session management.
Supabase Storage Handles uploaded medical bill files securely.
PostgreSQL Reliable, scalable database for structured data.
Security Supabase RLS Row-Level Security ensures each user can only access their own private medical data.
OCR (Optical Character Recognition) PDF.js Extracts text directly from PDF documents in-browser.
GPT-4o Vision API Accurately extracts text from image files (JPG, PNG).
AI & Analysis OpenAI GPT-4o Analyzes extracted text as a “medical billing auditor,” identifying billing errors.
OpenAI GPT-4o-mini Generates cost-effective, high-quality dispute letters.
Deployment Vercel Enables fast, reliable deployment and hosting for the React frontend.

Challenges we ran into

Data Scarcity & HIPAA: Our biggest hurdle was a real-world one. Due to HIPAA privacy laws, getting actual medical bills for training and testing was impossible. We had to pivot to scraping the internet for sample images. This created a new problem: these samples were often low-quality, heavily censored, or redacted, making it incredibly difficult for our OCR to extract reliable data. We also failed to find any PDF medical bill files on the internet so we leveraged various AI platforms to generate sample medical bills.

Complex Prompt Engineering: This was by far our hardest technical challenge. Early, general prompts ("find errors") led to AI "hallucinations" and, critically, inconsistent JSON output. We spent a significant portion of our time iterating a multi-shot, role-based prompt that forces the model to act as a specific type of auditor, constrains it to only find verifiable errors, and guarantees it will return a valid JSON structure, even if that structure is empty

Data Integrity from OCR: Medical bills have zero standardization. Raw text output from our OCR pipeline was often chaotic. We had to write several pre-processing functions to sanitize the text, removing artifacts, standardizing date formats, and isolating line items, before we could even send it to the LLM for analysis.

First Hackathon Experience: For all four team members, this was one of our first hackathons, and for most, our first time developing a full web application from scratch. Navigating the end-to-end process of building a fully functional website, while simultaneously learning new technologies under tight time constraints, proved to be both a steep learning curve and an invaluable experience

Accomplishments that we're proud of

Building a functional, secure, end-to-end AI application that solves a painful, real-world problem all in a single hackathon.

Seamlessly integrating four complex technologies (React, Supabase, PDF.js/GPT-4o Vision, and OpenAI) into a single, 60-second user flow from bill upload to final analysis.

The 1-Click Dispute Letter Generator. This is our most user-benefiting addition we made, a feature that instantly turns a user's financial anxiety and confusion into a concrete, professional, and actionable tool.

What we learned

We learned that the combination of a powerful Backend-as-a-Service (like Supabase) and a flexible LLM (like GPT-4o) is a force multiplier. We were able to build a highly complex, secure, and intelligent application with what is effectively a zero-backend-code architecture, letting us focus entirely on the user experience and AI logic.

We also learned that Prompt Engineering is the New Skill. The real challenge in modern AI development isn't just calling an API. It's in the meticulous "prompt architecture" constraining a vast generative model to make it act as a precise, reliable, JSON-based tool is the real skill.

What's next for BillBuddy

Multiple Bill Dispute: Enable users to consolidate multiple medical bills into a single, comprehensive dispute file. This feature will streamline the process for patients managing several hospital or provider invoices, saving time and ensuring consistency across disputes.

Mobile App Integration: Allow users to directly scan or photograph their medical bills using their phone’s camera. The app will instantly extract and analyze the data, making it even easier to identify errors on the go without needing to upload files manually.

Automate Submission: Include a secure automation feature allowing users to authorize BillBuddy to submit dispute letters directly to billing departments or insurance providers. This end-to-end automation will make the resolution process faster, more convenient, and less intimidating for users.

Financial Aid Pathway: Add a simple FPL (Federal Poverty Level) calculator. If a user is under 300% FPL, we will automatically direct them to financial aid partners (like Dollar For) to apply for 100% forgiveness.

Built With

Share this project:

Updates