Skip to content
P

PolicyPal

Navigating You to the Right Policy

Created on 2nd October 2024

P

PolicyPal

Navigating You to the Right Policy

Describe your project

PolicyPal is an AI-driven chatbot designed to simplify the process of choosing and understanding insurance policies. By leveraging Generative AI techniques, PolicyPal provides personalized guidance to users, helping them make informed decisions based on their specific needs and circumstances.

In-Scope of the solution - 1. PolicyPal will provide clear, concise explanations of various insurance policies, breaking down complex insurance jargon into understandable language.
2. The chatbot will interact with users in real-time, answering their questions about insurance policies and terms.
3. Through a series of questions, PolicyPal will gather user preferences and requirements to recommend the most suitable insurance policies.

Out of scope in the solution - 1. The chatbot will not provide legal advice or interpret legal implications of insurance policies beyond basic guidance and clarification of terms.
2. The form filling factor due to some issues was not fully incorporated into the project and hence the bot works until selecting a particular policy.
3. While PolicyPal can recommend policies and guide users to choices, completing purchases or binding agreements will not be handled by the chatbot.

Future opportunities - 1. Firstly to add the form filling factor through a series of smartly curated but not hard coded questions which the chatbot saves in a database at the backend.
2. We also had another idea of someone to be able to upload an image of their vehicle and give details of their vehicle so that the system can figure out the policy which could cover such a scenario if happened again in the future.
3. If someone decides to login into the application and then decides to interact with the chatbot, the chatbot will store important and relevant chunks of the conversation at the backend associated with the user's database so that it can advice the user more personally and better the next time they come looking for another policy.

Challenges we ran into

There were a few specific challenges we faced, and how we worked through them, often learning a lot in the process.

Limited Resources Available
One of the biggest frustrations was the lack of resources online. Yes, there are YouTube tutorials, documentation, and GitHub projects—but nothing that brought everything together the way we needed. We were building a fairly specific tool—a chatbot for insurance policies—and the available resources were all too general. We found ourselves mixing together information from all these different sources and it was pretty time-consuming.
It wasn’t efficient, but slowly, things started coming together.

Issues with chromaDB and Local Testing
A major pain point was with chromaDB. We needed to query the database locally, but the problem was that our machines didn’t have the specs to handle it—especially in terms of memory. The code worked perfectly fine on Google Colab, but we couldn't get it to run smoothly in Streamlit for local testing. This was a real headache because testing the entire app was almost impossible without being able to query chromaDB properly on our machines.

Eventually, the workaround was to deploy everything on Streamlit Cloud and test it there. It wasn’t ideal because it meant constantly pushing changes to GitHub and then pulling them on Streamlit Cloud to test. It added extra steps to the workflow, which slowed us down, but at least it worked.

Getting the Prompts Right
Another challenge was the system prompts and the user prompts we were building. At first, the AI would sometimes provide answers that didn’t make sense, or worse, it would "hallucinate" information that wasn’t relevant at all. We needed to find a way to make the AI stay on track, especially when explaining insurance policies, which are already complex enough.

This took a ton of trial and error. We spent hours tweaking the prompt, Slowly, we started getting more consistent results, but this was probably the most time-consuming part.

Discussion

Builders also viewed

See more projects on Devfolio