Skip to content
Pranav-errorPublic

About

AI-Powered Insurance Document Analyzer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CogniSure: AI-Powered Insurance Document Analyzer

CogniSure is an intelligent query-retrieval system built for the HackRx_6.0 Bajaj Hackathon. It allows users to upload insurance policy documents and ask complex, natural language questions to get contextual, AI-driven answers based on the content of those documents.

The system uses a modern RAG (Retrieval-Augmented Generation) architecture to understand the semantic meaning of both the documents and the user's queries, providing fast and accurate clause matching.


🚀 Key Features

  • 📄 Document Upload & Indexing: Easily upload new PDF documents directly through the web interface. The system automatically processes and indexes them into its knowledge base.
  • 🧠 Natural Language Querying: Ask questions in plain English, not just keywords. The AI understands the intent and context of your query.
  • 🤖 AI-Powered Retrieval: Utilizes a Sentence Transformer model (all-MiniLM-L6-v2) and a FAISS vector index to find the most relevant clauses with high speed and accuracy.
  • 📊 Analytics Dashboard: A clean dashboard provides an overview of the system's status and a history of recent queries.
  • ✨ Modern Interface: A sleek, dark-themed, and responsive user interface built with React and Tailwind CSS.

🛠️ Tech Stack

  • Frontend: React, Tailwind CSS, Lucide Icons
  • Backend: Python, Flask
  • AI / Machine Learning:
    • sentence-transformers for creating text embeddings.
    • faiss (from Facebook AI) for efficient vector similarity search.
    • pdfplumber for PDF text extraction.
  • Deployment: The application is bundled to be served by Flask and can be exposed publicly using ngrok.

🏁 Getting Started

Follow these instructions to get the project running on your local machine.

Prerequisites

  • Python 3.8+ and pip
  • Node.js 16+ and npm

Installation & Setup

  1. Clone the Repository:

    git clone <your-repo-url>
    cd <your-repo-folder>
  2. Setup the Python Backend:

    • Navigate to the project root directory.
    • Create and activate a virtual environment:
      python -m venv venv
      # On Windows
      venv\Scripts\activate
      # On macOS/Linux
      source venv/bin/activate
    • Install the required Python packages:
      pip install -r requirements.txt
  3. Setup the React Frontend:

    • In the same project root directory, install the Node.js packages:
      npm install

Running the Application

  1. Create the Initial Index:

    • Place any initial PDF documents you want to index into the uploaded_docs folder.
    • Run the embedding script once to create the initial knowledge base:
      python embed_documents_local.py
  2. Start the Backend Server:

    • Run the Flask application. This will serve both the backend API and the frontend UI.
      python app.py
    • The application should now be running on http://localhost:5000.
  3. Access the Application:

    • Open your web browser and navigate to http://localhost:5000.
    • You can now use the "Upload" page to add more documents or the "Analyze" page to ask questions.

About

AI-Powered Insurance Document Analyzer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages