KERAG: Graph-Enhanced LLM Pipelines
- KERAG is a set of methods that integrate LLMs with knowledge graphs to enhance factual grounding and retrieval in both QA and recommendation tasks.
- It features diverse implementations where graph-structured information supplements latent knowledge through optimal triple selection and subgraph retrieval.
- Empirical evaluations show that these pipelines improve metrics like hit ratio, accuracy, and hallucination reduction across multiple benchmarks.
KERAG denotes a cluster of recent methods that couple LLMs with knowledge graphs or graph-structured retrieval in order to improve factual grounding, coverage, or recommendation quality. In the current literature, the label is not canonical: it appears as KERAG_R for top- recommendation, as KERAG for KG-based question answering, as an informal reference to KG-RAG, and as a label for enterprise knowledge-graph-enhanced RAG pipelines. Across these usages, the common mechanism is to replace or supplement latent parametric knowledge with retrieved relational structure, but the concrete retrieval substrate, planning loop, filtering regime, and generation target differ substantially (Meng et al., 8 Jul 2025, Sanmartin, 2024, Sun et al., 5 Sep 2025, Markondapatnaikuni et al., 10 Jul 2025, Chakraborty et al., 14 Apr 2026).
1. Terminological scope and research usages
The literature uses closely related names for distinct systems. In the recommendation paper, the method is consistently called KERAG_R and the authors state that there is no separate “KERAG” variant; the two are effectively synonymous in that work. In the QA literature, KERAG is also the exact name of a KG-based retrieval–filtering–summarization pipeline. A separate paper states that “KERAG” is almost certainly a reference to KG-RAG, while another uses KeyKnowledgeRAG (KRAG) and explicitly notes that it is being referred to as “KERAG” (Meng et al., 8 Jul 2025, Sanmartin, 2024, Markondapatnaikuni et al., 10 Jul 2025, Sun et al., 5 Sep 2025).
| Usage | Expansion | Primary task |
|---|---|---|
| KERAG_R | Knowledge-Enhanced Retrieval-Augmented Generation for Recommendation | Top- recommendation |
| KERAG | Knowledge-Enhanced Retrieval-Augmented Generation for Advanced Question Answering | KG-based QA |
| KG-RAG / “KERAG” | Knowledge Graph–Retrieval Augmented Generation | KGQA with graph retrieval |
| KRAG | KeyKnowledgeRAG | Multi-hop QA with hybrid retrieval |
| Knowledge-graph-Enhanced RAG | Agentic Knowledge Graphs featuring Recursive Crawling | Enterprise and regulatory QA |
This naming heterogeneity matters because the systems optimize different objectives. Some treat the LLM as a listwise ranker, some as a CoT summarizer over retrieved subgraphs, and others as a generator grounded in deterministic graph traversal. As a result, “KERAG” is best understood as a label attached to several graph-grounded LLM pipelines rather than a single standardized architecture.
2. KERAG_R in recommender systems
KERAG_R is an LLM-based top- recommender system that integrates a knowledge graph over items, a GraphRAG module with a graph attention network (GAT), and knowledge-enhanced instruction tuning of Llama-3.1-8B-Instruct with LoRA. The formal setting defines users , items , an interaction matrix , and a KG whose head is an item and tail 0 is a tail entity. The LLM acts as a listwise ranker over a candidate set 1, and its prompt encodes the task description, liked and disliked items, a candidate list, a hint ranking from LightGCN, and selected KG triples (Meng et al., 8 Jul 2025).
The GraphRAG component pre-trains a GAT on the KG to produce KG-aware item and entity embeddings. Its attention coefficients are
2
and the updated item embedding is
3
Triple selection then scores neighbor entities by
4
followed by
5
The retrieved triples are injected either in compact triple form (KERAG_R6) or sentence form (KERAG_R7). The system is not used in pure zero-shot mode: GAT pre-training is independent of the LLM, and the LLM is instruction-tuned once on prompts that already include KG triples.
The recommendation pipeline is explicitly staged. At inference, LightGCN provides candidate items; GraphRAG retrieves top-8 item–entity triples for the user history and candidate list; the prompt is constructed with liked and disliked items, LightGCN’s ranking as Hint 1, and KG triples as Hint 2; the instruction-tuned Llama-3.1 then outputs the ranking, and there is no additional numeric reranking beyond the model’s output ordering. The KG itself is constructed by mapping items to Freebase via KB4Rec, with reported scales of 31,380 entities / 31 relations / 70,444 triples on ML-1M, 32,754 / 31 / 133,245 on ML-10M, and 23,780 / 10 / 102,149 on Amazon-Book.
Empirically, KERAG_R is evaluated with Hit Ratio and NDCG at 9 on ML-1M, ML-10M, and Amazon-Book. The strongest baseline is RecRanker, and KERAG_R0 is reported as best. On ML-1M, HR@5 rises from 0.0430 to 0.0478 and NDCG@5 from 0.0262 to 0.0293; on ML-10M, HR@5 rises from 0.0473 to 0.0514 and NDCG@5 from 0.0289 to 0.0321; on Amazon-Book, HR@5 rises from 0.0401 to 0.0438 and NDCG@5 from 0.0246 to 0.0277. All improvements are reported as statistically significant under a Holm-Bonferroni corrected paired 1-test with 2. The ablations show that removing GraphRAG, instruction tuning, GAT-based selection, or the Llama-3.1 backbone degrades performance. A particularly important result is that 3 triple per interacted item is best; 4 degrades performance, and triple form consistently outperforms sentence form.
3. KERAG for advanced question answering over knowledge graphs
The QA-oriented KERAG formulates the task around a KG 5, a natural language question 6, and a three-stage pipeline consisting of planning, retrieval, and summarization. Planning produces a high-level retrieval tuple
7
where 8 is the domain, 9 the topic entity, 0 the relations to keep, and 1 the number of hops. Retrieval then gathers a broader neighborhood subgraph around the topic entity rather than a single path, and summarization uses an LLM to answer from the retrieved subgraph with Chain-of-Thought prompting and an explicit option to answer “I don’t know” (Sun et al., 5 Sep 2025).
The planning stage is schema-aware. For CRAG it extracts structured JSON fields such as "domain", "market_identifier", "movie_name", "artist_name", or "main_entity", depending on domain, and also performs time extraction for temporal questions. For DBpedia-based settings, it uses a dedicated main-entity extraction prompt over candidate (entity, predicate) pairs from fuzzy matching. Relation filtering combines LLM decisions with DPR-based dense similarity over predicates or tool descriptions, and hop count is determined iteratively by asking whether the current retrieval scope is sufficient. This shifts the problem away from exact semantic parsing to a broader neighborhood-retrieval regime.
The summarizer is a second major component. On CRAG, the model is Llama-3.1-8B-Instruct fine-tuned with LoRA + FSDP using automatically generated CoT traces. The training process keeps CoT targets only when a critic model judges the generated answer correct; otherwise it falls back to the ground-truth answer with a non-CoT prompt. The fine-tuning uses 20 epochs, learning rate 2, about 6 GPU hours on four A100-80GB GPUs, and a CoT proportion of 81.6% in the training set. The objective is standard supervised sequence modeling: 3
The reported evaluation uses accuracy, miss rate, hallucination rate, and truthfulness, with
4
On the CRAG KG subset, KERAG reports accuracy 0.732, hallucination 0.202, miss 0.066, and truthfulness 0.529; the strongest listed baseline, apex, reports 0.652 / 0.194 / 0.154 / 0.458. On Head2Tail, KERAG reports 0.908 / 0.049 / 0.043 / 0.860, exceeding WikiSP, StructGPT, and ToG on truthfulness. Retrieval recall on Head2Tail is reported as 0.952 for KERAG versus 0.844 for ToG, and on CRAG retrieval recall is 0.967 with retrieval miss rate 0.033. On QALD-10-en, WebQSP, and AdvHotpotQA, KERAG reports 0.558, 0.843, and 0.461 respectively, outperforming the listed prior SOTA and ToG / ToG-2 on those datasets, while on CWQ it is roughly comparable at 0.702 versus 0.704 prior SOTA. The ablations show that removing multi-hop retrieval, filtering, fine-tuning, or CoT reduces truthfulness, with the -CoT setting dropping to 0.301.
4. KG-RAG and the Chain of Explorations lineage
A different but closely related line defines KG-RAG as a pipeline that constructs a KG from unstructured text, performs retrieval over that KG using Chain of Explorations (CoE), and feeds retrieved graph paths into an LLM for answer generation. In this formulation, a homogeneous KG is written as
5
with triples 6, and retrieval is framed as finding paths 7 maximizing
8
The system also introduces triple hypernodes so that nested facts such as dates attached to relations can be represented as graph nodes (Sanmartin, 2024).
The pipeline has three stages: Storage, Retrieval, and Answer Generation. Storage uses an LLM to extract triples from text and inserts them into a homogeneous KG. Complex contextual facts are encoded through hypernodes. The graph is stored in NebulaGraph, while SentenceTransformer embeddings from multi-qa-mpnet-base-dot-v1 are stored in Redis with Redis Search, giving both structural and vector indices. Retrieval uses CoE, an LLM-controlled loop with three components: Planning, KG Lookups, and Evaluation. Node exploration uses vector search over node embeddings; relationship exploration uses Cypher queries over current nodes plus similarity-based ranking; and the evaluation step decides whether to continue, refine the plan, or respond.
The target application is Knowledge Graph Question Answering on ComplexWebQuestions v1.1. The reported setup uses the development split, samples 100 questions, excludes 11 without answer presence in snippets, and builds a KG with 9,604 nodes, 8,141 normal nodes, 1,463 triple hypernodes, and 3,175 unique relationship names. The comparison includes KG-RAG, Embedding-RAG, MHQA-GRN, and human performance. Quantitatively, KG-RAG reports EM 19, F1 25, Accuracy 32, and Hallucination 15, while Embedding-RAG reports EM 28, F1 37, Accuracy 46, and Hallucination 30. The paper’s central empirical claim is therefore not a raw QA gain but a substantial hallucination reduction: KG-RAG roughly halves hallucinations relative to standard embedding-based RAG, while underperforming that baseline on EM, F1, and accuracy.
This result is important because it dissociates factual grounding from benchmark answer matching. The paper explicitly attributes the lower raw QA scores to incomplete KG construction, snippet quality, triple extraction errors, and cost-constrained coverage, while treating the reduction from 30% to 15% hallucination as evidence that graph-grounded retrieval can improve reliability even when it does not maximize conventional answer metrics.
5. Other KERAG-named architectures
KeyKnowledgeRAG (K9RAG) defines a divide-and-conquer QA pipeline that combines knowledge graphs, hybrid dense + sparse retrieval, systematic summarization, and lightweight models. Offline preprocessing summarizes each document with pszemraj/led-base-book-summary, builds a dense index in ChromaDB, a sparse BM25 index, and a knowledge graph using Microsoft GraphRAG over summarized chunks. Online inference first queries the KG, summarizes the KG output, generates sub-questions from KG-derived chunks, retrieves top-0 chunks per sub-question using the hybrid score
1
with 2, then answers and summarizes each sub-question before synthesizing a final short answer. On MultiHop-RAG, K3RAG reports the highest mean answer similarity of 0.57 and the highest third quartile similarity of 0.82, while the summarization step reduces the average training time of individual components by 93%, execution speed is up to 40% faster than traditional knowledge graph-based RAG systems, and VRAM usage is 5 GB versus 14.3–18.1 GB for the listed naive pipelines (Markondapatnaikuni et al., 10 Jul 2025).
A later enterprise variant uses Agentic Knowledge Graphs featuring Recursive Crawling over typed edges such as SUPERSEDES, REFERS_TO, and CONTAINS. Here the key algorithmic idea is that correctness comes from deterministic graph traversal rather than top-4 chunk similarity. The Recursive Reference Crawler follows explicit references breadth-first with a depth bound, while temporal validity is resolved by walking incoming SUPERSEDES edges and selecting the latest dated clause. The benchmark domain is the Code of Federal Regulations (CFR), using 20 curated complex regulatory questions. The reported result is a 70% accuracy improvement over standard vector-based RAG systems, with correct/complete answers rising from 5/20 (25%) to 19/20 (95%), incomplete/inaccurate answers falling from 8/20 to 1/20, and refusals/no-answer from 7/20 to 0/20 (Chakraborty et al., 14 Apr 2026).
These two systems broaden the meaning of KERAG beyond classical KGQA. K5RAG emphasizes efficiency, corpus summarization, and hybrid retrieval for multi-hop QA, while the enterprise system emphasizes temporal precedence, clause validity, and explicit citation following in highly structured document ecosystems.
6. Shared design principles, methodological tensions, and related GraphRAG work
Across the literature, three technical tensions recur. The first is coverage versus noise. The QA-oriented KERAG argues that semantic-parsing KGQA often suffers from low coverage because it retrieves only the minimal triples needed for answer generation, whereas neighborhood retrieval raises recall at the cost of additional irrelevant content. KERAG_R encounters the same trade-off at recommendation time: the system reports that 6 triple per interacted item is optimal, while more triples worsen performance, and KERAG_R7 exceeds sentence-format prompting because compact triple text reduces token count and lexical noise (Sun et al., 5 Sep 2025, Meng et al., 8 Jul 2025).
The second is factual grounding versus raw benchmark accuracy. KG-RAG reports lower EM, F1, and accuracy than Embedding-RAG on ComplexWebQuestions, yet halves hallucination rate from 30% to 15. KERAG for advanced QA reports a different operating point: higher retrieval recall, reduced miss rate, and higher truthfulness, but still nontrivial hallucination. K8RAG similarly reports only a modest mean similarity gain, from roughly 0.55–0.56 for naive pipelines to 0.57, with the strongest gain concentrated in the third quartile at 0.82. These results suggest that graph augmentation is not uniformly beneficial in every metric; its main effect can be improved grounding, broader recall, or better upper-tail performance rather than a universal increase in exact-match style scores (Sanmartin, 2024, Sun et al., 5 Sep 2025, Markondapatnaikuni et al., 10 Jul 2025).
The third is graph construction and indexing stability. A related GraphRAG paper on global sensemaking proves that, on sparse knowledge graphs with many low-degree nodes, modularity optimization admits exponentially many near-optimal partitions, making Leiden-based communities inherently non-reproducible. It proposes replacing Leiden with deterministic 9-core decomposition, together with RkH, M2hC, MRC, and token-budget-aware RRTC. The motivation is closely aligned with KERAG-style systems: if the graph hierarchy used for retrieval is unstable, then summarization quality, token budgets, and final answers become difficult to control (Hossain et al., 5 Mar 2026).
Taken together, these papers position KERAG not as one architecture but as a research direction. Its characteristic move is to treat graph structure as an external reasoning substrate and then decide, task by task, how much of that structure should reach the LLM: a single triple per item, a filtered neighborhood subgraph, a chain of retrieved graph paths, a summarized graph-derived topic sketch, or a deterministically traversed regulatory closure. The open problems are correspondingly consistent across papers: KG quality and coverage, entity linking, noise control, context budgeting, multi-hop reasoning, computational cost, and the extent to which retrieval and generation should be jointly optimized.