Retrieval Pipeline
User Query → Auth API (optional) → Vector Search (FAISS/ChromaDB/External) → Context API (reranking) → LLM Inference → Response
The pipeline is fully pluggable: each stage can be configured independently via the RAG configuration hub.
Supported Providers
| Provider | Type | Description |
| FAISS | Local | Facebook AI Similarity Search — fast in-memory vector retrieval |
| CHROMADB | Local | ChromaDB — persistent vector storage with metadata filtering |
| EXTERNAL_API | Remote | External RAG API provider for enterprise deployments |
Core Services
| Service | Key Class | Responsibility |
rag_service.py | RAGService | Unified retrieval API across all providers |
rag_access_service.py | RAGAccessService | Per-user access control for collections |
rag_environment.py | get_rag_env() | RAG virtual environment lifecycle |
rag_environment_manager.py | RAGEnvironmentManager | Package installation and readiness |
rag_cluster_manager.py | RAGClusterManager | Distributed cluster orchestration |
rag_cluster_environment.py | get_rag_cluster_env() | Cluster environment management |
rag_worker.py | RAG worker | Background processing for sync and indexing |
rag_providers/ | Provider implementations | FAISS, ChromaDB, External API backends |
RAG Sub-Routes (all under /rag)
The most comprehensive service in the platform with 30+ route modules:
| Sub-route | Purpose |
overview_pages | Phased overview (A=setup, B=packages, C=databases list) |
collection_pages | Collection CRUD, detail view, document listing |
config_hub | Configuration hub for providers, embeddings, retrieval, pipeline |
config_provider | Provider selection (FAISS/ChromaDB/External) |
config_embedding | Embedding model configuration |
config_retrieval | Retrieval strategy configuration |
config_pipeline | Pipeline orchestration configuration |
chunk_templates | Chunking strategy templates (medical, legal, financial, etc.) |
collections | Collection lifecycle management |
documents | Document upload, indexing, deletion |
sync_jobs | Sync job scheduling and history |
analytics | Usage metrics and analytics |
evaluation | RAG quality testing and validation |
Distributed RAG Clustering
Topologies
| Mode | Description |
STANDALONE | Single-node RAG instance |
BACKUP | Read-only replica for high availability |
LOAD_DISTRIBUTION | Multi-node query load balancing |
Cluster Routes
| Blueprint | URL Prefix | Purpose |
rag_cluster | /rag-cluster | Cluster management overview |
rag_cluster_discovery | /api/rag/cluster/discovery | Multi-host discovery |
rag_cluster_network | /api/rag/cluster/sync | Inter-host network communication |
rag_cluster_sync_mgmt | /api/rag/cluster/sync-mgmt | Sync management and monitoring |
rag_cluster_health | /api/rag/cluster/health | Health monitoring and alerts |
rag_cluster_admin | /admin/rag/cluster | Failover controls, demotion, conflict resolution |
Resilience Features
- Network Partition Handling — Majority-wins resolution strategy
- Health Monitoring — CPU, memory, and query performance metrics per node
- Sync Tracking — DistributedSyncLog and ClusterInstanceSyncLog
- Document Conflict Resolution — Majority-wins, manual, timestamp-based strategies
Graph Extraction
RAG supports knowledge graph extraction from documents with community detection:
- Entities & Relationships — Automatic extraction from text
- Text Unit Linking — Entities linked to source text units
- Community Detection — Group-related entities and generate reports
- Graph Profiles — Configurable extraction profiles for different domains