Skip to main content
RAG & Knowledge BasesLightweight

LightRAG

HKUDS / LightRAG

A lightweight GraphRAG implementation: extract entities and relations, then combine vector and graph retrieval at lower cost than full GraphRAG.

40.8k stars 5788 forks Python Language MIT License Last push 2026-11-19

Why choose it

  • Complete graph construction and retrieval pipeline in a small codebase, easy to modify.
  • Supports incremental updates without rebuilding the whole graph.
  • Multiple retrieval modes and a web UI.

Not for

If plain vector search is enough, a vector database is simpler.
Entity extraction depends on the LLM; noisy graphs need human cleanup.

Minimum setup

  1. Build a graph from 20–50 documents and inspect entities and relations.
  2. Compare plain vector retrieval with graph retrieval on the same question set.
  3. Freeze the extraction model and storage backend before scaling document volume.

Dependencies and cost

Python + LLM API/local model; needs a vector store and graph storage; graph construction cost grows with documents.

License and usage boundaries

Code is MIT; models and data carry their own licenses.

Open source is not automatically commercial-use friendly: GPL / AGPL are copyleft; code, model and output licenses are separate. Read the LICENSE and model card before launch, and involve legal when needed.

Alternatives and neighbors

  • RAGFlow — Start here,A RAG platform with document parsing, chunking, retrieval and citations, built to get a knowledge base running.
  • LlamaIndex — Production,A data framework for RAG and application layers: connectors, indexes, retrieval, query engines and agents.

Next steps

  • Open GitHub and read the README, LICENSE, latest release and issues first.
  • Make an onboarding checklist for deployment dependencies, VRAM, data, network and permissions.
  • Run a small sample first, then decide on production; never start with production data.

GitHub repository ↗ Docs ↗ Add to compare

Snapshot: stars / forks / language / license / pushed_at come from the GitHub API snapshot on 2026-11-20; later changes are not written back. Tags and “fit / not fit” are editorial judgments, not GitHub metadata.
No endorsement: this site only indexes and flags risks; it does not audit code, guarantee security or make license decisions for you. Review repository scripts and model weights yourself.