A sophisticated AI-powered insurance assistant system that combines PostgreSQL database management, vector embeddings with Milvus, and specialized AI agents for insurance domain expertise.
- Multi-Database Integration: PostgreSQL for structured data + Milvus for vector embeddings
- Real-time Sync: Continuous database synchronization between PostgreSQL and Milvus
- Specialized AI Agents: Domain-specific insurance experts (Life, Home, Auto)
- Intelligent Routing: Smart query routing to appropriate specialists
- Streamlit UI: Beautiful, interactive web interface
- Download and install Docker Desktop
- Ensure Docker is running in administrator mode
# Download the installation script
Invoke-WebRequest https://raw.githubusercontent.com/milvus-io/milvus/refs/heads/master/scripts/standalone_embed.bat -OutFile standalone.bat
# Start Milvus container
standalone.bat start
Wait for Milvus starting...
Start successfully.
# Verify Milvus is running (port 19530 should be listening)
docker ps
# Stop Milvus
standalone.bat stop
Stop successfully.
# Delete Milvus container and data
standalone.bat delete
Delete Milvus container successfully.
Delete successfully.
# Restart Milvus
standalone.bat start
graph TD
A[PostgreSQL Database] -->|Stores Insurance Data| B[Sync Process]
B -->|Generates Embeddings| C[Milvus Vector Database]
D[Streamlit UI] -->|User Queries| E[Coordinator Agent]
E -->|Routes to| F[Life Insurance Agent]
E -->|Routes to| G[Home Insurance Agent]
E -->|Routes to| H[Auto Insurance Agent]
C -->|Provides Context| F
C -->|Provides Context| G
C -->|Provides Context| H
insurance-ai-system/
โโโ creating_postgres_database.py
โโโ first_vector_embedding.py
โโโ syncing_databases.py
โโโ insurance_agents_main.py
โโโ .env.example
โโโ README.md
git clone https://github.com/yourusername/insurance-ai-system.git
cd insurance-ai-system
cp .env.example .env
Edit the .env
file with your credentials:
PG_DB_NAME=insurance_db
PG_USER=postgres
PG_PASSWORD=yourpassword
PG_HOST=localhost
PG_PORT=5432
MILVUS_HOST=localhost
MILVUS_PORT=19530
OPENAI_API_KEY=your_openai_key
GROQ_API_KEY=your_groq_key
pip install -r requirements.txt
python creating_postgres_database.py
python first_vector_embedding.py
python syncing_databases.py
streamlit run insurance_agents_main.py
Agent Type | Specialization | Example Capabilities |
---|---|---|
Life Insurance | Mortality risk assessment | Term vs whole life analysis |
Home Insurance | Property valuation | HO-3 vs HO-5 comparisons |
Auto Insurance | State compliance | Liability coverage analysis |
-
PostgreSQL Schema Design: Comprehensive data model with constraints
-
Vector Embeddings: OpenAI's text-embedding-3-large
-
Real-time Triggers: PostgreSQL LISTEN/NOTIFY
-
Agent Specialization: Strict domain boundaries
-
Streamlit UI: Custom CSS styling
- Embedding Generation: ~100 records in 2 seconds
- Query Response Time: 1.5โ3 seconds average
- Database Sync: Sub-second latency
- Fork the project
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Distributed under the MIT License.
Project Maintainer - Sam Joe Silvano Putti
Project Link: https://github.com/SamJoeSilvano/Insurance-Agentic-AI
Reality Augmented Generation(RAG) Pipeline Overview
- Multi-language support
- Voice interaction
- PDF policy analysis