Skip to content

Repository files navigation

rag-platform-qwen3

Production-grade, fully self-hosted Agentic AI Platform with RAG, hybrid retrieval, and agent orchestration.

CI Coverage Release License

Architecture API Docs Security Contributing Changelog

Agent Runtime Retrieval System Guardrails Observability Evaluation

Security Report Production Readiness Swagger


Overview

A production-grade, fully self-hosted, open-source Retrieval-Augmented Generation (RAG) platform with agent orchestration. Query private document collections using Qwen3 LLMs without sending data to third-party services.

Core capabilities:

  • Hybrid Retrieval — Dense (Qdrant) + Sparse (BM25) + RRF fusion + reranking
  • Agent Runtime — LangGraph-based multi-step reasoning with tool selection
  • Parent-Child Chunking — 1800/350 token hierarchy with context reconstruction
  • Guardrails — Prompt injection, PII, toxicity, citation verification
  • Evaluation — RAGAS + DeepEval with golden datasets
  • Observability — OpenTelemetry + Langfuse + Prometheus + Grafana

Architecture

User → FastAPI → Guardrails → Agent Runtime → Hybrid Retrieval → Reranking → Context → Generation
                              ├─ Planner (plan → act → observe)
                              ├─ Tool Selection
                              └─ Human-in-the-loop
                                ├─ Dense (Qdrant)
                                └─ Sparse (BM25) → RRF Fusion

See docs/architecture.md for full system architecture.

Quick Start

git clone https://github.com/sam1064max/rag-platform-qwen3.git
cd rag-platform-qwen3

cp .env.example .env

docker compose up -d
docker compose -f docker/vllm/docker-compose.gpu.yml up -d

Deploy Options

Target Method
VPS Docker Compose
Proxmox Docker Compose + LXC
Bare Metal Docker Compose
Kubernetes K8s manifests (planned)

LLM Providers

Provider Type Config
vLLM (self-hosted) Default provider: vllm
OpenAI-compatible API External provider: openai_compat
OpenRouter External provider: openrouter

Documentation

Doc Description
docs/spec.md System specification and requirements
docs/architecture.md Architecture diagrams and design decisions
docs/security.md Threat model and security controls
CONTRIBUTING.md Development setup and contribution guide
CHANGELOG.md Release history
ROADMAP.md Feature roadmap

Development

uv sync --dev
make lint
make typecheck
make test

Release History

See CHANGELOG.md for full release notes.

License

MIT — see LICENSE for details.

About

Production-grade self-hosted RAG platform with Qwen3, Qdrant, vLLM, NeMo Guardrails

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages