LightRAG: The Dual-Path Retrieval Trick That Beats GraphRAG at 1/40th the Cost
Watch on TikTok
LightRAG is a RAG architecture that does something subtle: instead of one retrieval path, it runs two — a local path that starts from specific entities, and a global path that starts from abstract relationships. The two are mirror images. Combined, they beat Microsoft GraphRAG with an 84% win rate on a 5M-token legal benchmark, cost 1/40th the price, and finish with one API call in under 100 tokens for retrieval.
The Core Insight: Split the Query Into Two Keyword Types
When a query arrives, LightRAG asks an LLM to split it into two kinds of keywords:
| Type | What it is | Example |
|---|---|---|
| Low-level keywords | Specific, concrete terms | "attention mechanism", "BERT" |
| High-level keywords | Abstract themes | "performance improvement", "model comparison" |
These two keyword sets drive two parallel search paths.
The Two Mirrored Paths
Local Path — Entities First, Then Relationships
- Embed the low-level (specific) keywords
- Search the entity database using cosine similarity
- Pick top matching entities
- Walk one hop through the knowledge graph to uncover connected relationships and neighbor entities
Local path discovers: specific things → their connections.
Global Path — Relationships First, Then Entities
- Embed the high-level (abstract) keywords
- Search the relationship database using cosine similarity
- Pick top matching relationships
- Extract the entities sitting at both ends of those relationships
Global path discovers: abstract themes → the specific things involved in them.
The two paths are mirror images. Local starts from entities and finds relationships. Global starts from relationships and finds entities. Together they triangulate the answer from both directions.
Fusion: Round-Robin Merging
The two result sets get combined using round-robin fusion:
- Alternate picks — one from local, one from global, skipping duplicates
- Happens separately for the entity list and the relationship list
Round-robin is the simplest possible fusion, but it's enough because the two paths are designed to contribute different kinds of evidence. Local brings precision; global brings context.
Chunk Retrieval + Re-Ranking
All merged entities and relationships point back to their source text chunks. Those chunk references get pooled into a single candidate list, and an optional re-ranker scores each chunk against the original query. Chunks scoring below a threshold get dropped.
The Final LLM Call
The LLM sees three things:
- Entity descriptions — structured knowledge
- Relationship descriptions — connections between entities
- Re-ranked text chunks — evidence from the source corpus
One API call. Fewer than 100 tokens for retrieval.
Why This Beats GraphRAG
Microsoft GraphRAG uses community clustering at query time and ends up making hundreds of API calls to synthesize a global answer. That's where its cost comes from.
LightRAG skips community clustering entirely. The dual keyword split + mirrored paths gives it comparable recall with far less compute.
| Metric | LightRAG | GraphRAG |
|---|---|---|
| Community clustering at query time | No | Yes |
| API calls per query | 1 | Hundreds |
| Retrieval tokens | < 100 | Thousands |
| Cost ratio | 1× | 40× |
| 5M-token legal benchmark win rate | 84% | 16% |
Key Takeaways
- LightRAG splits each query into low-level (specific) and high-level (abstract) keywords
- Two mirrored search paths run in parallel: local (entities → relationships) and global (relationships → entities)
- Round-robin fusion merges results; an optional re-ranker filters chunks
- One API call, <100 tokens for retrieval, vs. hundreds of calls for GraphRAG
- Beats Microsoft GraphRAG at 1/40th the cost on a 5M-token legal benchmark
Resources
- LightRAG Paper (arXiv) — "LightRAG: Simple and Fast Retrieval-Augmented Generation"
- LightRAG on GitHub — Reference implementation from HKU Data Science Lab
- Microsoft GraphRAG — The heavier alternative being compared against
Published April 16, 2026. Writeup generated from a favorited TikTok.