A powerful, modular RAG (Retrieval-Augmented Generation) system with semantic caching, hybrid search, and multi-hop reasoning.
- What is Support RAG?
- Key Features
- Quick Start
- Installation
- Usage
- Documentation
- Project Structure
- FAQ
- Contributing
- License
- Support
Support RAG is an advanced open-source RAG system designed for high-performance automated customer support and knowledge retrieval. It goes beyond simple semantic search by integrating semantic caching, hybrid search (lexical + vector), and a modular pipeline architecture with 29+ specialized nodes.
It is built to handle complex queries, manage conversation state, and provide accurate, context-aware responses with citations.
- 🚀 Modular Pipeline Architecture: 29+ specialized nodes for flexible query processing
- 🧠 Semantic Caching: Caches responses based on semantic similarity to reduce latency and costs
- 🔍 Hybrid Search: Combines Dense Retrieval (Vector) and Sparse Retrieval (BM25/Lexical) for best accuracy
- 🔄 Multi-hop Reasoning: Breaks down complex user queries into sub-questions
- 🛡️ Guardrails: Input and output validation to ensure safety and quality
- 💬 Conversation Management: Handles context and history for natural multi-turn dialogue
- 🔌 Webhooks & API: Real-time event notifications and comprehensive REST API
Get up and running in minutes using Docker Compose.
-
Clone the repository
git clone https://github.com/letya999/support_rag.git cd support_rag -
Configure Environment
cp .env.example .env # Edit .env with your API keys (OpenAI, etc.) -
Start Services
docker-compose up -d
-
Ingest Data (Optional initial setup)
docker-compose exec app python scripts/ingest.py --file datasets/qa_data.json -
Test API
curl -X POST http://localhost:8000/api/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"messages": [{"role": "user", "content": "How do I return an item?"}]}'
- Docker & Docker Compose
- Python 3.9+ (for local development)
- PostgreSQL
- Redis
For those who want to contribute or run without Docker:
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations and start the server:
python scripts/run_migrations.py uvicorn app.main:app --reload
See DEVELOPMENT.md for detailed instructions.
The system provides a comprehensive API for chat completions and RAG queries.
Example Request:
POST /api/v1/chat/completions
{
"messages": [
{"role": "user", "content": "Tell me about shipping policies."}
],
"temperature": 0.7
}A Telegram bot integration is included. Configure your TELEGRAM_BOT_TOKEN in .env and start the bot container.
- Development Guide: Setup, testing, and contribution guide.
- Architecture: Deep dive into the system design, nodes, and data flow.
- API Documentation: Detailed API reference.
- Database Schema: Database structure and tables.
support_rag/
├── app/ # Main application code
│ ├── api/ # API endpoints
│ ├── core/ # Config and core logic
│ ├── nodes/ # Pipeline nodes (processing logic)
│ └── services/ # Business logic services
├── datasets/ # Example datasets
├── docs/ # Documentation
├── scripts/ # Utility and setup scripts
├── tests/ # Test suite
├── docker-compose.yml # Docker services config
└── requirements.txt # Python dependencies
Q: Can I use my own LLM?
A: Yes, the system handles OpenAI-compatible APIs. Configure the base URL and API key in .env.
Q: How does caching work? A: We use Redis for semantic caching. Similar queries are matched using vector embeddings to return cached responses instantly.
We welcome contributions! Please see our CONTRIBUTING.md for details on how to submit pull requests, report issues, and setup your development environment.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or run into issues, please open an issue on GitHub.