LightRAG

Lightweight RAG framework that combines knowledge graphs with vector retrieval for dual-level queries.

Open SourceSelf HostedOffline Capable
0.0 (0)

About

Combining a knowledge graph with vector embeddings, LightRAG answers queries through dual-level retrieval: a local mode that follows entity relationships for specific questions and a global mode that reasons over higher-level themes, with hybrid, naive, and mix strategies rounding out five query modes. The framework from HKU's data intelligence lab positions itself as a lighter, cheaper alternative to Microsoft's GraphRAG, and the approach is documented in an EMNLP 2025 paper. Documents index incrementally without rebuilding the graph, parse through MinerU, Docling, or a native pipeline, and persist across storage backends including PostgreSQL, Neo4j, MongoDB, Milvus, Qdrant, and OpenSearch, with multimodal support for tables, formulas, and images. The lightrag-hku package installs from PyPI on Python 3.10 or newer, and the repository ships a REST API server with a web UI plus Docker Compose deployment. It pairs with OpenAI-compatible APIs or local models through Ollama, carries an MIT license, and has passed 38,000 GitHub stars, making it one of the most adopted open RAG frameworks.

Should you use LightRAG?

Pick it when

Pick this when you want graph-enhanced RAG over a document set that keeps growing, since it indexes incrementally, and you want a ready REST server, web UI, and Docker Compose deploy that can run on local models via Ollama.

Look elsewhere when

If you need to know what changed over time or want per-user agent memory, Graphiti fits better. If your questions are mostly corpus-wide themes and you can afford heavy indexing, GraphRAG's community summaries remain the reference approach.

Alternatives to LightRAG

  • GraphRAG

    Reference implementation with hierarchical community summaries for corpus-wide questions; costlier LLM-heavy indexing and an OpenAI or Azure default path.

  • Graphiti

    Temporal graph that records when facts became true or were superseded, built for agent memory; less aimed at bulk document question answering.

  • RAGFlow

    Stronger on parsing messy PDFs and spreadsheets with chunk previews and citations; self-hosts via Docker rather than a pip package you embed in code.

  • Cognee

    Also pairs a knowledge graph with vectors and plugs into CrewAI, LangGraph, and MCP clients; aimed at durable agent memory more than document Q&A.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!