Skip to content
aicoolies logo
LightRAG logo

LightRAG

Knowledge graph-powered RAG framework from HKU

LightRAG is a research-backed RAG framework from Hong Kong University that combines knowledge graph structures with vector search for more contextual retrieval. Published at EMNLP 2025, it extracts entities and relationships from documents to build a structured knowledge graph, then uses dual-level retrieval across both graph and vector representations with five query modes: naive, local, global, hybrid, and mix.

About LightRAG

LightRAG is a retrieval-augmented generation framework from HKU Data Science that combines knowledge-graph structures with vector retrieval. Published around the EMNLP 2025 paper with roughly 36K+ GitHub stars at write time, it addresses a core limitation of ordinary RAG systems: flat vector chunks often miss the relationships between entities, systems, people, and concepts.

The framework extracts entities and relationships from documents, stores them alongside vector representations, and supports multiple retrieval modes for local graph traversal, global graph context, hybrid retrieval, and broader mixed strategies. It also supports incremental updates so new documents can be added without rebuilding an entire knowledge graph, which is important for living knowledge bases.

LightRAG is MIT licensed and works with a broad set of storage backends including PostgreSQL, MongoDB, Neo4j, Milvus, Qdrant, ChromaDB, Faiss, and related options. The ecosystem includes RAG-Anything for multimodal documents, tables, formulas, and images. Extraction quality depends on the selected LLM and corpus complexity, so production teams should validate graph quality instead of assuming a fixed model-size rule.

Pricing & Platform Specs

Pricing Summary

100% free and open-source under the MIT license ($0 software license fee, 15k+★ on GitHub, pip install lightrag-hku). Developed by HKUDS (University of Hong Kong), LightRAG is a fast, dual-level Graph RAG framework combining low-level entity extraction with high-level conceptual summaries. Features 5 query modes (naive, local, global, hybrid, mix) and dynamic incremental updates without full graph rebuilds. Users incur $0 software licensing fees, paying only for their underlying LLM tokens and vector/graph storage infrastructure (e.g., OpenAI, Anthropic, Ollama, Neo4j, Milvus, NanoVectorDB).

full pricing breakdown →

Supported Platforms

Python package via pip or uv. Docker and Kubernetes deployment. Web UI included. Works with any LLM provider.

Explore categories, tags & use cases

Framework for LLM applications

The most widely-used framework for building LLM-powered applications, available in Python and JavaScript. Provides abstractions for chains, agents, RAG, memory, tool usage, and structured output. Integrates with 100+ LLM providers, vector stores, document loaders, and tools. LangSmith offers tracing and evaluation. LangGraph enables stateful, multi-agent workflows with cycles. 100K+ GitHub stars. The de facto standard for LLM application development despite growing alternatives like LlamaIndex.

freemiumOpen Source

Data framework for LLM applications

Leading Python framework for building LLM-powered applications with focus on data-aware and agentic workflows. Provides tools for RAG (Retrieval-Augmented Generation), document indexing, vector store integrations, query engines, and multi-agent orchestration. 150+ data connectors for various sources. Works with OpenAI, Anthropic, local models, and more. Includes LlamaHub for community tools and LlamaCloud for managed RAG pipelines. 50K+ GitHub stars.

freemiumOpen Source

Deep document understanding RAG engine

RAGFlow is an open-source RAG engine with 76K+ GitHub stars that provides deep document understanding for building knowledge-based AI applications. Optimizes chunking for 20+ document types including PDFs, Word docs, presentations, and images using layout-aware parsing. Features template-based chunking strategies, citation with source references, multi-recall retrieval combining keyword and semantic search, and a visual knowledge base management interface with drag-and-drop document upload.

freemiumOpen Source

Side-by-Side Comparisons

LightRAG logo
LightRAG
vs
LangChain logo
LangChain

LightRAG vs LangChain — Lightweight RAG Framework vs Comprehensive LLM Application Platform

LightRAG provides a focused graph-enhanced retrieval-augmented generation framework that combines knowledge graphs with vector search for improved context retrieval. LangChain offers a comprehensive platform for building LLM applications with chains, agents, memory, and extensive integrations. LightRAG wins for specialized RAG workflows while LangChain wins as a general-purpose LLM framework.

LightRAGLangChain
LightRAG logo
LightRAG
vs
RAGFlow logo
RAGFlow

LightRAG vs RAGFlow — Knowledge Graph RAG vs Enterprise Document Intelligence

LightRAG and RAGFlow both enhance retrieval-augmented generation beyond basic vector search, but their approaches target different users. LightRAG builds knowledge graphs from documents for relationship-aware retrieval and is aimed at developers. RAGFlow focuses on enterprise document intelligence with visual chunking, template-based extraction, and a no-code interface for business teams.

LightRAGRAGFlow

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is LightRAG?

LightRAG is a research-backed RAG framework from Hong Kong University that combines knowledge graph structures with vector search for more contextual retrieval. Published at EMNLP 2025, it extracts entities and relationships from documents to build a structured knowledge graph, then uses dual-level retrieval across both graph and vector representations with five query modes: naive, local, global, hybrid, and mix.

Is LightRAG free?

Yes — LightRAG is open source and free to use. 100% free and open-source under the MIT license ($0 software license fee, 15k+★ on GitHub, pip install lightrag-hku). Developed by HKUDS (University of Hong Kong), LightRAG is a fast, dual-level Graph RAG framework combining low-level entity extraction with high-level conceptual summaries. Features 5 query modes (naive, local, global, hybrid, mix) and dynamic incremental updates without full graph rebuilds. Users incur $0 software licensing fees, paying only for their underlying LLM tokens and vector/graph storage infrastructure (e.g., OpenAI, Anthropic, Ollama, Neo4j, Milvus, NanoVectorDB).

Is LightRAG open source?

Yes — LightRAG is open source.

Is LightRAG still maintained?

Yes — LightRAG is active. Its listing was last verified on September 6, 2026.

What are the best LightRAG alternatives?

The first editor-selected LightRAG alternatives are LangChain, LlamaIndex, RAGFlow.

How does LightRAG score in our review?

The published editorial review lists LightRAG at 83/100 overall across speed, privacy, and developer experience. Check the review's evidence status and test metadata for its verification level.