DevRAG is a highly-scalable, multi-tenant Retrieval-Augmented Generation (RAG) platform. It seamlessly combines a high-concurrency Go API Gateway with a Python-based Machine Learning Engine to handle document ingestion, layout recognition, vector search, and LLM orchestration at scale.
- Robust Multi-Tenancy: Complete logical isolation for multiple tenants across all services, databases, vector stores, and object stores.
- Tenant-Owned AI Configuration: Tenants can securely configure and supply their own LLM and Embedding API keys (OpenAI, Anthropic, Gemini, DeepSeek, etc.) via the TenantLLM service.
- Advanced Document Parsing (deepdoc): Built-in support for PDFs, TXT, and Markdown files, leveraging PyMuPDF, OCR (PaddleOCR), and YOLOv8-based layout recognition for complex documents.
- Flexible Chunking Strategies: Supports customizable parsing methods configured at the Dataset level (e.g., General Text Chunking, automated Q&A Generation chunking) to optimize retrieval.
- Hybrid Search Engine: Powered by Infinity, combining Dense Vector search and Keyword/Sparse search (BM25) with cross-encoder reranking.
- High Concurrency: Separation of the ML Python workers and the Go Gateway ensures high availability and fast I/O bound routing.
The system is split into two primary backend services for strict boundary isolation, accompanied by a modern React frontend.
- Go API Gateway (
/internal,/cmd):- Handles REST & WebSocket endpoints, routing, authentication, RBAC, tenant isolation, and MySQL database management.
- Python ML Engine (
/api,/rag,/deepdoc):- Responsible for heavy machine learning workloads, including YOLOv8 vision parsing, semantic chunking, embeddings, hybrid search, and LLM orchestration.
- React Frontend (
/web):- A Tailwind CSS + React Query Single Page Application (SPA).
/api- Python API and ML background workers/cmd- Go application entrypoints/internal- Go business logic (Handlers, Services, DAOs)/web- React frontend application/rag- Vector stores, NLP chunking, and LLM orchestration/deepdoc- Document parsing, OCR, and vision models/docker- Dockerfiles and local compose environments/helm- Kubernetes production deployments/tests- Playwright E2E and Go/Python integration tests
- Docker & Docker Compose
- Go 1.22+
- Python 3.10+
- Node.js 18+
docker-compose -f docker/docker-compose-base.yml up -d(Starts MySQL, Redis, MinIO, and Infinity)
go run cmd/server/ragflow_server.go -c conf/service_conf.yamlsource venv/bin/activate
export PYTHONPATH=.
python api/ragflow_server.pycd web
npm install
npm run devThe frontend will be accessible at http://localhost:5173.
Please ensure you run all tests before submitting PRs, maintaining strict tenant boundaries, and following the architecture guidelines where Python handles ML workloads and Go handles high-concurrency infrastructure.