TERAG: Token-Efficient Graph-Based Retrieval-Augmented Generation

Qiao Xiao, Hong Ting Tsang, Jiaxin BaiarXiv 2025 · DOI

Abstract

Retrieval-Augmented Generation (RAG) is essential for grounding Large Language Models (LLMs) in external facts. However, existing Graph-RAG methods incur significant "token taxes" due to complex LLM-driven graph construction. We introduce TERAG (Token-Efficient Graph-Based RAG), a framework that reduces output token consumption by up to 97% while maintaining over 80% of the accuracy of state-of-the-art methods. TERAG achieves this through lightweight concept extraction and Personalized PageRank (PPR) for efficient retrieval.

Introduction

Retrieval-Augmented Generation (RAG) has become the standard for providing LLMs with external context. While "Naive RAG" uses vector similarity for retrieval, "Graph-RAG" has emerged as a superior method for multi-hop reasoning. Despite its benefits, Graph-RAG is often prohibitively expensive; indexing 5GB of documents can cost upwards of $33,000 due to multiple rounds of LLM calls for entity and relationship extraction.

TERAG aims to bridge this gap by prioritizing token efficiency. By replacing complex relationship modeling with lightweight concept extraction and traditional graph algorithms, TERAG makes graph-based RAG affordable for large-scale applications.

Methodology

TERAG simplifies the graph construction and retrieval process to minimize the generation of expensive output tokens.

The TERAG pipeline for token-efficient knowledge graph construction.

Lightweight Concept Extraction

Instead of requiring an LLM to generate complex Subject-Relation-Object triplets, TERAG uses few-shot prompting to extract simple Named Entities and Document-Level Concepts. This approach avoids verbose structured formatting, significantly reducing the token count during the indexing phase.

Simplified Graph Structure

The TERAG graph consists of two primary node types: Passages and Concepts. Edges are created based on simple heuristics: a Passage-Linkage edge is formed when a concept appears in a passage, and a Co-occurrence edge is formed when two concepts appear together in the same text snippet.

The simplified graph structure of TERAG, illustrating relationships between passages and concepts.

Non-LLM Retrieval via PPR

For retrieval, TERAG identifies query-relevant concepts and applies the Personalized PageRank (PPR) algorithm. This allows the system to identify important passages based on graph topology without needing expensive LLM-based graph traversal. The system also utilizes a novel "restart vector" that balances semantic relevance with node frequency to avoid over-weighting common terms.

Experimental Setup

TERAG was evaluated on three multi-hop question-answering benchmarks: MuSiQue, HotpotQA, and 2WikiMultihopQA. The researchers utilized LLaMA-3.1-8B for graph construction and LLaMA-3.3-70B for final answer generation.

Key Insights

  • Output Token Bottleneck: The primary driver of RAG cost is the autoregressive generation of output tokens. TERAG's design specifically targets this bottleneck.
  • Co-occurrence as a Proxy: Explicitly defining relationship types is often unnecessary; co-occurrence provides a sufficient signal for graph algorithms to find reasoning paths.
  • NER-Centric Performance: System accuracy is more closely tied to the precision of Named Entity Recognition (NER) than to general LLM reasoning capabilities.

Results

TERAG demonstrates a superior balance between efficiency and performance:

  • Massive Cost Savings: It reduces output token usage by 89% to 97% compared to other lightweight graph-RAG methods.
  • Competitive Accuracy: On the 2Wiki dataset, TERAG achieved an Exact Match (EM) score of 51.2, nearly matching the 51.4 achieved by the significantly more expensive GraphRAG.
  • Efficiency-Performance Balance: Across all datasets, TERAG consistently maintained at least 80% of the accuracy of top-tier baselines.

Conclusion and Future Work

TERAG provides a cost-effective path for implementing graph-based RAG at scale. While currently dependent on initial NER accuracy, future work will explore dynamic RAG environments and controllable granularity to allow users to further tune the balance between budget and performance.

Summary updated

BibTeX
@misc{xiao2025terag,
  author = {Qiao Xiao and Hong Ting Tsang and Jiaxin Bai},
  title = {{TERAG: Token-Efficient Graph-Based Retrieval-Augmented Generation}},
  year = {2025},
  eprint = {2509.18667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.18667},
}
Figure