How atharvadchaudhari05/coverindex-ai works
CoverIndex AI is an insurance-policy question-answering and recommendation app. Users ask questions or upload a PDF; the backend routes the query, retrieves relevant indexed pages, generates a cited response, and can offer a confirmed live-web fallback when document evidence is insufficient. The frontend also supports local chat history and conversation search. The README documents the advisor and fallback capabilities; source excerpts show the API, ingestion, retrieval, and generation components, but do not expose every internal handoff, so undocumented links are omitted.
Main entry points: server.py HTTP API · agent.py Answer generation · ingest.py PDF ingestion · app.js Chat interface
Components 17
User experience
- Chat interface
public/app.js - Edge gateway
worker.js
Query and advice
- HTTP API
policy_rag/server.py - Query routing
policy_rag/agent.py - Answer generation
policy_rag/agent.py - AI instructions
prompts - Citations and sources
policy_rag/agent.py - Web fallback
policy_rag/agent.py - Runtime configuration
policy_rag/config.py
Policy knowledge
- PDF ingestion
policy_rag/ingest.py - Policy PDFs
Policy Documents - Page search index
policy_rag/index.py - Index cache
cache - Page records
policy_rag/models.py
External services
- DuckDuckGo search
policy_rag/utils.py - Language models
Other components
- Policy seeker
Connections 20
- Policy seeker → Chat interface: asks or uploads
README.md - Chat interface → Edge gateway: sends API requests
- Chat interface → HTTP API: posts uploads
public/app.js - Edge gateway → HTTP API: proxies API
worker.js - HTTP API → Query routing: routes query
policy_rag/server.py - HTTP API → Answer generation: requests answer
policy_rag/server.py - HTTP API → PDF ingestion: processes upload
policy_rag/server.py - Policy PDFs → PDF ingestion: provides documents
README.md - PDF ingestion → Page records: extracts pages
policy_rag/ingest.py - PDF ingestion → Index cache: loads and saves
policy_rag/ingest.py - Page search index → PDF ingestion: builds page index
policy_rag/index.py - Page search index → Page records: searches pages
policy_rag/index.py - Answer generation → Page search index: retrieves context
policy_rag/agent.py - Answer generation → Language models: generates response
policy_rag/agent.py - Answer generation → AI instructions: loads instructions
- Answer generation → Citations and sources: formats sources
policy_rag/agent.py - HTTP API → Web fallback: awaits confirmation
policy_rag/server.py - Web fallback → DuckDuckGo search: searches web
README.md - Web fallback → Language models: writes sourced answer
- Runtime configuration → AI instructions: loads prompt files
policy_rag/config.py