Skip to content

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ Insurance AI Copilot

An AI-powered insurance premium prediction and intelligent policy assistant built using Machine Learning, FastAPI, Retrieval-Augmented Generation (RAG), Google Gemini, and ChromaDB.

Python FastAPI LightGBM Gemini RAG License


๐Ÿ“Œ Overview

Insurance AI Copilot is an intelligent web application that combines Machine Learning with Large Language Models (LLMs) to modernize insurance services.

The application predicts insurance premiums using a trained LightGBM model while simultaneously providing an AI-powered chatbot capable of answering insurance-related questions using Retrieval-Augmented Generation (RAG).

Unlike traditional chatbots, responses are generated from a dedicated knowledge base, producing more reliable and context-aware answers.


โœจ Features

๐Ÿค– AI Insurance Assistant

  • Gemini-powered conversational assistant
  • Context-aware responses using RAG
  • Insurance-specific knowledge retrieval
  • Natural language interactions

๐Ÿ“ˆ Premium Prediction

  • Predict insurance premium instantly
  • Machine Learning powered
  • LightGBM prediction model
  • Fast inference

๐Ÿง  Retrieval-Augmented Generation (RAG)

  • ChromaDB vector database
  • Semantic document retrieval
  • Grounded AI responses
  • Reduced hallucinations

โšก FastAPI Backend

  • High-performance REST API
  • Modular architecture
  • Easy deployment
  • Scalable design

๐ŸŽจ Modern UI

  • Clean responsive interface
  • Interactive chatbot
  • Prediction dashboard
  • User-friendly experience

๐Ÿ—๏ธ Project Architecture

                User
                  โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚    Web Frontend   โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
          FastAPI Backend
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚                 โ”‚
         โ–ผ                 โ–ผ
 ML Prediction        AI Chatbot
 (LightGBM)        (Gemini + RAG)
         โ”‚                 โ”‚
         โ–ผ                 โ–ผ
   Premium Result     ChromaDB
                      Knowledge Base

๐Ÿ›  Tech Stack

Frontend

  • HTML5
  • CSS3
  • JavaScript

Backend

  • FastAPI
  • Python

Machine Learning

  • LightGBM
  • Pandas
  • NumPy
  • Scikit-learn

Artificial Intelligence

  • Google Gemini API
  • Retrieval-Augmented Generation (RAG)
  • ChromaDB

Deployment

  • Docker
  • Render

๐Ÿ“‚ Project Structure

Insurance-AI-Copilot/
โ”‚
โ”œโ”€โ”€ backend/
โ”œโ”€โ”€ frontend/
โ”œโ”€โ”€ chatbot/
โ”œโ”€โ”€ chroma_db/
โ”œโ”€โ”€ models/
โ”œโ”€โ”€ prompts/
โ”œโ”€โ”€ utils/
โ”œโ”€โ”€ static/
โ”œโ”€โ”€ templates/
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ render.yaml
โ””โ”€โ”€ README.md

๐Ÿš€ Installation

Clone Repository

git clone https://github.com/Felix066/Insurance-AI-Copilot.git
cd Insurance-AI-Copilot

Install Dependencies

pip install -r requirements.txt

Configure Environment Variables

Create a .env file

GOOGLE_API_KEY=YOUR_API_KEY

Run the Application

uvicorn main:app --reload

Open

http://localhost:8000

๐Ÿ’ก How It Works

Premium Prediction

  1. User enters personal information.
  2. Data is preprocessed.
  3. LightGBM predicts insurance premium.
  4. Prediction is displayed instantly.

AI Chatbot

  1. User asks an insurance question.
  2. Relevant documents are retrieved from ChromaDB.
  3. Retrieved context is passed to Gemini.
  4. Gemini generates an accurate answer.

๐Ÿ“Š Machine Learning

Model Used:

  • LightGBM Regressor

Pipeline:

  • Data Cleaning
  • Feature Engineering
  • Encoding
  • Model Training
  • Prediction

๐Ÿง  AI Pipeline

Question
      โ”‚
      โ–ผ
Embedding
      โ”‚
      โ–ผ
Vector Search
      โ”‚
      โ–ผ
Relevant Documents
      โ”‚
      โ–ผ
Gemini LLM
      โ”‚
      โ–ผ
AI Response

๐Ÿ”ฎ Future Improvements

  • User Authentication
  • Policy PDF Upload
  • Conversation Memory
  • Admin Dashboard
  • Premium History
  • Analytics Dashboard
  • Voice Assistant
  • Multi-language Support
  • Cloud Database Integration
  • Explainable AI (XAI)

๐ŸŽฏ Applications

  • Insurance Companies
  • Policy Recommendation Systems
  • Customer Support
  • Insurance Education
  • AI Assistants
  • Digital Insurance Platforms

๐Ÿค Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create a new branch
  3. Commit changes
  4. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License.


๐Ÿ‘จโ€๐Ÿ’ป Author

Felix Danie Jose

B.Tech Computer Science (Artificial Intelligence)

GitHub: https://github.com/Felix066

LinkedIn: www.linkedin.com/in/felix-danie-jose


โญ If you found this project useful, consider giving it a Star!

It motivates future development and helps others discover the project.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages