You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ClaimLens AI is an intelligent insurance claim analysis platform that leverages Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs) to automate the evaluation of health insurance claims against policy documents. The system extracts relevant policy clauses, analyzes claim compliance, and provides actionable recommendations for claim adjudicators.
Key Capabilities
Automated Document Processing: Extract and parse policy documents (PDF) with OCR support
Intelligent Clause Retrieval: Semantic search using vector embeddings to find relevant policy clauses
AI-Powered Analysis: LLM-based reasoning for compliance assessment and risk identification
Real-time Recommendations: Actionable insights for claim approval/denial decisions
Multi-Tenant Support: Role-based access control for different user types
Features
Core Features
Feature
Description
Document Ingestion
Upload and process insurance policy PDFs with automatic text extraction
Semantic Search
Find relevant policy clauses using advanced embedding models
AI Analysis
Comprehensive claim analysis using Claude/GPT models
Risk Assessment
Identify compliance risks with severity ratings
Recommendations
Get actionable suggestions for claim processing
Analytics Dashboard
Visual insights into claim patterns and outcomes
AI/ML Features
Feature
Description
RAG Pipeline
Retrieval-Augmented Generation for context-aware responses
git clone https://github.com/your-org/ClaimLens-AI4Bharat.git
cd ClaimLens-AI4Bharat
2. Configure Environment
# Edit configuration (optional - defaults work for local development)
nano .env.sample
3. Start the Application
# Local development (with mock LLM)
docker compose --profile local up -d
# Or with Ollama for local AI
docker compose --profile local --profile ollama up -d
4. Build Vector Index (First Time)
# Build FAISS index from policy documents
docker compose exec backend python scripts/build_faiss_index.py
# 1. Clone repository
git clone https://github.com/your-org/ClaimLens-AI4Bharat.git
cd ClaimLens-AI4Bharat
# 2. Configure environment (optional - defaults work for local)
nano .env.sample
# 3. Start services
docker compose --profile local up -d
# 4. Wait for services to be healthy
docker compose ps
# 5. Initialize database (automatic on first start)
docker compose exec backend alembic upgrade head
# 6. Build FAISS index
docker compose exec backend python scripts/build_faiss_index.py
Production Deployment
# 1. Configure production environment# Edit .env.sample with production values:# - Set ENVIRONMENT=production# - Configure AWS credentials# - Set strong passwords and secrets
nano .env.sample
# 2. Build and deploy
docker compose --profile prod up -d --build
# 3. Run migrations
docker compose exec backend alembic upgrade head
Configuration
Environment Variables
Variable
Default
Description
ENVIRONMENT
local
Environment (local/production)
DEBUG
true
Enable debug mode
SECRET_KEY
(generated)
JWT signing key
DATABASE_URL
(docker default)
PostgreSQL connection string
REDIS_URL
(docker default)
Redis connection string
LLM Configuration
Variable
Default
Description
LLM_MODE
mock
LLM mode (mock/ollama/bedrock)
USE_MOCK_LLM
true
Use mock responses
BEDROCK_ENABLED
false
Enable AWS Bedrock
BEDROCK_MODEL_ID
anthropic.claude-3-sonnet
Bedrock model ID
OLLAMA_HOST
http://ollama:11434
Ollama server URL
OLLAMA_MODEL
llama3.2
Ollama model name
Embedding Configuration
Variable
Default
Description
EMBEDDING_MODE
local
Embedding mode (mock/local/bedrock)
EMBEDDING_MODEL
BAAI/bge-base-en-v1.5
HuggingFace model name
VECTOR_STORE_TYPE
faiss
Vector store (faiss/pgvector)
AWS Configuration (Production)
Variable
Description
AWS_REGION
AWS region
AWS_ACCESS_KEY_ID
AWS access key
AWS_SECRET_ACCESS_KEY
AWS secret key
S3_BUCKET_NAME
S3 bucket for documents
API Reference
Authentication
# Register new user
POST /api/v1/auth/register
{
"email": "user@example.com",
"password": "secure_password",
"full_name": "John Doe"
}
# Login
POST /api/v1/auth/login
{
"email": "user@example.com",
"password": "secure_password"
}
Claims Management
# Create claim
POST /api/v1/claims/
{
"claim_number": "CLM-2024-001",
"policy_number": "POL-123456",
"claim_amount": 50000,
"claim_type": "hospitalization",
"description": "Surgery for appendicitis"
}
# Get claim
GET /api/v1/claims/{claim_id}
# List claims
GET /api/v1/claims/?status=pending&page=1&limit=10
Analysis
# Analyze claim against policy
POST /api/v1/analysis/analyze
{
"claim_id": "uuid-here",
"policy_documents": ["policy-doc-id"],
"analysis_type": "comprehensive"
}
# Get analysis results
GET /api/v1/analysis/claim/{claim_id}
Documents
# Upload document
POST /api/v1/documents/upload
Content-Type: multipart/form-data
file: <PDF file># Get document
GET /api/v1/documents/{document_id}
# Search policy clauses
POST /api/v1/policies/search
{
"query": "room rent coverage limit",
"top_k": 5
}
# Build FAISS index from policy PDFs
docker compose exec backend python scripts/build_faiss_index.py
# Output:# Processing: icici_complete_health.pdf# Processing: niva_rise.pdf# Indexed 238 clauses# FAISS index saved to /app/data/faiss_index/
Retrieval Configuration
# Default retrieval settingsRETRIEVAL_TOP_K=10# Number of candidates to retrieveRERANK_TOP_K=5# Number of results after rerankingSIMILARITY_THRESHOLD=0.7# Minimum similarity score
LLM Integration
Supported LLM Modes
Mode
Use Case
Configuration
Mock
UI development, testing
LLM_MODE=mock
Ollama
Local AI without cloud
LLM_MODE=ollama
Bedrock
Production deployment
LLM_MODE=bedrock
Mock Mode (Default)
Returns realistic predefined responses for development without any LLM costs.
# Start services
docker compose --profile local up -d
# View logs
docker compose logs -f backend
# Access backend shell
docker compose exec backend bash
# Run migrations
docker compose exec backend alembic upgrade head
# Create new migration
docker compose exec backend alembic revision --autogenerate -m "description"# Rebuild specific service
docker compose up -d --build backend
# Stop services
docker compose down
# Stop and remove volumes
docker compose down -v
Code Quality
# Format code (backend)
docker compose exec backend black .
docker compose exec backend isort .# Type checking
docker compose exec backend mypy app/
Testing
Running Tests
# Run all backend tests
docker compose exec backend pytest
# Run with coverage
docker compose exec backend pytest --cov=app --cov-report=html
# Run specific test file
docker compose exec backend pytest tests/test_claims.py -v
# Run with verbose output
docker compose exec backend pytest -v -s
ClaimLens AI is an insurance claim analysis platform that uses Retrieval-Augmented Generation (RAG) and Large Language Models (LLMs) to evaluate health insurance claims against policy documents, extract relevant clauses, analyze compliance, and generate actionable recommendations for claim adjudicators.