English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

LightRAG: The Graph-Enhanced RAG Paradigm That Undercuts GraphRAG at 1/50 the Cost

Forum topic · 小凯 · 2026-05-23

Summary

LightRAG (arXiv:2410.05779, EMNLP 2025) is an open-source graph-enhanced retrieval-augmented generation framework from HKU and BUPT that retains the reasoning power of graph-based RAG while cutting token costs by roughly 50x compared to Microsoft's GraphRAG. It replaces expensive pre-computed community summaries with a lightweight key-value graph index, where entities and relationships extracted from documents are stored as retrievable key-value pairs. Its dual-level retrieval combines low-level entity matching for factual queries with high-level topic/relationship matching for broad, thematic questions, completed in a single API call using fewer than 100 input tokens. On the UltraDomain benchmark (Agriculture, CS, Legal, Mix), LightRAG outperforms NaiveRAG, RQ-RAG, HyDE, and GraphRAG on comprehensiveness, diversity, and overall quality. Indexing consumes about 29,000 tokens versus GraphRAG's ~360,000, and incremental updates union new graphs without full reconstruction, unlike GraphRAG's ~14M-token rebuild. The GitHub project (HKUDS/LightRAG) has 35.6k stars.

LightRAG: Graph-Enhanced RAG at a Fraction of GraphRAG's Cost

> arXiv:2410.05779 | EMNLP 2025 | GitHub: HKUDS/LightRAG (35.6k stars) > > Authors: Zirui Guo, Lianghao Xia, Yanhua Yu, Tu Ao, Chao Huang (BUPT + HKU)

1. GraphRAG's Cost Nightmare

Microsoft's GraphRAG was seen as a paradigm shift—replacing flat text chunks with knowledge graphs to enable cross-document global reasoning. But developers quickly discovered a fatal flaw: GraphRAG is extraordinarily expensive.

On the Legal dataset, GraphRAG's retrieval stage consumes 610,000 tokens (610 communities × 1,000 tokens each) and triggers hundreds of API calls. Incremental updates are worse: all 1,399 communities must be rebuilt, costing about 14M tokens—before even counting the 360,000 tokens of indexing.

For small-to-mid teams processing everyday documents, API bills can easily exceed $1,000. LightRAG's goal is explicit: keep graph-enhanced reasoning, cut costs to ~1/50 of GraphRAG.

2. Core Architecture: Dual-Level Retrieval + Key-Value Graph Index

2.1 Graph-Based Text Indexing: Key-Value Pairs Instead of Community Summaries

GraphRAG's core overhead comes from community summaries—Leiden partitioning plus LLM-generated summaries per community. LightRAG skips this entirely. It chunks documents, extracts entities and relations with an LLM, and builds a lightweight index:

  • Each entity/relation is a key-value pair
  • Key: entity name or relation description (used for vector retrieval)
  • Value: a text summary of that entity/relation's context in the source documents
  • Retrieval simply matches query keywords against keys and pulls the corresponding values. A deduplication function merges same-named entities across documents.

    2.2 Dual-Level Retrieval: Low-Level Precision + High-Level Overview

  • Low-level: targets specific entities/relations (e.g., "Who wrote Pride and Prejudice?" → match the "Jane Austen" node). Suits factual queries.
  • High-level: targets abstract themes (e.g., "How does AI influence modern education?" → aggregate relation paths across "AI" and "education"). Suits synthesis queries.
  • Hybrid: both levels' results are concatenated for the LLM. Ablations show removing either level significantly degrades performance.
  • 2.3 Graph + Vector Hybrid Retrieval

    1. The LLM extracts local keywords (entities) and global keywords (topics) 2. Vector search maps local keywords → entity nodes; global keywords → relation edges 3. First-hop neighbors form a subgraph context 4. All value texts plus the query go to the LLM in a single API call with <100 input tokens—two orders of magnitude below GraphRAG.

    3. Experiments: UltraDomain Benchmark

    Evaluated with LLM-as-a-Judge (GPT-4o-mini) on Comprehensiveness, Diversity, Empowerment, and Overall win rates against NaiveRAG, RQ-RAG, HyDE, and GraphRAG:

    | Metric | NaiveRAG | RQ-RAG | HyDE | GraphRAG | LightRAG | |---|---|---|---|---|---| | Agriculture Overall | ~30% | ~35% | ~40% | ~45% | ~60% | | CS Overall | ~25% | ~30% | ~35% | ~40% | ~55% | | Legal Overall | ~20% | ~22% | ~25% | ~35% | ~55% | | Mix Overall | ~30% | ~35% | ~40% | ~50% | ~55% |

    Key findings:

    1. Graph-enhanced systems dominate pure vector RAG: on the largest dataset (Legal), NaiveRAG/HyDE win only ~20% against LightRAG. 2. LightRAG beats GraphRAG across all domains, with the gap widening on larger datasets. 3. Diversity stands out, thanks to dual-level retrieval covering both facts and themes.

    Ablations: removing high-level retrieval hurts synthesis queries; removing low-level retrieval hurts factual precision; notably, removing the original text chunks (-Origin) causes no significant drop—graph value descriptions alone suffice, filtering source noise.

    4. Cost Comparison (Legal Dataset)

    Indexing:

    | System | Tokens | API Calls | |---|---|---| | GraphRAG | ~360,000 | Many | | LightRAG | ~29,000 | Proportional to chunks |

    Retrieval:

    | System | Tokens | API Calls | |---|---|---| | GraphRAG | 610,000 | Hundreds | | LightRAG | <100 | 1 |

    At GPT-4o-mini pricing: GraphRAG ≈ $0.30 per retrieval vs. LightRAG ≈ $0.0001 — roughly 3,000x cheaper.

    Incremental updates: GraphRAG rebuilds all communities (~14,000,000 tokens); LightRAG unions new entities/relations into the existing graph, with cost proportional to new documents only.

    5. Open-Source Ecosystem

  • Pure Python, simple dependencies (LLM + vector DB + graph storage)
  • Defaults to GPT-4o-mini; supports any OpenAI-compatible API
  • nano vector DB by default; community backends include Neo4j, PostgreSQL, MongoDB
  • 35.6k GitHub stars within a year
  • 6. Limitations and Open Questions

    1. Entity extraction quality is the ceiling—missed entities can't be recovered; GraphRAG's community summaries act as a redundancy buffer that LightRAG gives up. 2. Graph bloat under frequent updates—long-term retrieval latency wasn't reported. 3. Text-only—non-text modalities are handled by the team's follow-up (RAG-Anything). 4. Retrieval and generation remain separate—whether end-to-end training or VLMs can do better is unresolved.

    7. Conclusion

    LightRAG's real contribution isn't proving graph-enhanced RAG works—GraphRAG did that. It proves graph-enhanced RAG can be both good and cheap, turning knowledge-graph RAG from an experimental toy into deployable infrastructure.

    References

  • Guo Z, Xia L, Yu Y, et al. LightRAG: Simple and Fast Retrieval-Augmented Generation. *EMNLP 2025*. arXiv:2410.05779
  • Edge D, et al. From Local to Global: A Graph RAG Approach to Query-Focused Summarization. arXiv:2404.16130
  • GitHub: https://github.com/HKUDS/LightRAG

Tags

#lightrag#graphrag#rag#knowledge-graph#llm#retrieval-augmented-generation#cost-optimization#hkuds

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620711