A customized RAG system based on LightRAG with enhanced user experience and music-themed branding
RAG-Yaman is a customized version of LightRAG with significant enhancements and improvements:
- Music-Themed Branding: Complete rebrand with music icons and "RAGai" identity
- Custom Logo & Favicon: Personalized branding throughout the application
- Responsive Login Page: Enhanced authentication interface with custom styling
- User Authentication System: Secure login with JWT tokens
- Multi-User Support: Admin and user account management
- Session Management: Configurable token expiration and security settings
- Built-in Text Document Creator: Add documents directly from the UI
- Dialog-Based Interface: User-friendly forms for content creation
- Title & Content Management: Organized document structure with validation
- Python 3.13 Support: Latest Python version compatibility
- Virtual Environment Setup: Isolated development environment
- Enhanced Error Handling: Improved validation and error messages
- Consistent Token Management: Fixed authentication token storage issues
- Music3 Icons: Consistent music-themed iconography
- Cache-Busting: Proper favicon and asset loading
- Responsive Design: Mobile-friendly interface improvements
- Enhanced Navigation: Improved user flow and experience
- Python 3.13 (recommended)
- Node.js (for WebUI development)
- OpenAI API Key or Ollama for local LLM
- Clone the Repository
git clone https://github.com/iammhk/RAGaYaman.git
cd RAGaYaman- Set up Python Environment
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Install dependencies
pip install -e ".[api]"- Configure Environment
# Copy and configure environment file
cp .env.example .env
# Edit .env with your settings- Start the Server
lightrag-serverThe RAG-Yaman interface will be available at http://localhost:9621
- Username:
admin - Password:
admin123
Note: Change these credentials in the .env file for production use
- Custom "RAGai" branding with music note icons
- Consistent emerald color scheme
- Enhanced visual identity throughout the application
- Upload Documents: Support for PDF, DOC, PPT, CSV files
- Create Text Documents: Built-in editor for direct content creation
- Document Processing: Automatic knowledge graph generation
- Batch Operations: Multiple document handling
- Multiple Search Modes: Local, Global, Hybrid, Mix, Naive
- Context-Aware Responses: Conversation history support
- Real-time Results: Fast retrieval with caching
- Interactive Graph: Explore entities and relationships
- Dynamic Layouts: Multiple visualization options
- Node Filtering: Advanced search and filtering capabilities
- JWT Authentication: Secure token-based authentication
- User Management: Multiple user accounts with different permissions
- Session Control: Configurable token expiration
- API Key Protection: Secure API access
Key configuration options in .env:
# Server Configuration
HOST=0.0.0.0
PORT=9621
WEBUI_TITLE='RAGai'
WEBUI_DESCRIPTION="Simple and Fast Graph Based RAG System"
# Authentication (uncomment to enable)
AUTH_ACCOUNTS='admin:admin123,user1:pass456'
TOKEN_SECRET=Your-Key-For-RAG-Yaman-API-Server
TOKEN_EXPIRE_HOURS=48
# LLM Configuration
LLM_MODEL=gpt-4o
LLM_BINDING_HOST=https://api.openai.com/v1
LLM_BINDING_API_KEY=your-openai-api-key
# Embedding Configuration
EMBEDDING_BINDING=ollama
EMBEDDING_MODEL=all-minilm
EMBEDDING_DIM=384
EMBEDDING_BINDING_HOST=http://localhost:11434
# Storage Configuration
RAG_YAMAN_KV_STORAGE=JsonKVStorage
RAG_YAMAN_DOC_STATUS_STORAGE=JsonDocStatusStorage
RAG_YAMAN_GRAPH_STORAGE=NetworkXStorage
RAG_YAMAN_VECTOR_STORAGE=NanoVectorDBStorage
COSINE_THRESHOLD=0.2Use Docker Compose for easy deployment:
# Build and start services
docker-compose up -d --build
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Login to the RAG-Yaman interface
- Navigate to the Documents tab
- Click "Add Document" button (with music note icon)
- Enter title and content in the dialog
- Submit to create and process the document
from lightrag import LightRAG, QueryParam
# Initialize RAG-Yaman
rag = LightRAG(working_dir="./rag_storage")
# Query with different modes
response = await rag.query(
"What are the main themes?",
param=QueryParam(mode="hybrid")
)import requests
# Login
response = requests.post("http://localhost:9621/auth/login",
json={"username": "admin", "password": "admin123"})
token = response.json()["access_token"]
# Use authenticated endpoints
headers = {"Authorization": f"Bearer {token}"}
documents = requests.get("http://localhost:9621/api/documents", headers=headers)cd lightrag_webui
npm install
npm run build# Start backend
lightrag-server
# Start frontend (in another terminal)
cd lightrag_webui
npm run devRAGaYaman/
βββ lightrag/ # Core RAG system
βββ lightrag_webui/ # React-based WebUI
β βββ src/
β β βββ components/ # Reusable components
β β βββ features/ # Feature-specific components
β β βββ api/ # API integration
β β βββ locales/ # Internationalization
βββ data/ # Data storage
β βββ inputs/ # Input documents
β βββ rag_storage/ # Processed data
βββ assets/ # Project assets
βββ docker-compose.yml # Docker configuration
βββ .env # Environment configuration
POST /auth/login- User loginPOST /auth/logout- User logoutGET /auth/status- Check authentication status
GET /api/documents- List documentsPOST /api/documents/upload- Upload documentsPOST /api/documents/text- Create text documentDELETE /api/documents/{id}- Delete document
POST /api/query- Perform RAG queryGET /api/graph- Get knowledge graphPOST /api/extract- Extract entities and relationships
We welcome contributions to RAG-Yaman! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Python PEP 8 style guide
- Add tests for new features
- Update documentation as needed
- Ensure compatibility with Python 3.13
This project is based on LightRAG and maintains the same licensing terms.
- LightRAG Team: For the excellent foundation and core RAG technology
- Original Paper: "LightRAG: Simple and Fast Retrieval-Augmented Generation"
- Community: For feedback and contributions
- GitHub Issues: Report bugs or request features
- Documentation: Check the Wiki for detailed guides
- Email: Contact the maintainer for support