Knowledge Graph + RAG: Greatly Improve the Accuracy of Intelligent Question Answering System

Written by
Audrey Miles
Updated on:June-13th-2025
Recommendation

Explore the cutting-edge progress of the combination of knowledge graph and RAG technology, and reveal the secret of the leap in performance of intelligent question-answering systems.

Core content:
1. Challenges faced by RAG technology and the introduction of knowledge graph
2. Theoretical framework and advantages of knowledge graph-enabled RAG
3. Industry practice cases and performance improvement effect analysis

Yang Fangxian
Founder of 53A/Most Valuable Expert of Tencent Cloud (TVP)

In the field of artificial intelligence, retrieval-augmented generation (RAG) technology has become a mainstream solution to address the knowledge limitations of large language models (LLMs). However, traditional RAG relies on vector similarity matching of text blocks and still faces many challenges when processing complex queries. This article will explore in depth how knowledge graphs (KGs) empower RAG systems, and comprehensively analyze how this technology fusion can achieve a breakthrough improvement in the accuracy of intelligent question answering from theoretical basis, technical architecture to industry practice.


01 Technical bottlenecks of traditional RAG and the introduction of knowledge graphs


Retrieval-augmented generation (RAG) technology significantly improves the information recall capability of question-answering systems by combining external knowledge bases with large language models. The core of the RAG framework, first proposed by Facebook AI Research in 2020, is to guide text generation by retrieving relevant information from a document collection, thereby reducing the hallucination problem of large models. However, with the complexity of application scenarios, traditional RAG has gradually exposed three key limitations:

  • Low recall rate across documents  Fragmented text makes it difficult to capture the complex relationships between entities, resulting in a high recall failure rate for queries involving multiple entities.
  • Insufficient reasoning capabilities  cannot handle multi-hop queries that require logical concatenation (such as "Are there any quality inspection anomalies for the products with the highest return rate?").
  • Illusions of weak control  are generated within the context of easily deviating from retrieved evidence and lacking structural constraints.

The introduction of knowledge graphs provides a new technical path to solve these problems. Knowledge graphs are topological networks constructed with triples (entity-relationship-entity), such as "(SKU_23451, has_return_rate, 13.2%)→(SKU_23451, qc_result, 'low adhesion')". This structure naturally supports path reasoning and can effectively solve the semantic fragmentation problem of RAG.

Ant Group's practical data shows that after optimization, traditional RAG can only achieve a generation accuracy of about 60%, while after the introduction of knowledge graphs, this indicator can be increased to 95%. The DO-RAG framework developed by Tsinghua University has achieved a near-perfect recall rate and over 94% answer relevance in the fields of databases and electronic engineering. These data fully demonstrate the technical advantages of KG-RAG fusion.

02 Theoretical framework of knowledge graph empowering RAG


1. Structured semantic expression and hybrid retrieval mechanism

The enhancement of knowledge graph to RAG is first reflected in its ability to express structured semantics . Compared with the unstructured text that traditional RAG relies on, knowledge graph transforms discrete knowledge points into interconnected semantic networks through the network structure of nodes (entities) and edges (relationships). This expression method has two core advantages:

  • Explicit relation representation: directly encodes the semantic relations between entities (such as "treatment", "side effect", etc.), avoiding the bias that may be caused by LLM's implicit inference from the text.
  • Multi-hop reasoning support: realize cross-document knowledge association through graph traversal, for example, from "drug A" → "treatment of disease B" → "complications of disease B".

Based on this structured expression, KG-RAG has developed a hybrid retrieval mechanism that breaks through the limitations of traditional RAG single vector retrieval:

  • Graph traversal retrieval: Use graph query languages ​​such as Cypher to achieve precise relationship matching (such as searching for "products with a return rate > 10% and quality inspection failure").
  • Semantic vector retrieval: Supplements the contextual information of unstructured text and captures the semantic similarity between concepts.
  • Collaborative filtering: Dynamically adjust the weights of two search results through a relevance feedback mechanism.

In Ant Group's LightRAG solution, this hybrid retrieval achieves the synergy of local retrieval (rapid location of entity subgraphs) and global retrieval (semantic extension driven by relationship labels), ultimately achieving a recall rate of 95%+.

2. Dynamic graph construction and generation control

The second empowerment of knowledge graphs to RAGs is the ability to dynamically update knowledge . Traditional knowledge graphs often face the challenges of high construction costs and delayed updates, while modern KG-RAG systems use multimodal dynamic construction technology:

  • Hybrid entity recognition : Integrates the domain terminology library with the zero-sample capability of LLM to achieve incremental updates.
  • Automatic relationship extraction : Optimize label weights based on user behavior feedback. For example, Ant Group trains relationship extraction models through work order data.
  • Multi-agent collaboration : Tsinghua University's DO-RAG framework uses a hierarchical agent pipeline to handle knowledge extraction at different granularities.

In terms of generation control, the knowledge graph provides a structured constraint template, which significantly reduces the hallucination risk of LLM:

# Structured prompt template for generating quality inspection report def generate_qc_report(entity): required_fields = ["Test time", "Number", "Unqualified items"] knowledge = kg_query(entity) # Retrieve entity related information from the knowledge graph prompt = f"""Generate a report based on the following structured knowledge, which must include {required_fields}: {knowledge}""" return llm_call(prompt)

