Skip to content

Latest commit

 

History

History
288 lines (208 loc) · 5.29 KB

File metadata and controls

288 lines (208 loc) · 5.29 KB

🛡️ 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.