LightRAG augments LLM answers by indexing documents with graph and vector structures. You run a server with a WebUI and API for ingest, query, and visualization.
Overview
LightRAG is a retrieval-augmented generation system that combines knowledge graphs with vector embeddings so queries can pull both specific facts and broader context. The design targets scalable indexing and retrieval without relying solely on flat chunk search.
A dual-level retrieval approach is described for low-level detail and higher-level conceptual matches. Graph structure is integrated with vector representations to relate entities and relationships, and the framework supports incremental updates and selective document deletion with knowledge graph regeneration.
Deployment options include installing from PyPI, cloning the source tree, or launching via Docker Compose. A WebUI lets you insert documents, run queries, and visualize the knowledge graph, alongside REST API documentation. Storage backends mentioned include local files, PostgreSQL, MongoDB, Neo4J, and OpenSearch, with optional Docker-based setup for embeddings, reranking, and storage.
Document ingestion supports multiple parsers such as native handling, MinerU, and Docling, configurable text chunking strategies, role-specific LLM settings, reranking, citations, and evaluation hooks via RAGAS and tracing via Langfuse according to project news notes.
Key features
- Graph plus vector dual indexing
- Dual-level retrieval queries
- WebUI for ingest and visualization
- REST API and Ollama-compatible routes
- Docker Compose deployment
- Multiple storage backend options
- Configurable document parsers and chunking
- Incremental updates and document deletion
Use cases
- Private document Q&A with citations
- Knowledge bases requiring entity relationships
- Domain corpora with frequent updates
- Self-hosted RAG with graph exploration
- Mixed multimodal document ingestion