The HyKGE framework in the medical field uses the NER model to find anchor points in the graph and adopts the hypothetical answer (HO) re-ranking mechanism to filter out noisy knowledge, so that the accuracy of medical question and answering reaches a clinically applicable level.

03 Industry application cases and effect comparison


1. Financial risk control: Ant Group’s GraphRAG practice

Ant Group's R&D knowledge base question-and-answer system faces the pressure of tens of thousands of monthly work orders. After optimization, the traditional RAG solution can only achieve a 60% accuracy rate. Its main pain points are:

  1. Difficulty in cross-document recall (e.g., needing to associate user portraits, transaction flow, and other multi-source data)
  2. Complex queries need to be combined with tool calls (such as risk calculation models)
  3. The semantic gap between professional terms and colloquial expressions

The innovative features of its solution LightRAG include:

  • Dynamic graph construction : extract relationships such as "user-transaction-risk label" from work order data in real time.
  • DeepSearch Agent : Uses traditional search, graph search, code search, etc. as tools, with LLM coordinating multiple rounds of calls.
  • Domain adaptation : Use knowledge graphs to rewrite queries and solve professional terminology matching problems.

The implementation results show that this solution not only increases the complex problem solving rate to 95%, but also significantly shortens the average response time and reduces the number of manual work orders by 10%.

2. Medical Q&A: HyKGE framework supports accurate diagnosis

Intelligent question answering in the medical field faces special challenges of high professionalism and low error tolerance. The innovation of the HyKGE framework lies in:

  1. Hypothesis-driven retrieval : First generate possible diagnostic hypotheses, then search for evidence to support/refute these hypotheses.
  2. Double verification mechanism : Check the logical consistency of LLM generated content and knowledge graph.
  3. Multimodal integration : linking non-text data such as medical images and test reports.

Clinical evaluations have shown that the system has a relevance of 94% in diagnostic recommendations, a 33% improvement over traditional RAG. In particular, for rare disease diagnosis, the recall rate has been significantly improved through the relational reasoning capabilities of the knowledge graph.

Comparative analysis of technical solutions

index
Traditional RAG
KG-RAG
Improvement
Contextual Recall
80%
95%+
>15%
Multi-hop query accuracy
48%
89%
41%
Hallucination suppression ability
weak
powerful
-
Real-time data update
Minute level
Seconds
-
Complex reasoning support
Not supported
support
-

Table: Performance comparison between KG-RAG and traditional RAG (data from Ant Group, Tsinghua University DO-RAG and medical HyKGE test results)

From the perspective of architecture, KG-RAG's advantages are mainly reflected in three aspects:

  1. Retrieval dimension : dual signals of vector space similarity + graph structure relationship.
  2. Generative control : The knowledge graph provides a logical constraint framework.
  3. Knowledge updating : Dynamic entity relationship extraction supports real-time evolution.

Alibaba Cloud's GraphRAG practice based on PolarDB also proves that the unified storage of graph database and vector database (through the pgvector plug-in) can further reduce system complexity and improve retrieval efficiency.

04 Technical Challenges and Future Directions

Although KG-RAG has shown significant advantages, its implementation still faces many challenges:

  1. High construction cost : The construction of domain graphs relies on expert rules, which is particularly evident in professional fields such as medicine.
  2. Multimodal fusion : It is necessary to integrate cross-modal associations of text, tables, and images (such as medical images).
  3. Real-time balance : Tsinghua University DO-RAG pointed out that the computational overhead of multi-agent extraction still affects real-time updates.

Future development directions may focus on:

  1. Neural-symbolic collaboration : KG is responsible for logical reasoning, and LLM is responsible for language generation, achieving true "structure-aware intelligence".
  2. Self-optimizing graph : automatically adjusts relationship weights based on user feedback to reduce maintenance costs.
  3. Distributed processing : to meet the needs of scalability of enterprise-level knowledge graphs.

The cases of Ant Group and LinkedIn show that although the GraphRAG solution is complex and the token cost is high, the accuracy improvement it brings has irreplaceable value in key business scenarios. As stated in the CSDN blog, in the era of information overload, the combination of knowledge graph and RAG is not only a technical optimization, but also a paradigm shift to capture the essence of knowledge from the "data fog".

05 Conclusion: From Information Retrieval to Cognitive Enhancement

The deep integration of knowledge graph and RAG marks the paradigm shift of intelligent question-answering system from "information splicing" to "semantic understanding". When the structured knowledge network injects the logical skeleton into LLM, the generated content can have both accuracy, explainability and reasoning ability.

From financial risk control to medical diagnosis, industry practice has proven that knowledge graphs are not a substitute for RAGs, but a necessary path for them to evolve into a ‘domain brain’ . In the future, with the development of neural symbolic computing, this technology integration will push AI systems from “knowing” to “understanding”, and ultimately achieve human-level cognitive enhancement.

As Alibaba Cloud engineers emphasized in PolarDB practice, the value of GraphRAG lies not only in performance indicators, but also in the fact that it enables machines to "connect knowledge points" like human experts for the first time. In this era of information explosion and knowledge fragmentation, this connection ability may be the key to intelligent breakthroughs.