RAG_backend / README.md
ChiragPatankar's picture
Add all RAG backend files - force add
c19c7bf
---
title: ClientSphere RAG Backend
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: docker
sdk_version: "4.0.0"
python_version: "3.11"
app_file: app.py
pinned: false
---
# ClientSphere RAG Backend
FastAPI-based RAG (Retrieval-Augmented Generation) backend for ClientSphere AI customer support platform.
## Features
- πŸ“š Knowledge base management
- πŸ” Semantic search with embeddings
- πŸ’¬ AI-powered chat with citations
- πŸ“Š Confidence scoring
- πŸ”’ Multi-tenant isolation
- πŸ“ˆ Usage tracking and billing
## API Endpoints
- `GET /health/live` - Health check
- `GET /kb/stats` - Knowledge base statistics
- `POST /kb/upload` - Upload documents
- `POST /chat` - Chat with RAG
- `GET /kb/search` - Search knowledge base
## Environment Variables
Required:
- `GEMINI_API_KEY` - Google Gemini API key
- `ENV` - Set to `prod` for production
- `LLM_PROVIDER` - `gemini` or `openai`
Optional:
- `ALLOWED_ORIGINS` - CORS allowed origins (comma-separated)
- `JWT_SECRET` - JWT secret for authentication
## Documentation
See `README_HF_SPACES.md` for deployment details.