GraphRAG without the relationship drama or the LLM bill
LinearRAG builds retrieval graphs without calling an LLM, cutting token costs to zero during construction while keeping multi-hop reasoning intact.

What it does
LinearRAG constructs retrieval graphs from large corpora using lightweight spaCy entity recognition and embedding-based semantic links instead of LLM-extracted relations. The resulting graph supports multi-hop question answering by semantically bridging entities in a single retrieval pass. The project targets the usual GraphRAG bottleneck: the time and token cost of building explicit relational graphs.
The interesting bit
It bets that heavy LLM relation extraction is overkill. By dropping explicit relations and relying on embedding similarity, it claims to achieve linear time and space complexity during construction and zero LLM token spend—while still enabling deep, multi-hop reasoning. That is a direct challenge to the standard GraphRAG pipeline.
Key highlights
- Relation-free construction: uses spaCy NER and embedding similarity rather than LLM-generated edges.
- Zero LLM token consumption during graph indexing; claims linear time and space complexity.
- “Semantic bridging” retrieves multi-hop contexts in a single pass without a typed relation graph.
- Optional GPU-accelerated vectorized retrieval matrix; falls back to CPU BFS if hardware is limited.
- Accepted at ICLR 2026; evaluation datasets are hosted on HuggingFace.
Caveats
- The provided
run.pystill requires an OpenAI API key for the generation stage, so the pipeline is not fully LLM-free. - Medical-domain usage needs a manually installed spaCy model tarball, hinting at brittle dependency paths for niche corpora.
Verdict
Try it if you want GraphRAG at scale without burning LLM tokens on graph construction. Look elsewhere if your use case demands richly structured relationship types or a completely offline, self-contained stack.
Frequently asked
- What is DEEP-PolyU/LinearRAG?
- LinearRAG builds retrieval graphs without calling an LLM, cutting token costs to zero during construction while keeping multi-hop reasoning intact.
- Is LinearRAG open source?
- Yes — DEEP-PolyU/LinearRAG is open source, released under the GPL-3.0 license.
- What language is LinearRAG written in?
- DEEP-PolyU/LinearRAG is primarily written in Python.
- How popular is LinearRAG?
- DEEP-PolyU/LinearRAG has 525 stars on GitHub.
- Where can I find LinearRAG?
- DEEP-PolyU/LinearRAG is on GitHub at https://github.com/DEEP-PolyU/LinearRAG.