# LightRAG

> Simple and Fast Retrieval-Augmented Generation

Source: https://talira.ai/catalog/lightrag-g5860qaa
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Web app, API
- Categories: [ai / rag / graph rag](https://talira.ai/categories/ai/rag/graph-rag), [ai / knowledge graphs](https://talira.ai/categories/ai/knowledge-graphs)
- Platforms: docker[^1]
- Licence: MIT[^2][^3]
- Pricing: Free and open source[^2]
- Pricing notes: Free under MIT; you pay for the LLM calls (one extraction call per chunk at indexing) and the storage you run.
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- API: yes[^1][^4]
- Backed by: [Data Intelligence Lab@HKU](https://talira.ai/orgs/hkuds.md)

LightRAG is an MIT-licensed graph RAG framework from the Data Intelligence Lab at the University of Hong Kong (EMNLP 2025) that indexes documents into both a knowledge graph of entities and relations and vector embeddings, and answers with dual-level retrieval in five query modes (local, global, hybrid, naive and the default mix). Its makers present it as a lighter alternative to Microsoft [GraphRAG](https://talira.ai/catalog/graphrag-gz2tx1a5.md): it skips community reports, which they say cuts the LLM calls needed for indexing and querying, but it still runs one LLM extraction call per text chunk, so indexing isn't LLM-free. Documents can be added incrementally and deleted selectively, rebuilding affected entities from the extraction cache. It runs as a Python library or as LightRAG Server, with a web UI for documents, graph exploration and queries, a REST API and an [Ollama](https://talira.ai/catalog/ollama-gr2tx5nn.md)-compatible chat API for clients such as [Open WebUI](https://talira.ai/catalog/open-webui-r0dc4yjj.md), on storage from in-memory files to [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md), [MongoDB](https://talira.ai/catalog/mongodb-bnayk648.md), [OpenSearch](https://talira.ai/catalog/opensearch-s3zfhw7f.md), [Neo4j](https://talira.ai/catalog/neo4j-76zxhxgj.md), Memgraph, Milvus or [Qdrant](https://talira.ai/catalog/qdrant-fte3azxr.md), and parses PDFs, Office files, images and tables through [MinerU](https://talira.ai/catalog/mineru-c1we7pv6.md), [Docling](https://talira.ai/catalog/docling-7gb20naa.md) or its own parser.

## Links

- GitHub: https://github.com/HKUDS/LightRAG
- Docs: https://github.com/HKUDS/LightRAG/tree/main/docs

## Problems it solves

- graph-based RAG over our documents without generating community summary reports for every cluster
- add new documents to a knowledge graph index incrementally instead of re-indexing the whole corpus
- delete one document from a graph RAG index and have its entities and relations cleaned up
- answer both detail questions about one entity and broad cross-document questions from the same index
- self-hosted RAG server with a web UI to upload documents, browse the extracted graph and ask questions
- use a cheap non-reasoning model for entity extraction and a stronger one only for writing answers
- plug a graph RAG knowledge base into Open WebUI as if it were an Ollama model
- run entity extraction, embeddings and reranking locally with Qwen, bge-m3 and bge-reranker on our own GPUs
- store the graph, vectors and documents for a RAG system in one PostgreSQL database
- RAG over manuals and papers where images, tables and formulas need to be connected to the text
- keep separate isolated knowledge bases for different teams on one RAG server
- evaluate graph RAG answers with RAGAS and trace queries in Langfuse

## Features

- dual-level retrieval over a knowledge graph and vector embeddings
- query modes: local, global, hybrid, naive and mix (default), with optional reranking
- no community reports: fewer LLM calls than GraphRAG at index and query time, per its README
- incremental inserts and selective deletion, rebuilding affected entities from the LLM cache
- role-specific models: extraction, query, keyword and vision LLMs configured separately
- LightRAG Server: web UI (admin console and query-only workspace), REST API and Ollama-compatible chat API
- storage: JSON/NanoVectorDB/NetworkX/Faiss files, PostgreSQL, MongoDB, OpenSearch, Redis, Neo4j, Memgraph, Milvus, Qdrant
- document parsing with MinerU, Docling or the native parser; images, tables and formulas linked into the graph
- workspaces for isolated knowledge bases
- authentication with API keys or accounts
- RAGAS evaluation and Langfuse tracing
- setup wizard and Docker Compose for local embedding, reranking and storage services

## Limitations

- Doesn't build its knowledge graph without an LLM: entity and relation extraction makes one LLM call per text chunk[^1]
- Doesn't suit production on its default storage: the in-memory JSON, NanoVectorDB and NetworkX stores are for testing only[^1]
- Doesn't secure its server by default: lightrag-server listens on all interfaces with authentication off[^1]

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.32 out of 1.
Signals: backing 0.30, extensibility 0.20.

- backed by Data Intelligence Lab@HKU

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [GraphRAG](https://talira.ai/catalog/graphrag-gz2tx1a5.md): A modular graph-based Retrieval-Augmented Generation (RAG) system
- [R2R](https://talira.ai/catalog/r2r-c9xgnnbh.md): Agentic Retrieval-Augmented Generation (RAG) with a RESTful API
- [Graphiti](https://talira.ai/catalog/graphiti-vdxr6q7w.md): Build real-time knowledge graphs for AI agents
- [Cognee](https://talira.ai/catalog/cognee-en632qdm.md): The open-source AI memory platform for agents
- [LlamaIndex](https://talira.ai/catalog/llamaindex-qn17jtyq.md): A Python toolkit for building LLM-powered agents over your data

## Sources

[^1]: https://github.com/HKUDS/LightRAG/blob/main/README.md (checked 20 Nov 2026)
[^2]: https://github.com/HKUDS/LightRAG/blob/main/LICENSE (checked 20 Nov 2026)
[^3]: https://pypi.org/project/lightrag-hku/ (checked 20 Nov 2026)
[^4]: https://github.com/HKUDS/LightRAG/blob/main/docs/LightRAG-API-Server.md (checked 20 Nov 2026)
