Inspiration

Healthcare insurance costs in the United States are notoriously unpredictable and non-transparent. Even after federal regulations like the Hospital Price Transparency Rule, compliance remains low, and patients often struggle to estimate their financial responsibility. We were inspired to create a tool that empowers users to better understand, predict, and take control of their healthcare costs through modern technology.

What it does

Insurance Charge Predictor is a user-friendly web application that allows users to:

  • Predict healthcare insurance charges based on demographic and lifestyle factors
  • Explore AI-generated counterfactual scenarios that suggest cost-saving changes
  • Learn health insurance terminology and concepts through an interactive AI-powered chat assistant
  • Visualize data trends such as BMI versus insurance charges and regional cost differences

How we built it

We built the platform using Streamlit for the frontend, combining machine learning models like XGBoost and Random Forest trained on real-world health insurance datasets. A custom counterfactual generator suggests actionable modifications to lower insurance costs. We integrated OpenAI's GPT-3.5 model to power a chat-based health insurance explainer.

Challenges we ran into

One of the biggest challenges was finding high-quality, real-world healthcare insurance data that was detailed enough for meaningful modeling but also clean and well-structured. Many publicly available datasets are outdated, incomplete, or lack critical variables like smoking status, BMI, or regional information. We spent a significant amount of time cleaning and engineering features from the datasets we found.

Another challenge was building machine learning models that were both accurate and interpretable. Because healthcare costs can be influenced by many complex, nonlinear factors, simple models often underperformed while more advanced models like XGBoost risked becoming black boxes. We had to balance performance with explainability by carefully tuning model hyperparameters and implementing techniques like counterfactual generation to make the predictions actionable and understandable to users.

In addition, we faced technical challenges around API key security and adapting to major changes in the OpenAI API client structure midway through development. Customizing Streamlit’s frontend to achieve a smooth, professional user experience with animations and responsive layouts also required creative workarounds.

Accomplishments that we're proud of

We successfully built a full-stack, machine learning-backed web app that not only makes accurate predictions but also provides actionable guidance and education for users. We integrated an AI chat assistant to explain complex health insurance topics in plain language, making the platform accessible to non-technical audiences. We also ensured strong security practices throughout our development process.

What we learned

We learned how to integrate machine learning models into real-time web applications, how to securely manage API keys and sensitive data, and how to build dynamic user interfaces with Streamlit and CSS. We also gained experience adapting to rapidly evolving third-party APIs and maintaining a clean, modular codebase.

What's next for Insurance Charge Predictor

We plan to expand the platform by integrating more advanced cost models that incorporate provider-specific price transparency datasets. We also aim to enhance the AI chat assistant to handle multi-turn conversations and provide localized insurance information. In the long term, we envision partnering with healthcare providers and financial services to make personalized insurance cost tools more widely available.

Built With

Share this project:

Updates