How mananjaykumar/enterprise-rag-ops-intelligence works
This is an enterprise knowledge and operations platform: users authenticate, ingest policy documents, then ask questions answered through permission-filtered hybrid RAG, secure SQL analytics, or a stateful agent that coordinates both. The frontend exposes chat, document ingestion, SQL, agent tracing, and telemetry experiences; the FastAPI application routes requests to domain services backed by PostgreSQL/pgvector and AI adapters. The README documents evaluation and observability capabilities. Source-index references establish several service and worker dependencies; links based only on README architecture are cited there. Unsampled implementation details are not inferred.
Main entry points: main.py FastAPI application · page.tsx Intelligence dashboard · ingestion.py Ingestion pipeline · api.ts API client
Components 29
User experience
- Intelligence dashboard
frontend/src/app/page.tsx - Unified chat
frontend/src/components/UnifiedChatView.tsx - Document ingest UI
frontend/src/components/DocumentIngestView.tsx - Policy RAG view
frontend/src/components/PolicyRagView.tsx - SQL studio
frontend/src/components/SqlStudioView.tsx - Agent tracer
frontend/src/components/AgentTracerView.tsx - API client
frontend/src/lib/api.ts
API and access
- FastAPI application
src/main.py - Authentication and RBAC
src/api/v1/auth.py - Document endpoints
src/api/v1/documents.py - RAG endpoint
src/api/v1/rag.py - Retrieval endpoint
src/api/v1/retrieval.py - SQL endpoint
src/api/v1/sql.py - Agent endpoint
src/api/v1/agent.py
Document knowledge
- Ingestion pipeline
src/services/ingestion.py - Document parser
src/services/parser.py - Ingestion worker
src/workers/ingestion_worker.py - Hybrid retrieval
src/services/retrieval.py
Query intelligence
- Grounded RAG
src/services/rag.py - Intent router
src/services/router.py - Text-to-SQL sandbox
src/services/text_to_sql.py - Agent orchestrator
src/services/agent_orchestrator.py - Benchmark evaluation
src/services/evaluation.py
Platform services
- Gemini and reranking adapters
src/infrastructure/ai - Local file storage
src/infrastructure/storage/local.py - Postgres job queue
src/infrastructure/queue/postgres.py - PostgreSQL and pgvector
src/db/session.py - Tracing and telemetry
src/services/observability.py
Other components
- User
Connections 42
- User → Intelligence dashboard: uses
README.md - Intelligence dashboard → Unified chat: presents
- Intelligence dashboard → Document ingest UI: presents
- Intelligence dashboard → Policy RAG view: presents
- Intelligence dashboard → SQL studio: presents
- Intelligence dashboard → Agent tracer: presents
- Unified chat → API client: requests
- Document ingest UI → API client: requests
- Policy RAG view → API client: requests
- SQL studio → API client: requests
- Agent tracer → API client: requests
- API client → FastAPI application: calls API
README.md - FastAPI application → Authentication and RBAC: registers
src/main.py - FastAPI application → Document endpoints: registers
src/main.py - FastAPI application → RAG endpoint: registers
src/main.py - FastAPI application → Retrieval endpoint: registers
src/main.py - FastAPI application → SQL endpoint: registers
src/main.py - FastAPI application → Agent endpoint: registers
src/main.py - Document endpoints → Ingestion pipeline: enqueues documents
- Ingestion worker → Postgres job queue: claims jobs
src/workers/ingestion_worker.py - Ingestion worker → Ingestion pipeline: processes documents
src/workers/ingestion_worker.py - Ingestion pipeline → Document parser: parses files
src/services/ingestion.py - Ingestion pipeline → Local file storage: reads files
src/services/ingestion.py - Ingestion pipeline → Gemini and reranking adapters: embeds chunks
src/services/ingestion.py - Ingestion pipeline → PostgreSQL and pgvector: stores chunks
src/services/ingestion.py - Retrieval endpoint → Hybrid retrieval: calls search
src/api/v1/retrieval.py - RAG endpoint → Grounded RAG: calls answers
src/api/v1/rag.py - Grounded RAG → Hybrid retrieval: retrieves context
src/services/rag.py - Hybrid retrieval → Gemini and reranking adapters: embeds and reranks
src/services/retrieval.py - Hybrid retrieval → PostgreSQL and pgvector: searches chunks
src/services/retrieval.py - SQL endpoint → Text-to-SQL sandbox: executes analytics
- Agent endpoint → Agent orchestrator: starts workflow
- Agent orchestrator → Intent router: routes intent
src/services/agent_orchestrator.py - Agent orchestrator → Grounded RAG: requests policy answers
src/services/agent_orchestrator.py - Agent orchestrator → Text-to-SQL sandbox: requests SQL analysis
src/services/agent_orchestrator.py - Intent router → Gemini and reranking adapters: classifies query
src/services/router.py - Text-to-SQL sandbox → PostgreSQL and pgvector: runs guarded queries
README.md - FastAPI application → Tracing and telemetry: flushes traces
src/main.py - FastAPI application → Ingestion worker: starts worker
src/main.py - Benchmark evaluation → Hybrid retrieval: benchmarks search
README.md - Benchmark evaluation → Grounded RAG: scores answers
README.md - Benchmark evaluation → Text-to-SQL sandbox: checks SQL
README.md