Skip to content

sghosh685/policyme-cortex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PolicyMe Cortex πŸ›‘οΈ

AI-Powered Insurance Intelligence Platform - Multi-agent fraud detection, risk assessment, and automated underwriting built with React + FastAPI + Gemini AI

Live Demo License

🌟 Overview

PolicyMe Cortex is a cutting-edge InsurTech platform that leverages AI to revolutionize insurance operations. Built with React (frontend) and FastAPI + Gemini AI (backend), it automates claims processing, underwriting, fraud detection, and policy management.

Key Features

  • πŸ” Claims Hawk-Eye: AI-powered claim analysis with fraud detection (0-100 risk scoring)
  • πŸ“Š Underwriting AI: Automated risk assessment and premium calculation
  • ❓ Policy Q&A (RAG): Vector-based policy document search with semantic understanding
  • βœ… Smart Validator: Rule-based claim validation pipeline
  • πŸ”„ Agent Workflow: Multi-agent orchestration for complex decision-making
  • πŸ›’ Smart Shopper: Voice-to-application quote generation

πŸ—οΈ Architecture

polcyme-cortex/
β”œβ”€β”€ api/                    # FastAPI Backend
β”‚   β”œβ”€β”€ main.py            # Main API with Gemini AI integration
β”‚   └── requirements.txt   # Python dependencies
β”œβ”€β”€ src/                   # React Frontend  
β”‚   β”œβ”€β”€ App.js            # Main application component
β”‚   β”œβ”€β”€ index.js          # Entry point
β”‚   └── style.css         # Styles
β”œβ”€β”€ public/               # Static assets
└── vercel.json          # Deployment configuration

πŸš€ Quick Start

Prerequisites

Local Development

1. Clone the repository

git clone https://github.com/sghosh685/policyme-cortex.git
cd policyme-cortex

2. Install frontend dependencies

npm install

3. Set up backend

cd api
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt

4. Configure environment variables

# Create .env in api/ directory
echo "GEMINI_API_KEY=your_gemini_api_key_here" > api/.env

5. Run the application

Terminal 1 (Backend):

cd api
uvicorn main:app --reload --port 8000

Terminal 2 (Frontend):

npm start

Open http://localhost:3000 πŸŽ‰

🌐 Deployment

Deploy to Vercel

1. Install Vercel CLI

npm i -g vercel

2. Deploy

vercel

3. Set environment variables in Vercel Dashboard

  • Go to Project Settings β†’ Environment Variables
  • Add GEMINI_API_KEY with your API key

4. Redeploy

vercel --prod

πŸ› οΈ Tech Stack

Frontend

  • React 18 - UI framework
  • Tailwind CSS - Utility-first styling
  • Axios - HTTP client for API calls
  • React Hooks - State management

Backend

  • FastAPI - Modern Python web framework
  • Google Gemini AI - LLM for claims analysis and NLP
  • Pydantic - Data validation
  • Uvicorn - ASGI server

πŸ“‘ API Endpoints

Claims Analysis

POST /api/claims/analyze
Content-Type: application/json

{
  "incidentData": {
    "location": "Main St, Toronto",
    "dateTime": "2025-12-05T14:00:00Z",
    "description": "Rear-end collision",
    "injuries": false,
    "propertyDamage": true,
    "claimedAmount": 4500
  },
  "policyId": "POL-001"
}

Response:

{
  "claim_id": "CLM-20251205140000",
  "status": "approved",
  "fraud_score": {
    "score": 15.0,
    "risk_level": "Low",
    "confidence": 0.85,
    "indicators": []
  },
  "ai_analysis": {
    "validity": "valid",
    "recommendation": "auto_approve",
    "estimated_payout": 4500,
    "red_flags": [],
    "reasoning": "Standard claim with no red flags"
  }
}

Dashboard Stats

GET /api/dashboard/stats

Health Check

GET /health

πŸ” Environment Variables

Variable Description Required
GEMINI_API_KEY Google Gemini AI API key Yes
REACT_APP_API_URL Backend API URL No (defaults to localhost)

πŸ“ˆ Features in Detail

Claims Hawk-Eye

  • Real-time fraud risk scoring (0-100 scale)
  • AI-powered claim validity assessment
  • Automated approval for low-risk claims
  • Multi-factor fraud indicators

Underwriting AI

  • Extract structured data from broker notes
  • Dynamic risk profiling
  • Automated premium calculation
  • Medical condition analysis

Policy Q&A (RAG)

  • Upload policy PDFs
  • Vector-based semantic search
  • Natural language Q&A
  • Citation of policy sections

Smart Validator

  • Hard rule validation (policy status, limits)
  • Soft rule AI checks (exclusions)
  • Multi-step pipeline visualization
  • Instant feedback on claim validity

Agent Workflow

  • Multi-agent orchestration
  • Document ingestion β†’ Investigation β†’ Adjudication
  • Automated consensus building
  • Risk-based routing

Smart Shopper

  • Voice-to-text application intake
  • Real-time form population
  • Instant quote generation
  • Conversion optimization

🎯 Roadmap

  • Add PostgreSQL database integration
  • Implement user authentication (JWT)
  • Build admin dashboard
  • Add real-time notifications
  • Integrate with insurance carrier APIs
  • Mobile app (React Native)
  • Advanced analytics and reporting

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“ License

MIT License - see LICENSE for details

πŸ‘€ Author

Saikat Ghosh

πŸ™ Acknowledgments

  • Google Gemini AI for LLM capabilities
  • Vercel for seamless deployment
  • React community for amazing tools

⭐ Star this repo if you find it useful!

Live Demo: policyme-cortex.vercel.app

About

Multi-agent AI platform that cuts insurance claim review time by 80% through automated fraud detection and risk scoring

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors