{"id":16801,"date":"2024-05-16T07:32:54","date_gmt":"2024-05-16T14:32:54","guid":{"rendered":"https:\/\/www.pingcap.com\/?post_type=article&#038;p=16801"},"modified":"2025-08-18T04:34:58","modified_gmt":"2025-08-18T11:34:58","slug":"graphrag-enhancing-traditional-rag-through-knowledge-graph","status":"publish","type":"article","link":"https:\/\/www.pingcap.com\/ko\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/","title":{"rendered":"Unlocking the Power of GraphRAG: Enhancing Traditional RAG through Integrated Knowledge Graph"},"content":{"rendered":"<p>In recent years, the advancements in AI, particularly in Large Language Models (LLMs) such as GPT-3, have revolutionized various sectors by providing nearly human-like text generation and interaction capabilities. However, when combined with Retrieval-Augmented Generation (RAG) and Knowledge Graphs, these models&#8217; efficiency and accuracy reach unprecedented levels, offering more contextually relevant and precise information.<\/p>\n\n\n\n<p>In this article, we will introduce the basics of RAG and its limitation, and introduce a better RAG solution too.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Overview_of_LLMs_RAG_and_Knowledge_Graphs\"><\/span>Overview of LLMs, RAG, and Knowledge Graphs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Brief explanation of Large Language Models (LLMs)<\/h3>\n\n\n\n<p>LLMs, such as GPT (Generative Pre-trained Transformer) series, are deep learning algorithms trained on vast amounts of text data. They can predict the next word in a sentence, making them powerful tools for generating human-like text based on the input they&#8217;re fed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Short introduction to RAG<\/h3>\n\n\n\n<p>Retrieval-Augmented Generation (RAG) combines the generative power of LLMs with an external knowledge source, allowing the model to &#8220;retrieve&#8221; relevant information before &#8220;generating&#8221; a response. This process enhances the model&#8217;s ability to provide informed and precise answers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Short Introduction to Knowledge Graphs<\/h3>\n\n\n\n<p>Knowledge Graphs organize and store complex data in an interconnected, graph-like structure. They enable logical reasoning over the stored data, facilitating precise information retrieval and data interconnectivity essential for various AI applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Limitation_of_LLM_only\"><\/span>Limitation of LLM only<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>While LLMs have shown remarkable capabilities, their effectiveness is often limited by the data on which they were trained. They can generate outdated or irrelevant information and struggle with queries requiring up-to-date or domain-specific knowledge.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Limitation_of_LLM_RAG\"><\/span>Limitation of LLM + RAG<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>While RAG models enhance LLMs by integrating external sources, they still face challenges such as integrating these sources smoothly and efficiently extracting the most relevant information from vast databases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Use_Knowledge_Graph_improve_Traditional_RAG\"><\/span>Use Knowledge Graph improve Traditional RAG<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Combining LLMs with Knowledge Graphs bridges the gap between generative models&#8217; linguistic capabilities and the structured, detailed data stored in knowledge bases.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Tech design of Knowledge Graph<\/h3>\n\n\n\n<p>Go through the code of demo: <a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/tree\/main\/examples\/graphrag-demo\">pingcap\/tidb-vector-python\/examples\/graphrag-demo<\/a>, we can find the code how we design schema SQL to store knowledge graph:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Prepare Tables<\/h4>\n\n\n\n<p>Here, we use <a href=\"\/ko\/tidb-cloud-starter\/\">TiDB Cloud \uc2a4\ud0c0\ud130<\/a> &#8211; MySQL compatible database with built-in vector storage &#8211; to store the entity and relationship data:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE `entities` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `name` varchar(512) DEFAULT NULL,\n  `description` text DEFAULT NULL,\n  `description_vec` vector&lt;float&gt; DEFAULT NULL,\n  PRIMARY KEY (`id`) \/*T!&#91;clustered_index] CLUSTERED *\/\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;\n\nCREATE TABLE `relationships` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `source_entity_id` int(11) DEFAULT NULL,\n  `target_entity_id` int(11) DEFAULT NULL,\n  `relationship_desc` text DEFAULT NULL,\n  PRIMARY KEY (`id`) \/*T!&#91;clustered_index] CLUSTERED *\/,\n  KEY `fk_1` (`source_entity_id`),\n  KEY `fk_2` (`target_entity_id`),\n  CONSTRAINT `fk_1` FOREIGN KEY (`source_entity_id`) REFERENCES `entities` (`id`),\n  CONSTRAINT `fk_2` FOREIGN KEY (`target_entity_id`) REFERENCES `entities` (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Insert Entity &amp; Relationship<\/h4>\n\n\n\n<p>Sure, it&#8217;s a MySQL compatible table schema definition, and the data format would be like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO entities (id, name, description, description_vec) VALUES (1, 'Elon Reeve Musk', 'Elon Reeve Musk is a businessman and investor, born on June 28, 1971, in Pretoria, South Africa. He is the founder, chairman, CEO, and CTO of SpaceX; angel investor, CEO, product architect, and former chairman of Tesla, Inc.; owner, executive chairman, and CTO of X Corp.; founder of the Boring Company and xAI; co-founder of Neuralink and OpenAI; and president of the Musk Foundation.', &#91;1536 length of vector]);<\/code><\/pre>\n\n\n\n<p>The full demo data is <a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/graphrag-demo\/init.sql#L21C1-L22C1\">\uc5ec\uae30<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Search knowledge with SQL<\/h4>\n\n\n\n<p>After create table and inserting demo data, we can perform a search on top of them with just MySQL skills but with vector search!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sqlalchemy import create_engine, text\nimport openai\nimport getpass\n\n# TiDB Connection String Pattern:\n# mysql+pymysql:\/\/{TIDB_USER}:{TIDB_PASSWORD}@{TIDB_HOST}:{TIDB_PORT}\/{TIDB_DB_NAME}?ssl_verify_cert=True&amp;ssl_verify_identity=True\n\ndb_engine = create_engine(getpass.getpass(\"Input your TIDB connection string:\"))\noai_cli = openai.OpenAI(api_key=getpass.getpass(\"Input your OpenAI API Key:\"))\nquestion = input(\"Enter your question:\")\nembedding = str(oai_cli.embeddings.create(input=&#91;question], model=\"text-embedding-3-small\").data&#91;0].embedding)\n\nwith db_engine.connect() as conn:\n    result = conn.execute(text(\"\"\"\n    WITH initial_entity AS (\n        SELECT id FROM `entities`\n        ORDER BY VEC_Cosine_Distance(description_vec, :embedding) LIMIT 1\n    ), entities_ids AS (\n        SELECT source_entity_id i FROM relationships r INNER JOIN initial_entity i ON r.target_entity_id = i.id\n        UNION SELECT target_entity_id i FROM relationships r INNER JOIN initial_entity i ON r.source_entity_id = i.id\n        UNION SELECT initial_entity.id i FROM initial_entity\n    ) SELECT description FROM `entities` WHERE id IN (SELECT i FROM entities_ids);\"\"\"), {\"embedding\": embedding}).fetchall()\n\n    print(oai_cli.chat.completions.create(model=\"gpt-4o\", messages=&#91;\n        {\"role\": \"system\", \"content\": f\"Please carefully answer the question by {str(result)}\"},\n        {\"role\": \"user\", \"content\": question}]).choices&#91;0].message.content)<\/code><\/pre>\n\n\n\n<p>It&#8217;s clear that we have implemented a RAG but:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>With Knowledge Graph concept in it<\/li>\n\n\n\n<li>Use MySQL style skills<\/li>\n\n\n\n<li>With Vector Storage<\/li>\n\n\n\n<li>With LLM<\/li>\n<\/ul>\n\n\n\n<p>That&#8217;s amazing!<\/p>\n\n\n\n<p>(The full demo code is <a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/tree\/main\/examples\/graphrag-demo\">\uc5ec\uae30<\/a>.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How LLMs and Knowledge Graphs complement each other<\/h3>\n\n\n\n<p>The integration allows LLMs to leverage structured data from Knowledge Graphs, enriching the context and accuracy of the generated responses. This symbiosis enables AI to not just predict text but to understand and generate content with nuanced, fact-based insights.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Benefits of combining LLMs\u2019 natural language understanding with Knowledge Graphs\u2019 structured data<\/h3>\n\n\n\n<p>This combination supports complex query answering, factual consistency, and the exploration of relationships between entities, significantly improving task-oriented and informational dialogues in AI applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Workflow_Design_of_GraphRAG\"><\/span><strong>Workflow Design of GraphRAG<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>GraphRAG revolutionizes the traditional RAG approach by directly integrating Knowledge Graph data into the indexing and retrieval process, leading to more relevant data extraction and smarter, contextual response generation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Explain the workflow to use graphrag<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Data Indexing:<\/strong> Knowledge Graph entities and relationships are indexed, enabling efficient traversal and retrieval. Here we use the following tech stacks:\n<ul class=\"wp-block-list\">\n<li>Knowledge Graphs Extraction: OpenAI GPT-4<\/li>\n\n\n\n<li>Vector Databases: we use <a href=\"\/ko\/tidb-cloud-starter\/\">TiDB Cloud \uc2a4\ud0c0\ud130<\/a> to store vectors and entity->relationship graph structures.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Data Retrieval:<\/strong> Upon receiving a query, GraphRAG retrieves the most pertinent nodes and edges from the Knowledge Graph, considering the query context and available structured data as relevant context.<\/li>\n\n\n\n<li><strong>Reranking:<\/strong> The retrieved information undergoes a reranking process based on relevance to the query, with the most relevant pieces directed to the generative component for response formulation.<\/li>\n<\/ul>\n\n\n<div class=\"ub_call_to_action hide wp-block-ub-call-to-action-block\"  id=\"ub_call_to_action_66e9defc-2bae-4c85-8f7b-8af86fc50c8f\">\n                <div class=\"ub_call_to_action_headline\">\n                    <p class=\"ub_call_to_action_headline_text\">Try TiDB Serverless Vector Storage<\/p><\/div>\n                <div class=\"ub_call_to_action_content\">\n                    <p class=\"ub_cta_content_text\">Build AI applications confidently with the most advanced MySQL vector solution.<\/p><\/div>\n                <div class=\"ub_call_to_action_button\">\n                    <a href=\"https:\/\/tidbcloud.com\/free-trial\/\" target=\"_self\" rel=\"noopener noreferrer\"\n                        class=\"ub_cta_button\">\n                        <p class=\"ub_cta_button_text\">Start Free<\/p><\/a><\/div><\/div>\n\n\n<div class=\"ub_call_to_action\" id=\"ub_call_to_action_ca71e3fc-45db-44dc-b552-845d86b3fa81\">\n                <div class=\"ub_call_to_action_headline\">\n                    <p class=\"ub_call_to_action_headline_text\">Try TiDB Serverless Vector Storage<\/p><\/div>\n                <div class=\"ub_call_to_action_content\">\n                    <p class=\"ub_cta_content_text\">Build AI applications confidently with the most advanced MySQL vector solution.<\/p><\/div>\n                <div class=\"ub_call_to_action_button\">\n                    <a href=\"https:\/\/tidbcloud.com\/free-trial\/\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"ub_cta_button external-link\" data-gtag=\"event:go_to_cloud_signup,product_type:serverless,button_name:Start Free,position:article_middle_cta\">\n                        <p class=\"ub_cta_button_text\" data-gtag=\"event:go_to_cloud_signup,product_type:serverless,button_name:Start Free,position:article_middle_cta\">Start Free<\/p><\/a><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>GraphRAG exemplifies the future of RAG by seamlessly integrating the depth of Knowledge Graphs with the generative prowess of LLMs. This pioneering approach significantly refines AI&#8217;s ability to interact with and understand the human language within specific contexts, making it a game-changer in fields ranging from customer support to sophisticated data analysis.<\/p>\n\n\n\n<p>As we continue to advance in AI and explore innovative integrations like GraphRAG, the potential for truly intelligent systems seems more attainable than ever. It\u2019s not just about building smarter AI, it\u2019s about creating systems that enhance our decision-making and broaden our understanding of the world around us. Discover more about how TiDB is pioneering the future of data management and AI <a href=\"https:\/\/tidb.cloud\/ai\">\uc5ec\uae30<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"More_Demos\"><\/span>More Demos<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/openai_embedding\/README.md\">OpenAI Embedding<\/a>: use the OpenAI embedding model to generate vectors for text data.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/image_search\/README.md\">Image Search<\/a>: use the OpenAI CLIP model to generate vectors for image and text.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/llamaindex-tidb-vector-with-ui\/README.md\">LlamaIndex RAG with UI<\/a>: use the LlamaIndex to build an&nbsp;<a href=\"https:\/\/docs.llamaindex.ai\/en\/latest\/getting_started\/concepts\/\">RAG(Retrieval-Augmented Generation)<\/a>&nbsp;application.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/llamaindex-tidb-vector\/README.md\">Chat with URL<\/a>: use LlamaIndex to build an&nbsp;<a href=\"https:\/\/docs.llamaindex.ai\/en\/latest\/getting_started\/concepts\/\">RAG(Retrieval-Augmented Generation)<\/a>&nbsp;application that can chat with a URL.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/graphrag-demo\/README.md\">GraphRAG<\/a>: 20 lines code of using TiDB Serverless to build a Knowledge Graph based RAG application.<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/pingcap\/tidb-vector-python\/blob\/main\/examples\/graphrag-step-by-step-tutorial\/README.md\">GraphRAG Step by Step Tutorial<\/a>: Step by step tutorial to build a Knowledge Graph based RAG application with Colab notebook. In this tutorial, you will learn how to extract knowledge from a text corpus, build a Knowledge Graph, store the Knowledge Graph in TiDB Serverless, and search from the Knowledge Graph.<\/li>\n<\/ul>\n\n\n\n<p>Embrace the future with us. Explore TiDB&#8217;s capabilities and see how it can transform your data management strategies. Join our community for more insights and discussions on the evolving landscape of AI, RAG, GraphRAG: <a href=\"https:\/\/discord.gg\/XzSW23Jg9p\"><em>https:\/\/discord.gg\/XzSW23Jg9p<\/em><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>In recent years, the advancements in AI, particularly in Large Language Models (LLMs) such as GPT-3, have revolutionized various sectors by providing nearly human-like text generation and interaction capabilities. However, when combined with Retrieval-Augmented Generation (RAG) and Knowledge Graphs, these models&#8217; efficiency and accuracy reach unprecedented levels, offering more contextually relevant and precise information. In [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"template":"","class_list":["post-16801","article","type-article","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GraphRAG: Enhancing Traditional RAG through Knowledge Graph<\/title>\n<meta name=\"description\" content=\"In this article, we will introduce the basics of RAG and its limitation, and introduce a better solution GraphRAG.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pingcap.com\/ko\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GraphRAG: Enhancing Traditional RAG through Knowledge Graph\" \/>\n<meta property=\"og:description\" content=\"In this article, we will introduce the basics of RAG and its limitation, and introduce a better solution GraphRAG.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pingcap.com\/ko\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/\" \/>\n<meta property=\"og:site_name\" content=\"TiDB\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pingcap2015\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-18T11:34:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/static.pingcap.com\/files\/2024\/09\/11005522\/Homepage-Ad.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"714\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@PingCAP\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/\",\"url\":\"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/\",\"name\":\"GraphRAG: Enhancing Traditional RAG through Knowledge Graph\",\"isPartOf\":{\"@id\":\"https:\/\/www.pingcap.com\/#website\"},\"datePublished\":\"2024-05-16T14:32:54+00:00\",\"dateModified\":\"2025-08-18T11:34:58+00:00\",\"description\":\"In this article, we will introduce the basics of RAG and its limitation, and introduce a better solution GraphRAG.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pingcap.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\/\/www.pingcap.com\/article\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Unlocking the Power of GraphRAG: Enhancing Traditional RAG through Integrated Knowledge Graph\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pingcap.com\/#website\",\"url\":\"https:\/\/www.pingcap.com\/\",\"name\":\"TiDB\",\"description\":\"TiDB | SQL at Scale\",\"publisher\":{\"@id\":\"https:\/\/www.pingcap.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pingcap.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pingcap.com\/#organization\",\"name\":\"PingCAP\",\"url\":\"https:\/\/www.pingcap.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"contentUrl\":\"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png\",\"width\":811,\"height\":232,\"caption\":\"PingCAP\"},\"image\":{\"@id\":\"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pingcap2015\",\"https:\/\/x.com\/PingCAP\",\"https:\/\/linkedin.com\/company\/pingcap\",\"https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GraphRAG: Enhancing Traditional RAG through Knowledge Graph","description":"In this article, we will introduce the basics of RAG and its limitation, and introduce a better solution GraphRAG.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pingcap.com\/ko\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/","og_locale":"ko_KR","og_type":"article","og_title":"GraphRAG: Enhancing Traditional RAG through Knowledge Graph","og_description":"In this article, we will introduce the basics of RAG and its limitation, and introduce a better solution GraphRAG.","og_url":"https:\/\/www.pingcap.com\/ko\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/","og_site_name":"TiDB","article_publisher":"https:\/\/facebook.com\/pingcap2015","article_modified_time":"2025-08-18T11:34:58+00:00","og_image":[{"width":1440,"height":714,"url":"https:\/\/static.pingcap.com\/files\/2024\/09\/11005522\/Homepage-Ad.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@PingCAP","twitter_misc":{"Est. reading time":"7\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/","url":"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/","name":"GraphRAG: Enhancing Traditional RAG through Knowledge Graph","isPartOf":{"@id":"https:\/\/www.pingcap.com\/#website"},"datePublished":"2024-05-16T14:32:54+00:00","dateModified":"2025-08-18T11:34:58+00:00","description":"In this article, we will introduce the basics of RAG and its limitation, and introduce a better solution GraphRAG.","breadcrumb":{"@id":"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pingcap.com\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pingcap.com\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/www.pingcap.com\/article\/"},{"@type":"ListItem","position":3,"name":"Unlocking the Power of GraphRAG: Enhancing Traditional RAG through Integrated Knowledge Graph"}]},{"@type":"WebSite","@id":"https:\/\/www.pingcap.com\/#website","url":"https:\/\/www.pingcap.com\/","name":"\ud2f0DB","description":"TiDB | SQL at Scale","publisher":{"@id":"https:\/\/www.pingcap.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pingcap.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/www.pingcap.com\/#organization","name":"PingCAP","url":"https:\/\/www.pingcap.com\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/","url":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","contentUrl":"https:\/\/static.pingcap.com\/files\/2021\/11\/pingcap-logo.png","width":811,"height":232,"caption":"PingCAP"},"image":{"@id":"https:\/\/www.pingcap.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pingcap2015","https:\/\/x.com\/PingCAP","https:\/\/linkedin.com\/company\/pingcap","https:\/\/youtube.com\/channel\/UCuq4puT32DzHKT5rU1IZpIA"]}]}},"card_markup":"        <a class=\"card-article\" href=\"https:\/\/www.pingcap.com\/ko\/article\/graphrag-enhancing-traditional-rag-through-knowledge-graph\/\">            <h3>Unlocking the Power of GraphRAG: Enhancing Traditional RAG through Integrated Knowledge Graph<\/h3>            <p>In recent years, the advancements in AI, particularly in Large Language Models (LLMs) such as GPT-3, have revolutionized various sectors by providing nearly human-like text generation and interaction capabilities. However, when combined with Retrieval-Augmented Generation (RAG) and Knowledge Graphs, these models&#8217; efficiency and accuracy reach unprecedented levels, offering more contextually relevant and precise information. In [&hellip;]<\/p>        <\/a>","_links":{"self":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/article\/16801","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/users\/8"}],"wp:attachment":[{"href":"https:\/\/www.pingcap.com\/ko\/wp-json\/wp\/v2\/media?parent=16801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}