Awesome! ChatWiki supports GraphRAG, giving AI vertical deep reasoning capabilities!
Updated on:June-26th-2025
Recommendation
ChatWiki introduces GraphRAG technology, bringing revolutionary vertical deep reasoning capabilities to AI!
Core content:
1. The core difference and technical principles of RAG and GraphRAG
2. Comparative analysis of knowledge organization forms and retrieval mechanisms
3. Application advantages of GraphRAG in complex reasoning scenarios
Yang Fangxian
Founder of 53A/Most Valuable Expert of Tencent Cloud (TVP)
Traditional RAG (Retrieval-Augmented Generation) and GraphRAG (Graph-based Retrieval-Augmented Generation) are two generative model technologies based on retrieval enhancement. Their core difference lies in the way of organizing knowledge and the design of retrieval mechanism.Traditional retrieval-augmented generation (RAG) relies on vector retrieval technology to find text fragments (chunks) related to user questions from the document library and then generate answers based on these fragments.However, this approach may ignore the deep semantic relationships between texts (such as associations between entities, causal chains, etc.), resulting in inaccurate retrieval results or missing key information.GraphRAG is a technology that combines knowledge graph and retrieval-augmented generation (RAG), which aims to improve the reasoning ability and generation quality of large language models (LLMs) in complex scenarios through structured data.The core idea is to structure the entities, relationships, events, etc. in unstructured text, build a knowledge graph, and then perform retrieval and reasoning based on the topological relationship of the graph, so as to improve the logic and accuracy of the generated answers.2. The difference between RAG and GraphRAG1. Knowledge organization- Data storage: Rely on vector database to segment text into segments and encode them into vectors.
- Structural characteristics: Knowledge is stored in the form of independent text blocks, lacking explicit semantic associations.
- Limitations: Difficult to capture complex relationships (such as entity associations, event causality) across documents or in long texts.
- Data storage: Build a knowledge graph to store entities, relationships, events, etc. in the text in a structured manner as nodes and edges.
- Structural features: Knowledge is organized in a graph structure, explicitly modeling relationships between entities (such as "A is the parent company of B" or "C leads to D").
- Advantages: Supports global reasoning and cross-document retrieval of complex relationships.
- Retrieval method: Based on vector similarity matching, directly retrieve the text block most relevant to the question.
- Limitations: May miss related information scattered across multiple text blocks. Weak support for long-distance dependencies or complex logical reasoning.
- Graph traversal: Retrieve related entities and subgraphs through the edges (relations) of the knowledge graph.
- Subgraph matching: extract the local graph related to the problem and preserve the contextual relationship.
- Advantages: Supports multi-hop reasoning (e.g. inferring "A indirectly leads to C" from "A leads to B" and "B leads to C"). Capable of capturing implicit global semantics.
- Output characteristics: Relying on the retrieved text blocks to directly generate answers, which may lack logical coherence.
- Applicable scenarios: simple question and answer, short text generation (such as single document summary).
- Output characteristics: Generate answers based on graph-based structured knowledge and are better at complex reasoning (such as causal analysis and event chain explanation).
- Applicable scenarios: complex problems that require multiple document associations (such as "analyzing the reasons for the decline in a company's stock price"). Tasks that require high logical coherence and explainability.
4. Typical application scenarios | | |
Simple Questions and Answers | ✔️ Efficient and accurate | |
Complex reasoning over multiple documents | ❌ Possible missing associations | ✔️ Graph-based global reasoning |
| ❌ Difficult to capture long-distance relationships | ✔️ Explicitly model causality |
| ✔️ Vector library is easy to update | ❌ The cost of updating the graph is high |
3. GraphRAG Specific ImplementationUsing ChatWiki+DeepSeek, you can build a GraphRAG system from scratch.ChatWiki is a domestic open source knowledge base AI question-answering system. The system is built on the Large Language Model (LLM), Retrieval Enhanced Generation (RAG) and GraphRAG knowledge graph, providing out-of-the-box data processing, model calling and other capabilities. Enterprises, universities and government departments can quickly build private knowledge base AI question-answering systems.The ChatWiki software can be downloaded from Github. There are multiple deployment methods, supporting:- Offline docker deployment;
- No Docker deployment required, completely local deployment, source code installation
Github address: https://github.com/zhimaAi/chatwikiChatWiki supports access to more than 20 mainstream models around the world, including DeepSeek R1, DeepSeek V3, doubao pro, qwen max, Openai, Claude, etc. You only need to configure the API Key to access DeepSeek.3. Create a knowledge base and start the knowledge graphSupports importing documents in various formats including Word, Excel, PPT, PDF, markdown, etc.At the same time, turn on "Generate Knowledge Graph", and a GraphRAG system will be successfully built!Apply this knowledge base to robots or workflows. When a user consults, GraphRAG will improve the depth of retrieval and reasoning capabilities through the entity relationship network to solve multi-hop reasoning requirements in complex problems.
GraphRAG's core application scenarios:1. Questions that require multi-hop reasoning (e.g., “How does A indirectly affect C?”)2. Decisions that rely on hidden associations (such as risk prediction and academic controversy analysis)3. Dynamic relationship analysis (such as real-time updated news events, corporate equity changes)4. Personalized explanatory recommendations (need to clarify the user preference logic chain)①Personalized recommendations in customer serviceScenario: E-commerce platforms need to recommend products based on user historical behaviors (browsing, purchasing, returns and exchanges) and explain the reasons for the recommendations.Limitations of traditional RAG:
Traditional recommendations may be based on collaborative filtering (what similar users like), but cannot explain “why product A is recommended” (such as material preference, brand loyalty).Build a user-product graph (e.g. “User A → Purchase → Sports Shoes → Preference → Breathable Material → Association → Brand N”).Through path analysis, we can discover user preferences (such as "breathable material>brand>price") and recommend products that fit the logical chain.Sample output: "Based on your frequent purchase of breathable sports shoes, we recommend new running shoes from brand N (breathability score 9.5, similar to the style you purchased previously)."② News event tracing and impact analysisScenario: Analyze the root causes and subsequent impact of an international event (such as the energy crisis), and track the countries, companies, and policy relationships involved.Limitations of traditional RAG:
Traditional searches may return timeline reports of events, but cannot automatically sort out the cause-and-effect chain (such as "geopolitical conflict → natural gas supply interruption → rising manufacturing costs in Germany").Construct a causal graph of events (e.g. “Russia-Ukraine war → impact → natural gas pipeline → leads to → increase in EU electricity prices → forces → factory to move to XXX”).Generate multi-level impact reports of events by expanding sub-graphs.Sample output: "The energy crisis stems from the restrictions on natural gas supply caused by the Russian-Ukrainian war, which indirectly leads to rising costs in the German automobile manufacturing industry. BMW has announced the expansion of its factory in XXX."