This is the RAG (Retrieval-Augmented Generation) backend service for the chat application. It provides APIs for document processing, search, and chat functionality using FAISS for vector similarity search and Sentence Transformers for text embeddings.
- Python 3.8 or higher
- NVIDIA GPU with CUDA support (optional, for faster processing)
- Sufficient disk space for document storage and vector indices
For Unix/macOS:
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtFor Windows:
# Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtThe service can be configured through the configuration files:
src/config/app_config.yamlsrc/config/rag_config.yaml
For Unix/macOS:
# Make sure you're in the backend-rag directory
cd backend-rag
# Activate the virtual environment if not already activated
source venv/bin/activate
# Start the server
python src/app.pyFor Windows:
# Make sure you're in the backend-rag directory
cd backend-rag
# Activate the virtual environment if not already activated
.\venv\Scripts\activate
# Start the server
python src\app.pyThis service implements a RAG (Retrieval-Augmented Generation) system that:
- Processes and chunks documents
- Generates embeddings
- Stores vectors in a FAISS index
- Provides semantic search capabilities