LightRAG is a Retrieval-Augmented Generation (RAG) system developed by HKUDS (Hong Kong University Data Science) that will be presented at EMNLP 2025, a major conference in natural language processing. With 22k GitHub stars and under an MIT license, the project aims to simplify and accelerate knowledge extraction and intelligent querying through an innovative approach combining knowledge graphs and vector databases.
Dual-Level Retrieval Architecture
LightRAG's core innovation lies in its "dual-level retrieval" system, which merges two complementary approaches: knowledge graphs to capture structural relationships between entities, and vector databases for semantic search. This hybridization offers six distinct query modes (local, global, hybrid, naive, mix, bypass) that adapt the retrieval strategy to context and specific needs.
Multimodal Support and Multiple Formats
The recent integration with RAG-Anything considerably broadens document-processing capabilities. The system now seamlessly handles text, images, tables, and equations from various formats (PDF, DOC, PPT, CSV). This multimodal approach turns LightRAG into a complete solution for knowledge extraction from heterogeneous enterprise documents.
Storage Flexibility and Scalability
LightRAG supports a modular four-tier storage architecture: KV storage for LLM caching and text chunks (JSON, PostgreSQL, Redis, MongoDB), Vector storage for embeddings (NanoVectorDB, Milvus, Chroma, Faiss, Qdrant, PostgreSQL, MongoDB), Graph storage for the entity-relationship graph (NetworkX, Neo4J, PostgreSQL, AGE), and Document status storage for processing tracking. This flexibility allows choosing the optimal backend based on performance and infrastructure requirements. For high-performance production, Neo4J is recommended as the graph database.
LLM Requirements and Recommendations
The recommended specifications reflect the system's sophistication: an LLM with a minimum of 32 billion parameters and a context length of 32KB (64KB preferred) to optimize entity-relationship extraction. Mainstream multilingual embedding models such as BAAI/bge-m3 and text-embedding-3-large are suggested. The system supports OpenAI (GPT-4o, GPT-4o-mini), Ollama for local models, and Hugging Face.
Advanced Configuration and Customization
LightRAG exposes more than 25 initialization parameters offering granular control: chunk size (default 1200 tokens), entity-extraction loops (default 1), embedding batch size (default 32), LLM cache parameters, and token budgets for entities, relationships, and total context. This configurability allows fine-tuning the performance/cost trade-off.
Advanced Features and Management
The system offers sophisticated capabilities: document deletion by ID, entity deletion by name (maintaining graph/vector consistency), citation support for source attribution, streaming responses, conversational history tracking, and insertion of custom knowledge graphs. The asynchronous architecture (asyncio) ensures performance and scalability.
Deployment and Community
Flexible installation via PyPI (pip install "lightrag-hku[api]"), from source, or via Docker Compose with pre-configured environment files. The active community maintains Discord, WeChat, comprehensive documentation, examples, and tutorial videos. Recent updates (PostgreSQL support, citations, deletions, Neo4J) demonstrate active development.