{"id":622,"date":"2025-04-02T09:02:45","date_gmt":"2025-04-02T01:02:45","guid":{"rendered":"https:\/\/znl.pub\/?p=622"},"modified":"2025-04-02T09:02:45","modified_gmt":"2025-04-02T01:02:45","slug":"rag%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/znl.pub\/?p=622","title":{"rendered":"RAG\u4ecb\u7ecd"},"content":{"rendered":"\n<pre class=\"wp-block-preformatted\">RAG\uff0c\u5168\u79f0\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff08Retrieval-Augmented Generation\uff09\uff0c\u4f5c\u4e3a\u5f53\u524d AI \u5e94\u7528\u4e2d\u5e38\u89c1\u7684\u8f85\u52a9\u65b9\u6cd5\uff0c\u6709\u6548\u63d0\u5347\u4e86 LLM \u8f93\u51fa\u7684\u51c6\u786e\u6027\u548c\u53ef\u9760\u6027\u3002\u4f46\u603b\u6709\u4eba\u620f\u8a00\uff0cRAG \u4e0d\u8fc7\u662f\u201c\u628a\u6587\u6863\u4e22\u8fdb Dify\u201d\u8fd9\u4e48\u7b80\u5355\uff0c\u771f\u7684\u5417\uff1f<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">01 RAG\u662f\u4ec0\u4e48<\/h2>\n\n\n\n<p>\u4ecb\u7ecd RAG \u524d\uff0c\u5148\u4ecb\u7ecd\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u9762\u4e34\u7684\u4e24\u4e2a\u95ee\u9898\uff0c\u4e00\u662f LLM \u7684<strong>\u77e5\u8bc6\u622a\u6b62<\/strong>\uff0c\u4e8c\u662f LLM \u5b58\u5728<strong>\u5e7b\u89c9\u73b0\u8c61<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1&nbsp;<\/strong><strong>\u77e5\u8bc6\u622a\u6b62<\/strong><\/h3>\n\n\n\n<p>LLM \u8bad\u7ec3\u4e0d\u662f\u5b9e\u65f6\u7684\uff0c\u800c\u662f\u79bb\u7ebf\u8bad\u7ec3\u597d\u7684\u3002\u5728\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\uff0c\u4f7f\u7528\u7684\u6570\u636e\u90fd\u662f\u63d0\u524d\u51c6\u5907\u7684\uff0c\u800c\u4e14\u5927\u591a\u6570\u662f\u516c\u5f00\u3001\u5f00\u6e90\u7684\u6570\u636e\uff0c\u8fd9\u5c31\u5bfc\u81f4\u4e86 LLM \u8bad\u7ec3\u540e\u5177\u5907\u7684\u77e5\u8bc6\u662f\u6709\u8303\u56f4\u7684\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c<strong>\u6a21\u578b\u77e5\u8bc6\u4ec5\u9650\u4e8e\u8bad\u7ec3\u6570\u636e\u6240\u6db5\u76d6\u7684\u77e5\u8bc6\u8303\u56f4\uff0c<\/strong>\u5bf9\u4e8e\u65b0\u7684\u77e5\u8bc6\uff08\u6bd4\u5982\u4eca\u5929\u7684\u65b0\u95fb\uff09\u6216\u672a\u8bad\u7ec3\u7684\u77e5\u8bc6\uff08\u6bd4\u5982\u672a\u516c\u5f00\u7684\u6570\u636e\uff09\uff0c\u6a21\u578b\u672c\u8eab\u4e0d\u5177\u5907\u8fd9\u4e9b\u77e5\u8bc6\uff0c\u4ec5\u5177\u5907\u63a8\u7406\u80fd\u529b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.2 \u5e7b\u89c9\u73b0\u8c61<\/strong><\/h3>\n\n\n\n<p>\u5e7b\u89c9\u73b0\u8c61\u6709\u591a\u79cd\u7ef4\u5ea6\u7684\u89e3\u91ca\u3002\u4e00\u65b9\u9762\uff0cLLM \u662f\u4e00\u4e2a\u6761\u4ef6\u6982\u7387\u6a21\u578b\uff0c\u4ee5\u524d\u6587\u4f5c\u4e3a\u6761\u4ef6\u7684\u8bcd\u8868\u6982\u7387\u9010\u8bcd\u751f\u6210\u6587\u672c\uff0c\u8fd9\u4e00\u673a\u5236\u5bfc\u81f4\u5176\u53ef\u80fd\u51fa\u73b0<strong>\u770b\u4f3c\u903b\u8f91\u4e25\u8c28\uff08\u6982\u7387\u9ad8\uff09\u4f46\u5176\u5b9e\u7f3a\u4e4f\u4e8b\u5b9e\u4f9d\u636e\u7684\u751f\u6210\uff0c<\/strong>\u4e5f\u5c31\u662f\u201c\u4e00\u672c\u6b63\u7ecf\u5730\u80e1\u8bf4\u516b\u9053\u201d\u3002\u53e6\u4e00\u65b9\u9762\uff0cLLM \u7684\u8bad\u7ec3\u8fc7\u7a0b\uff0c\u662f<strong>\u5bf9\u8bad\u7ec3\u6570\u636e\u7684\u77e5\u8bc6\u8fdb\u884c\u538b\u7f29\u63d0\u70bc\u7684\u8fc7\u7a0b\uff0c\u4f46\u4e0d\u662f\u65e0\u635f\u538b\u7f29\u77e5\u8bc6\uff0c<\/strong>\u8fb9\u7f18\u77e5\u8bc6\u5bb9\u6613\u5728\u4e3b\u6d41\u77e5\u8bc6\u51b2\u51fb\u4e0b\u51fa\u73b0\u626d\u66f2\uff0c\u5bfc\u81f4\u4ea7\u751f\u4e86\u5e7b\u89c9\u3002<\/p>\n\n\n\n<p>\u6253\u4e2a\u6bd4\u65b9\uff0cLLM \u597d\u6bd4\u4e00\u4e2a\u591a\u5e74\u5907\u6218\u7684\u8003\u751f\uff0c\u5f53\u4ed6\u5728\u505a\u8bd5\u9898\u7684\u65f6\u5019\uff0c\u9047\u5230\u4ed6\u4ece\u6ca1\u5b66\u8fc7\u7684\u65b0\u5b66\u79d1\u77e5\u8bc6\u70b9\u65f6\uff0c\u5c31\u65e0\u4ece\u4e0b\u7b14<strong>\uff08\u77e5\u8bc6\u622a\u6b62\uff09<\/strong>\uff1b\u5f53\u4ed6\u9047\u5230\u4ed6\u6ca1\u638c\u63e1\u7262\u56fa\u7684\u77e5\u8bc6\u70b9\u65f6\uff0c\u5c31\u51ed\u501f\u6a21\u7cca\u7684\u8bb0\u5fc6\u6216\u771f\u6216\u5047\u5730\u7f16\u4e86\u4e2a\u7b54\u6848<strong>\uff08\u5e7b\u89c9\u73b0\u8c61\uff09<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.3 RAG<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"260\" src=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1024x260.webp\" alt=\"\" class=\"wp-image-623\" srcset=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1024x260.webp 1024w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-300x76.webp 300w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-768x195.webp 768w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1536x390.webp 1536w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898.webp 1718w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u800c RAG \u5c31\u662f\u4e00\u79cd\u80fd\u591f\u6709\u6548\u89e3\u51b3\u5e7b\u89c9\u6a21\u578b\u77e5\u8bc6\u622a\u6b62\u548c\u5e7b\u89c9\u73b0\u8c61\u7684\u65b9\u6cd5\u3002RAG \u662f\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff08Retrieval-Augmented Generation\uff09\u7684\u7f29\u5199\u3002\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff0c\u662f\u6307\u5bf9\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u8f93\u5165\u8fdb\u884c\u4f18\u5316\uff0c\u4f7f\u5176\u80fd\u591f\u5728\u751f\u6210\u54cd\u5e94\u4e4b\u524d\u5f15\u7528\u8bad\u7ec3\u6570\u636e\u6765\u6e90\u4e4b\u5916\u7684\u77e5\u8bc6\uff0c\u4f5c\u4e3a\u56de\u7b54\u7684\u6839\u636e\u3002\u8fd9\u662f\u4e00\u79cd\u7ecf\u6d4e\u9ad8\u6548\u5730\u6539\u8fdb LLM \u8f93\u51fa\u7684\u65b9\u6cd5\uff0c\u8ba9 LLM \u4fdd\u6301\u76f8\u5173\u6027\u3001\u51c6\u786e\u6027\u548c\u5b9e\u7528\u6027\u3002<\/p>\n\n\n\n<p>RAG\u7cfb\u7edf\u6709\u4e24\u4e2a\u6700\u4e3b\u8981\u7684\u7ec4\u6210\u90e8\u5206\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u68c0\u7d22\uff08Retrieval\uff09\uff1a<\/strong>\u67e5\u8be2\u5916\u90e8\u6570\u636e\u6e90\uff0c\u4f8b\u5982\u77e5\u8bc6\u5e93\u3001\u5411\u91cf\u6570\u636e\u5e93\u6216\u8005\u7f51\u9875\u641c\u7d22API\u3002\u5e38\u89c1\u7684\u68c0\u7d22\u65b9\u6cd5\u6709\u5168\u6587\u68c0\u7d22\u3001\u5411\u91cf\u68c0\u7d22\u3001\u56fe\u68c0\u7d22\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u751f\u6210\uff08Generation\uff09\uff1a<\/strong>\u5c06\u68c0\u7d22\u4fe1\u606f\u63d0\u4f9b\u7ed9 LLM\uff0c\u751f\u6210\u56de\u7b54\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u5bf9\u4e8e\u5927\u6a21\u578b\u8fd9\u4e2a\u8003\u751f\u6765\u8bf4\uff0cRAG \u5c31\u50cf\u53c2\u8003\u4e66\u6216\u8005\u201c\u7b2c\u4e8c\u4e2a\u5927\u8111\u201d\uff0c\u8ba9\u6a21\u578b\u9047\u5230\u6ca1\u5b66\u8fc7\u6216\u8005\u5b66\u4e0d\u7262\u7684\u77e5\u8bc6\u70b9\u65f6\u53ef\u4ee5\u7ffb\u4e00\u7ffb\u4e66\u627e\u53c2\u8003\u8d44\u6599\uff0c\u63d0\u9ad8\u56de\u7b54\u95ee\u9898\u7684\u51c6\u786e\u6027\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">02 RAG \u7684\u53d1\u5c55<\/h2>\n\n\n\n<p>\u4ece\u8fd1\u5e74 RAG \u7684\u53d1\u5c55\u5386\u7a0b\u770b\uff0cRAG \u4e3b\u8981\u7ecf\u5386\u4e86 Naive RAG\u3001Advanced RAG\u3001Modular RAG\u3001Graph RAG\uff0c\u4ee5\u53ca\u6700\u8fd1\u70ed\u95e8\u7684 Agentic RAG \u51e0\u79cd\u7c7b\u578b\u7684\u53d1\u5c55\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Naive RAG<\/strong>\u00a0\u662f RAG \u6700\u57fa\u7840\u7684\u5b9e\u73b0\u3002<\/li>\n\n\n\n<li><strong>Advanced RAG<\/strong>\u00a0\u662f\u5728 Naive RAG \u7684\u57fa\u7840\u4e0a\uff0c\u5bf9\u68c0\u7d22\u524d\u3001\u68c0\u7d22\u3001\u68c0\u7d22\u540e\u5206\u522b\u8fdb\u884c\u4f18\u5316\u3002<\/li>\n\n\n\n<li><strong>Modular RAG<\/strong>\u00a0\u4ee3\u8868\u4e86\u4e3b\u6d41 RAG \u7684\u5de5\u7a0b\u5316\u5b9e\u73b0\u3002<\/li>\n\n\n\n<li><strong>Graph RAG<\/strong>\u00a0\u5229\u7528\u56fe\u68c0\u7d22\u80fd\u529b\uff0c\u8ba9 RAG \u589e\u5f3a multi-hop \u68c0\u7d22\u548c\u4e30\u5bcc\u4e0a\u4e0b\u6587\u3002<\/li>\n\n\n\n<li><strong>Agentic RAG<\/strong>\u00a0\u5229\u7528 Agent \u80fd\u529b\uff0c\u8ba9 RAG \u6709\u4e86\u667a\u80fd\u5316\u7684\u601d\u8003\u5206\u6790\uff0c\u5927\u5927\u589e\u5f3a\u4e86\u68c0\u7d22\u80fd\u529b\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 Naive RAG<\/strong><\/h3>\n\n\n\n<p>Naive RAG \u662f RAG \u7cfb\u7edf\u7684\u6700\u57fa\u672c\u5b9e\u73b0\uff0c\u4f7f\u7528\u5355\u4e00\u7684\u5168\u6587\u68c0\u7d22\u6216\u5411\u91cf\u68c0\u7d22\uff0c\u4ece\u6587\u6863\u96c6\u5408\u4e2d\u68c0\u7d22\u51fa\u4e0e query \u76f8\u5173\u7684\u6587\u6863\uff0c\u76f4\u63a5\u5c06\u68c0\u7d22\u7684\u6587\u6863\u7528\u4e8e\u589e\u5f3a LLM \u7684\u751f\u6210\u3002<\/p>\n\n\n\n<p>Naive RAG \u5177\u6709\u51e0\u4e2a\u5c40\u9650\u6027\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7f3a\u4e4f\u8bed\u4e49\u7406\u89e3\uff1a<\/strong>\u5168\u6587\u5339\u914d\u4f9d\u8d56\u8bcd\u6c47\u5339\u914d\uff0c\u65e0\u6cd5\u6355\u6349\u5230 query \u4e0e\u6587\u6863\u4e4b\u95f4\u7684\u8bed\u4e49\u5173\u8054\uff1b\u5411\u91cf\u68c0\u7d22\u53d7\u9650\u4e8e\u95f4\u63a5\u5339\u914d\uff0c\u8bed\u4e49\u7406\u89e3\u80fd\u529b\u4e5f\u4e0d\u8db3\u3002<\/li>\n\n\n\n<li><strong>\u8f93\u51fa\u6548\u679c\u5dee\uff1a<\/strong>\u7531\u4e8e\u7f3a\u4e4f\u5bf9 query\u3001\u6587\u6863\u7684\u9ad8\u7ea7\u9884\u5904\u7406\u3001\u540e\u5904\u7406\uff0c\u53ec\u56de\u7684\u6587\u6863\u5bb9\u6613\u5305\u542b\u8fc7\u591a\u6216\u8fc7\u5c11\u4fe1\u606f\uff0c\u5bfc\u81f4\u6700\u7ec8\u751f\u6210\u7684\u56de\u7b54\u8fc7\u4e8e\u5bbd\u6cdb\u3002<\/li>\n\n\n\n<li><strong>\u6548\u679c\u4f18\u5316\u56f0\u96be\uff1a<\/strong>\u7cfb\u7edf\u8fc7\u4e8e\u4f9d\u8d56\u5355\u4e00\u68c0\u7d22\u6280\u672f\uff0c\u672a\u5bf9 query\u3001\u6587\u6863\u8fdb\u884c\u589e\u5f3a\uff0c\u5bfc\u81f4\u4f18\u5316\u5c40\u9650\u4e8e\u68c0\u7d22\u6280\u672f\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"377\" src=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1-1024x377.webp\" alt=\"\" class=\"wp-image-624\" srcset=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1-1024x377.webp 1024w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1-300x110.webp 300w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1-768x283.webp 768w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1-1536x565.webp 1536w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-1.webp 1992w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 Advanced RAG<\/strong><\/h3>\n\n\n\n<p>Advanced RAG \u5728 Naive RAG \u7684\u57fa\u7840\u4e0a\uff0c<strong>\u5bf9\u68c0\u7d22\u524d\u3001\u68c0\u7d22\u3001\u68c0\u7d22\u540e\u4e09\u4e2a\u9636\u6bb5\u8fdb\u884c\u6539\u8fdb\u3002<\/strong><\/p>\n\n\n\n<p>\u5728<strong>\u68c0\u7d22\u524d<\/strong>\u9636\u6bb5\uff0c\u589e\u5f3a\u6587\u6863\u8d28\u91cf\uff0c\u6bd4\u5982\u4f18\u5316\u7ae0\u8282\u7ed3\u6784\u3001\u589e\u5f3a\u6807\u9898\u7b49\uff0c\u8fc7\u6ee4\u4f4e\u8d28\u91cf\u4fe1\u606f\uff1b\u4f18\u5316\u7d22\u5f15\u7ed3\u6784\uff0c\u4f18\u5316 chunk size \u4f7f\u5f97 context \u7c92\u5ea6\u7b26\u5408\u5e94\u7528\u573a\u666f\u7684\u9700\u6c42\uff1b\u4f18\u5316\u7d22\u5f15\u4fe1\u606f\uff0c\u5bf9 chunk \u8fdb\u884c\u63d0\u53d6\u3001\u589e\u5f3a\uff0c\u4f5c\u4e3a embedding \u6587\u672c\uff1b\u5bf9\u7528\u6237 query \u7684\u8fdb\u884c rewriting\u3002<\/p>\n\n\n\n<p>\u5728<strong>\u68c0\u7d22<\/strong>\u9636\u6bb5\uff0c\u4f7f\u7528\u57df\u5185\u77e5\u8bc6\u5bf9 embedding \u8fdb\u884c fine-tune\uff0c\u6216\u4f7f\u7528 llm-based embedding \u6a21\u578b\uff0c\u751f\u6210\u5bf9\u4e0a\u4e0b\u6587\u7406\u89e3\u66f4\u51c6\u786e\u7684\u8bed\u4e49\u5411\u91cf\u3002<\/p>\n\n\n\n<p>\u5728<strong>\u68c0\u7d22\u540e<\/strong>\u9636\u6bb5\uff0c\u589e\u52a0 reranking \u63d0\u9ad8\u68c0\u7d22\u6587\u6863\u7684\u76f8\u5173\u6027\uff0c\u589e\u52a0 context-compression \u4f7f\u63d0\u4f9b\u7ed9\u6a21\u578b\u7684\u4fe1\u606f\u66f4\u52a0\u96c6\u4e2d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"393\" src=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-2-1024x393.webp\" alt=\"\" class=\"wp-image-625\" srcset=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-2-1024x393.webp 1024w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-2-300x115.webp 300w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-2-768x295.webp 768w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-2.webp 1400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 Modular RAG<\/strong><\/h3>\n\n\n\n<p>Modular RAG \u662f\u5f53\u524d\u4e3b\u6d41\u7684 RAG \u7cfb\u7edf\u8bbe\u8ba1\uff0c\u5c06\u68c0\u7d22\u548c\u751f\u6210\u5206\u89e3\u4e3a\u72ec\u7acb\u53ef\u590d\u7528\u7684\u7ec4\u4ef6\uff0c\u4ece\u800c\u5b9e\u73b0\u7279\u5b9a\u57df\u7684\u4f18\u5316\u548c\u4efb\u52a1\u9002\u5e94\u6027\u3002Modular RAG \u5c06 RAG \u7cfb\u7edf\u6240\u4f7f\u7528\u5230\u7684\u591a\u79cd\u68c0\u7d22\u3001\u5b58\u50a8\u3001\u8def\u7531\u7b49\u7b49\u5168\u90e8\u6a21\u5757\u5316\uff0c\u5e76\u4e14\u53ef\u4ee5\u6839\u636e\u7279\u5b9a\u7684\u573a\u666f\uff0c\u5bf9\u8fd9\u4e9b\u6a21\u5757\u8fdb\u884c\u91cd\u65b0\u6392\u5217\uff0c\u5982\u591a\u79cd\u68c0\u7d22\u65b9\u5f0f\u7684\u6df7\u5408\u68c0\u7d22\u7b49\uff0c\u4ee5\u53d6\u5f97\u66f4\u597d\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"954\" src=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-3-1024x954.webp\" alt=\"\" class=\"wp-image-626\" srcset=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-3-1024x954.webp 1024w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-3-300x280.webp 300w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-3-768x716.webp 768w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-3.webp 1084w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.4 Graph RAG<\/strong><\/h3>\n\n\n\n<p>Graph RAG \u4f7f\u7528\u56fe\u7ed3\u6784\u6765\u6269\u5c55\u4f20\u7edf\u7684 RAG \u7cfb\u7edf\uff0c\u5229\u7528\u56fe\u7684\u5173\u7cfb\u548c\u5c42\u7ea7\u7ed3\u6784\uff0c\u589e\u5f3a multi-hop \u63a8\u7406\u548c context \u4e30\u5bcc\u5ea6\u3002Graph RAG \u53ef\u4ee5\u751f\u6210\u7684\u7ed3\u679c\u66f4\u4e30\u5bcc\u66f4\u51c6\u786e\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u9700\u8981\u5173\u7cfb\u7406\u89e3\u7684\u4efb\u52a1\u3002<\/p>\n\n\n\n<p>Graph RAG \u5177\u5907\u4ee5\u4e0b\u5c40\u9650\u6027\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9ad8\u8d28\u91cf\u56fe\u6570\u636e\u4f9d\u8d56\uff1a<\/strong>\u9ad8\u8d28\u91cf\u7684\u56fe\u6570\u636e\u5bf9 Graph RAG \u975e\u5e38\u5173\u952e\uff0c\u5982\u679c\u5904\u7406\u51fa\u9ad8\u8d28\u91cf\u7684\u56fe\u6570\u636e\u6709\u65f6\u5f88\u56f0\u96be\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u65e0\u7ed3\u6784\u7684\u7eaf\u6587\u672c\u6216\u6807\u6ce8\u8d28\u91cf\u4e0d\u9ad8\u7684\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u5e94\u7528\u7684\u590d\u6742\u6027\uff1a<\/strong>\u5bf9\u4e8e\u4e00\u4e2a RAG \u7cfb\u7edf\uff0c\u540c\u65f6\u652f\u6301\u975e\u7ed3\u6784\u5316\u6570\u636e\u548c\u56fe\u6570\u636e\u7684\u6df7\u5408\u68c0\u7d22\uff0c\u4f1a\u589e\u52a0\u68c0\u7d22\u7cfb\u7edf\u8bbe\u8ba1\u548c\u5b9e\u73b0\u7684\u590d\u6742\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"563\" src=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-4-1024x563.webp\" alt=\"\" class=\"wp-image-627\" srcset=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-4-1024x563.webp 1024w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-4-300x165.webp 300w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-4-768x422.webp 768w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-4-1536x845.webp 1536w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-4.webp 1804w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.5 Agentic RAG<\/strong><\/h3>\n\n\n\n<p>\u4e0e\u524d\u9762\u7684\u9759\u6001 RAG \u4e0d\u540c\uff0c<strong>Agentic RAG \u4f7f\u7528\u80fd\u591f\u52a8\u6001\u51b3\u7b56\u548c\u5de5\u5177\u8c03\u7528\u7684 LLM-based agent\uff0c\u6765\u89e3\u51b3\u66f4\u52a0\u590d\u6742\u3001\u5b9e\u65f6\u548c\u591a\u57df\u7684\u67e5\u8be2\u3002<\/strong><\/p>\n\n\n\n<p>\u5f97\u52a9\u4e8e LLM-based \u7684\u5de5\u5177\u8c03\u7528\u80fd\u529b\uff0c<strong>Agentic RAG \u80fd\u591f\u4f7f\u7528\u66f4\u591a\u66f4\u590d\u6742\u7684\u5de5\u5177\u6765\u8f85\u52a9\u68c0\u7d22\uff0c<\/strong>\u6bd4\u5982\u641c\u7d22\u5f15\u64ce\u3001\u8ba1\u7b97\u5668\u7b49\u5404\u7c7b\u4ee5 API \u5f62\u5f0f\u80fd\u591f\u8bbf\u95ee\u7684\u5de5\u5177\u3002\u53e6\u5916&nbsp;<strong>Agentic RAG \u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u7684\u68c0\u7d22\u573a\u666f\u52a8\u6001\u51b3\u7b56\uff0c<\/strong>\u6bd4\u5982\u51b3\u5b9a\u662f\u5426\u8fdb\u884c\u68c0\u7d22\u3001\u51b3\u5b9a\u4f7f\u7528\u4ec0\u4e48\u5de5\u5177\u68c0\u7d22\u3001\u8bc4\u4f30\u68c0\u7d22\u5230\u7684\u4e0a\u4e0b\u6587\u51b3\u5b9a\u662f\u5426\u9700\u8981\u7ee7\u7eed\u68c0\u7d22\u7b49\u7b49\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"539\" src=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-5-1024x539.webp\" alt=\"\" class=\"wp-image-628\" srcset=\"https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-5-1024x539.webp 1024w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-5-300x158.webp 300w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-5-768x404.webp 768w, https:\/\/znl.pub\/wp-content\/uploads\/2025\/04\/\u65e0\u6807\u9898-5.webp 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">03 \u603b\u7ed3<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>RAG<\/td><td>\u7279\u70b9<\/td><td>\u4f18\u70b9<\/td><\/tr><tr><td>Naive RAG<\/td><td>&#8211; \u5355\u4e00\u7d22\u5f15\uff0c\u5982TF-IDF\u3001BM25\u3001\u5411\u91cf\u68c0\u7d22<\/td><td>&#8211; \u7b80\u5355\uff0c\u6613\u4e8e\u5b9e\u73b0<br>&#8211; \u7f13\u89e3\u6a21\u578b\u5e7b\u89c9<\/td><\/tr><tr><td>Advanced RAG<\/td><td>&#8211; \u6587\u6863\u589e\u5f3a<br>&#8211; \u7d22\u5f15\u4f18\u5316<br>&#8211; query\u91cd\u5199<br>&#8211; reranking<\/td><td>&#8211; \u66f4\u51c6\u786e\u7684\u68c0\u7d22<br>&#8211; \u589e\u5f3a\u68c0\u7d22\u76f8\u5173\u6027<\/td><\/tr><tr><td>Modular RAG<\/td><td>&#8211; \u6df7\u5408\u68c0\u7d22<br>&#8211; \u5de5\u5177\u3001API\u96c6\u6210<br>&#8211; \u6a21\u5757\u5316\u3001\u5de5\u7a0b\u5316\u7684\u5b9e\u73b0<\/td><td>&#8211; \u66f4\u5f3a\u7684\u7075\u6d3b\u6027<br>&#8211; \u9002\u5e94\u66f4\u591a\u5143\u7684\u573a\u666f<\/td><\/tr><tr><td>Graph RAG<\/td><td>&#8211; \u56fe\u7ed3\u6784\u7d22\u5f15<br>&#8211; multi-hop\u63a8\u7406<br>&#8211; \u57fa\u4e8e\u56fe\u8282\u70b9\u7684\u4e0a\u4e0b\u6587\u5185\u5bb9\u589e\u5f3a<\/td><td>&#8211; \u5173\u7cfb\u63a8\u7406\u80fd\u529b<br>&#8211; \u9002\u5408\u7ed3\u6784\u5316\u6570\u636e<\/td><\/tr><tr><td>Agentic RAG<\/td><td>&#8211; \u4f7f\u7528LLM-based agents<br>&#8211; \u52a8\u6001\u51b3\u7b56\u3001\u68c0\u7d22<br>&#8211; \u81ea\u52a8\u6d41\u7a0b\u4f18\u5316<\/td><td>&#8211; \u66f4\u9ad8\u7684\u68c0\u7d22\u51c6\u786e\u6027<br>&#8211; \u9002\u5408\u66f4\u590d\u6742\u3001\u66f4\u591a\u57df\u7684\u4efb\u52a1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4ece RAG \u8fd1\u5e74\u6765\u7684\u53d1\u5c55\u7684\u6765\uff0c\u672a\u6765 RAG \u7684\u53d1\u5c55\u6709\u51e0\u4e2a\u65b9\u5411\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u667a\u80fd\u5316\uff1a<\/strong>\u968f\u7740 LLM \u5e94\u7528\u7684\u53d1\u5c55\uff0c\u529f\u80fd\u8d8a\u6765\u8d8a\u590d\u6742\uff0c\u5bf9 RAG \u7684\u8981\u6c42\u4e5f\u4f1a\u8d8a\u6765\u8d8a\u9ad8\u3002Agentic RAG \u662f\u8fd9\u4e2a\u65b9\u5411\u7684\u5f00\u59cb\uff0c\u672a\u6765\u66f4\u52a0\u667a\u80fd\u7684 RAG \u624d\u80fd\u6210\u4e3a LLM \u7684\u201c\u597d\u642d\u6863\u201d\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u591a\u5143\u5316\uff1a<\/strong>Graph RAG \u8ba9 RAG \u6709\u4e86\u56fe\u68c0\u7d22\u7684\u80fd\u529b\uff0c\u4f46\u662f\u5982\u4f55\u5c06\u666e\u901a\u6587\u672c\u3001\u56fe\u6570\u636e\uff0c\u4ee5\u53ca\u5176\u4ed6\u7c7b\u578b\u7684\u6570\u636e\u6bd4\u5982\u4ee3\u7801\u3001\u56fe\u7247\u7b49\u7b49\u591a\u5143\u5316\u7684\u6570\u636e\uff0c\u517c\u5bb9\u5230\u4e00\u4e2a\u7edf\u4e00\u7684 RAG \u7cfb\u7edf\u91cc\u8fdb\u884c\u7d22\u5f15\u3001\u68c0\u7d22\u3001\u6392\u5e8f\uff0c\u672a\u6765\u590d\u6742 LLM \u5e94\u7528\u5c06\u4f1a\u5bf9\u8fd9\u4e2a\u80fd\u529b\u63d0\u51fa\u6311\u6218\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>RAG\uff0c\u5168\u79f0\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff08Retrieval-Augmented Generation\uff09\uff0c\u4f5c\u4e3a\u5f53\u524d AI \u5e94\u7528\u4e2d\u5e38\u89c1\u7684\u8f85\u52a9\u65b9\u6cd5\uff0c\u6709\u6548\u63d0\u5347\u4e86 LLM \u8f93\u51fa\u7684\u51c6\u786e\u6027\u548c\u53ef\u9760\u6027\u3002\u4f46\u603b\u6709\u4eba\u620f\u8a00\uff0cRAG \u4e0d\u8fc7\u662f\u201c\u628a\u6587\u6863\u4e22\u8fdb Dify\u201d\u8fd9\u4e48\u7b80\u5355\uff0c\u771f\u7684\u5417\uff1f<\/p>\n<p>\u5173\u4e8e RAG \u7684\u6280\u672f\u6d41\u7a0b\uff0c\u7f51\u4e0a\u5df2\u7ecf\u6709\u975e\u5e38\u591a\u9ad8\u8d28\u91cf\u7684\u6587\u7ae0\u4ecb\u7ecd\uff0c\u56e0\u6b64\u7b14\u8005\u60f3\u4ece RAG \u7684\u6280\u672f\u53d1\u5c55\u89d2\u5ea6\u6765\u5199\u8fd9\u7bc7\u6587\u7ae0\uff0c\u4ece\u6700\u57fa\u672c\u7684 RAG \u5230\u5f53\u524d\u70ed\u95e8\u7684 Graph RAG\u3001Agentic RAG\uff0c\u4ecb\u7ecd RAG \u7684\u4e0d\u540c\u7c7b\u578b\u548c\u533a\u522b\uff0c\u5e0c\u671b\u5927\u5bb6\u80fd\u591f\u4ece\u6587\u4e2d\u53d7\u76ca\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-622","post","type-post","status-publish","format-standard","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/znl.pub\/index.php?rest_route=\/wp\/v2\/posts\/622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/znl.pub\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/znl.pub\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/znl.pub\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/znl.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=622"}],"version-history":[{"count":1,"href":"https:\/\/znl.pub\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions"}],"predecessor-version":[{"id":629,"href":"https:\/\/znl.pub\/index.php?rest_route=\/wp\/v2\/posts\/622\/revisions\/629"}],"wp:attachment":[{"href":"https:\/\/znl.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/znl.pub\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/znl.pub\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}