LightRAG
Lightweight graph-based RAG framework — builds a knowledge graph from documents (HKU research, Findings of EMNLP 2025)
LightRAG takes a different approach from plain vector RAG: it uses an LLM to extract entities and the relationships between them from documents, builds a knowledge graph, and combines graph traversal with vector retrieval at local and global levels when answering. It comes from research at the University of Hong Kong; the paper, published in Findings of EMNLP 2025, reports better results than several baseline RAG methods. Use it as a Python library or run LightRAG Server, which provides a REST API and a web UI for managing documents and querying the graph. Storage is pluggable: in-memory defaults for testing, and PostgreSQL (recommended for production), Neo4j, Memgraph, MongoDB, OpenSearch, Milvus or Qdrant for real workloads. Practical applications: knowledge management, research Q&A that depends on relationships between concepts, or any problem where 'who is related to what' matters more than 'which chunks are similar'. Works well with: Ollama (local LLM) · PostgreSQL/pgvector (production storage) · Neo4j (graph storage) · LlamaIndex (see Agent Frameworks)
When to use
- You need graph-based RAG with a knowledge graph built automatically from documents
- You want a lightweight engine you can embed in Python or call over a REST API
- You are comparing graph RAG with vector RAG in research or a prototype
When not to use
- You need a full team platform with an app builder, user management and monitoring
- Your team is not ready to tune entity extraction and knowledge-graph quality
- You need low indexing cost — building the graph calls the LLM for every document
At a glance
- Pricing
- Free
- Deployment
- Self-hosted
- Difficulty
- Intermediate
- License
- MIT
- Languages
- python
- Use cases
- rag pipeline, knowledge graph, research, document qa
- Last verified
- 2026-10-22 (official documentation)
Works well with
Alternatives in this category
See all 4 tools in RAG Systems — Retrieval-Augmented Generation →