
{"id":4730,"date":"2025-02-21T19:59:45","date_gmt":"2025-02-21T11:59:45","guid":{"rendered":"https:\/\/infernews.com\/?page_id=4730"},"modified":"2025-08-29T16:38:38","modified_gmt":"2025-08-29T08:38:38","slug":"rag","status":"publish","type":"page","link":"https:\/\/infernews.com\/blog\/rag\/","title":{"rendered":"\u6aa2\u7d22\u589e\u5f37\u751f\u6210 RAG 101"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img data-dominant-color=\"c1bde3\" data-has-transparency=\"false\" style=\"--dominant-color: #c1bde3;\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"\/blog\/wp-content\/uploads\/2025\/07\/embedding.jpg\" alt=\"\" class=\"wp-image-5965 not-transparent\" srcset=\"https:\/\/infernews.com\/blog\/wp-content\/uploads\/2025\/07\/embedding.jpg 1024w, https:\/\/infernews.com\/blog\/wp-content\/uploads\/2025\/07\/embedding-300x110.jpg 300w, https:\/\/infernews.com\/blog\/wp-content\/uploads\/2025\/07\/embedding-768x281.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>\u5728\u5feb\u901f\u767c\u5c55\u7684\u4eba\u5de5\u667a\u6167\u9818\u57df\u4e2d\uff0c\u6aa2\u7d22\u589e\u5f37\u751f\u6210 (Retrieval-Augmented Generation, RAG) \u5df2\u6210\u70ba\u4e00\u9805\u63d0\u5347\u5927\u578b\u8a9e\u8a00\u6a21\u578b (LLM)\u80fd\u529b\u7684\u95dc\u9375\u6280\u8853\u3002RAG \u7684\u6838\u5fc3\u5728\u65bc\u89e3\u6c7a\u4e86 LLM \u7684\u4e00\u500b\u6839\u672c\u9650\u5236\uff1a\u5b83\u5011\u7684\u77e5\u8b58\u88ab\u51cd\u7d50\u5728\u6700\u5f8c\u4e00\u6b21\u8a13\u7df4\u7684\u6642\u9593\u9ede\u3002RAG \u900f\u904e\u5728\u63d0\u793a\u904e\u7a0b\u4e2d\u52d5\u614b\u6ce8\u5165\u76f8\u95dc\u7684\u5916\u90e8\u8cc7\u8a0a\u4f86\u898f\u907f\u9019\u500b\u554f\u984c\u3002\u9019\u662f\u900f\u904e\u5411\u91cf\u5316 (vectorization) \u548c\u4e0a\u4e0b\u6587\u6574\u5408 (context integration) \u7684\u8907\u96dc\u76f8\u4e92\u4f5c\u7528\u4f86\u5be6\u73fe\u7684\uff0c\u6700\u7d42\u70ba LLM \u63d0\u4f9b\u5fc5\u8981\u7684\u8cc7\u6599\uff0c\u4ee5\u751f\u6210\u66f4\u6e96\u78ba\u3001\u53ca\u6642\u4e14\u7b26\u5408\u4e0a\u4e0b\u6587\u7684\u56de\u61c9\u3002<\/strong><\/p>\n\n\n\n<p>RAG \u7684\u795e\u5947\u4e4b\u8655\u5728\u65bc\u5b83\u80fd\u5920\u5c07\u60a8\u7684\u539f\u59cb\u67e5\u8a62\u8207\u5f9e\u77e5\u8b58\u5eab\u4e2d\u7372\u53d6\u7684\u8cc7\u8a0a\u7121\u7e2b\u5730\u878d\u5408\u5728\u4e00\u8d77\u3002\u9019\u500b\u904e\u7a0b\u53ef\u4ee5\u5206\u70ba\u5169\u500b\u95dc\u9375\u968e\u6bb5\uff1a\u6aa2\u7d22 (retrieval) \u548c\u751f\u6210 (generation)\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6aa2\u7d22\u968e\u6bb5\uff1a\u5c07\u63d0\u793a\u5411\u91cf\u5316\u4ee5\u9032\u884c\u7cbe\u6e96\u641c\u7d22<\/h3>\n\n\n\n<p>\u8207\u4e00\u500b\u5e38\u898b\u7684\u8aa4\u89e3\u76f8\u53cd\uff0c\u5728 RAG \u67b6\u69cb\u4e2d\uff0c\u60a8\u7684\u539f\u59cb\u6587\u672c\u63d0\u793a\u4e26\u4e0d\u6703\u76f4\u63a5\u88ab\u9001\u5230 LLM\u3002\u76f8\u53cd\u5730\uff0c\u5b83\u6703\u5148\u9032\u884c\u4e00\u500b\u81f3\u95dc\u91cd\u8981\u7684\u7b2c\u4e00\u6b65\uff1a<strong>\u5411\u91cf\u5316<\/strong>\u3002<\/p>\n\n\n\n<p>\u60a8\u7684\u63d0\u793a\u6216\u67e5\u8a62\u6703\u88ab\u8f49\u63db\u6210\u4e00\u7a2e\u7a31\u70ba\u300c\u5411\u91cf\u5d4c\u5165\u300d(vector embedding) \u7684\u6578\u503c\u8868\u793a\u3002\u9019\u662f\u900f\u904e\u4e00\u500b\u80fd\u5920\u6355\u6349\u60a8\u6587\u5b57\u80cc\u5f8c\u8a9e\u7fa9\u548c\u610f\u5716\u7684\u5d4c\u5165\u6a21\u578b (embedding model) \u4f86\u5b8c\u6210\u7684\u3002\u9019\u500b\u5411\u91cf\u5c31\u50cf\u4e00\u500b\u8907\u96dc\u7684\u641c\u7d22\u67e5\u8a62\uff0c\u4f7f RAG \u7cfb\u7d71\u80fd\u5920\u5728\u4e00\u500b\u9810\u5148\u7d22\u5f15\u597d\u7684\u5411\u91cf\u8cc7\u6599\u5eab\u4e2d\u9032\u884c\u7be9\u9078\u3002<\/p>\n\n\n\n<p>\u9019\u500b\u5411\u91cf\u8cc7\u6599\u5eab\u5305\u542b\u4e86\u4f86\u81ea\u60a8\u6307\u5b9a\u77e5\u8b58\u4f86\u6e90\uff08\u4f8b\u5982\uff0c\u516c\u53f8\u6587\u4ef6\u3001\u7db2\u7ad9\u5167\u5bb9\u6216\u4e00\u7d44\u7cbe\u9078\u6587\u7ae0\uff09\u7684\u8cc7\u8a0a\u7247\u6bb5\u3002\u9019\u4e9b\u7247\u6bb5\u4e2d\u7684\u6bcf\u4e00\u500b\u4e5f\u90fd\u5df2\u7d93\u88ab\u9810\u5148\u5411\u91cf\u5316\u3002\u900f\u904e\u6bd4\u8f03\u60a8\u7684\u63d0\u793a\u5411\u91cf\u8207\u8cc7\u6599\u5eab\u4e2d\u7684\u5411\u91cf\uff0c\u7cfb\u7d71\u53ef\u4ee5\u8b58\u5225\u4e26\u6aa2\u7d22\u51fa\u8a9e\u7fa9\u4e0a\u6700\u76f8\u4f3c\u548c\u6700\u76f8\u95dc\u7684\u8cc7\u8a0a\u7247\u6bb5\u3002\u9019\u500b\u904e\u7a0b\u985e\u4f3c\u65bc\u4e00\u500b\u9ad8\u5ea6\u667a\u80fd\u7684\u641c\u5c0b\u5f15\u64ce\uff0c\u5b83\u80fd\u7406\u89e3\u60a8\u67e5\u8a62\u7684\u300c\u610f\u7fa9\u300d\uff0c\u800c\u4e0d\u50c5\u50c5\u662f\u95dc\u9375\u5b57\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u751f\u6210\u968e\u6bb5\uff1a\u70ba LLM \u7cbe\u5fc3\u6253\u9020\u6700\u7d42\u63d0\u793a<\/h3>\n\n\n\n<p>\u4e00\u65e6\u6aa2\u7d22\u5230\u6700\u76f8\u95dc\u7684\u8cc7\u8a0a\u7247\u6bb5\uff0cRAG \u7cfb\u7d71\u7684\u4e0b\u4e00\u500b\u4efb\u52d9\u5c31\u662f\u5de7\u5999\u5730\u5c07\u5b83\u5011\u8207\u60a8\u7684\u539f\u59cb\u63d0\u793a\u7d50\u5408\u8d77\u4f86\u3002\u9019\u500b\u65b0\u5f62\u6210\u7684\u3001\u7d93\u904e\u589e\u5f37\u7684\u63d0\u793a\uff0c\u63a5\u8457\u6703\u88ab\u9001\u5230 LLM \u9032\u884c\u8655\u7406\u3002<\/p>\n\n\n\n<p>\u7d50\u5408\u7684\u65b9\u6cd5\u6703\u6839\u64da\u5177\u9ad4\u7684\u5be6\u4f5c\u65b9\u5f0f\u548c RAG \u8a2d\u7f6e\u7684\u8907\u96dc\u6027\u800c\u6709\u6240\u4e0d\u540c\u3002\u5728\u4e00\u7a2e\u5e38\u898b\u7684\u65b9\u6cd5\u4e2d\uff0c\u5373\u6240\u8b02\u7684\u300c\u6a38\u7d20 RAG\u300d(Naive RAG)\uff0c\u6aa2\u7d22\u5230\u7684\u6587\u4ef6\u6703\u8207\u60a8\u7684\u539f\u59cb\u63d0\u793a\u4e32\u63a5\u5728\u4e00\u8d77\uff0c\u901a\u5e38\u6703\u4f7f\u7528\u6e05\u6670\u7684\u5206\u9694\u7b26\u4f86\u5340\u5206\u7528\u6236\u7684\u67e5\u8a62\u548c\u63d0\u4f9b\u7684\u4e0a\u4e0b\u6587\u3002<\/p>\n\n\n\n<p>\u66f4\u5148\u9032\u7684 RAG \u5be6\u4f5c\uff0c\u6709\u6642\u88ab\u7a31\u70ba\u300c\u9032\u968e RAG\u300d(Advanced RAG) \u6216\u300c\u6a21\u7d44\u5316 RAG\u300d(Modular RAG)\uff0c\u53ef\u80fd\u6703\u63a1\u7528\u66f4\u8907\u96dc\u7684\u6280\u8853\u3002\u9019\u4e9b\u6280\u8853\u53ef\u4ee5\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u63d0\u793a\u6a21\u677f (Prompt Templating):<\/strong> \u4f7f\u7528\u9810\u5148\u5b9a\u7fa9\u7684\u7d50\u69cb\u4f86\u7d44\u7e54\u539f\u59cb\u63d0\u793a\u548c\u6aa2\u7d22\u5230\u7684\u4e0a\u4e0b\u6587\uff0c\u4f7f\u5176\u9054\u5230 LLM \u6700\u5bb9\u6613\u7406\u89e3\u548c\u5229\u7528\u7684\u6700\u4f73\u72c0\u614b\u3002<\/li>\n\n\n\n<li><strong>\u6458\u8981\u6216\u63d0\u53d6 (Summarization or Extraction):<\/strong> \u7cfb\u7d71\u53ef\u80fd\u6703\u5148\u5c07\u6aa2\u7d22\u5230\u7684\u6587\u4ef6\u9032\u884c\u6458\u8981\u6216\u63d0\u53d6\u51fa\u6700\u986f\u8457\u7684\u8981\u9ede\uff0c\u7136\u5f8c\u518d\u5c07\u5b83\u5011\u6574\u5408\u5230\u63d0\u793a\u4e2d\u3002\u9019\u6709\u52a9\u65bc\u7ba1\u7406 LLM \u7684\u4e0a\u4e0b\u6587\u8996\u7a97 (context window) \u4e26\u66f4\u7c21\u6f54\u5730\u5448\u73fe\u8cc7\u8a0a\u3002<\/li>\n\n\n\n<li><strong>\u91cd\u65b0\u6392\u5e8f (Re-ranking):<\/strong> \u5728\u521d\u6b65\u6aa2\u7d22\u4e4b\u5f8c\uff0c\u53ef\u80fd\u6703\u4f7f\u7528\u4e00\u500b\u91cd\u65b0\u6392\u5e8f\u6a21\u578b\u4f86\u9032\u4e00\u6b65\u512a\u5316\u6aa2\u7d22\u6587\u4ef6\u7684\u9806\u5e8f\uff0c\u5c07\u6700\u76f8\u95dc\u7684\u6587\u4ef6\u653e\u5728\u63d0\u4f9b\u7d66 LLM \u7684\u4e0a\u4e0b\u6587\u7684\u6700\u524d\u9762\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u6700\u7d42\uff0c\u76ee\u6a19\u662f\u70ba LLM \u63d0\u4f9b\u4e00\u500b\u8c50\u5bcc\u7684\u3001\u60c5\u5883\u5316\u7684\u8f38\u5165\uff0c\u5176\u4e2d\u65e2\u5305\u542b\u60a8\u7684\u76f4\u63a5\u554f\u984c\uff0c\u4e5f\u5305\u542b\u56de\u7b54\u8a72\u554f\u984c\u6240\u9700\u7684\u80cc\u666f\u8cc7\u8a0a\u3002LLM \u63a5\u8457\u6703\u5229\u7528\u9019\u500b\u589e\u5f37\u5f8c\u7684\u63d0\u793a\u4f86\u751f\u6210\u5176\u6700\u7d42\u56de\u61c9\uff0c\u4e26\u53c3\u8003\u65b0\u63d0\u4f9b\u7684\u77e5\u8b58\u3002<\/p>\n\n\n\n<p>\u5f9e\u672c\u8cea\u4e0a\u8b1b\uff0cRAG \u5c31\u50cf\u4e00\u5ea7\u5f37\u5927\u7684\u6a4b\u6a11\uff0c\u9023\u63a5\u4e86 LLM \u7684\u975c\u614b\u77e5\u8b58\u548c\u5916\u90e8\u8cc7\u8a0a\u7684\u52d5\u614b\u4e16\u754c\u3002\u900f\u904e\u5c07\u60a8\u7684\u63d0\u793a\u5411\u91cf\u5316\u4ee5\u627e\u5230\u6b63\u78ba\u7684\u8cc7\u6599\uff0c\u7136\u5f8c\u518d\u5c07\u9019\u4e9b\u8cc7\u6599\u667a\u6167\u5730\u878d\u5165\u767c\u9001\u7d66 LLM \u7684\u63d0\u793a\u4e2d\uff0cRAG \u89e3\u9396\u4e86\u66f4\u9ad8\u5c64\u6b21\u7684\u6027\u80fd\uff0c\u4f7f AI \u4e92\u52d5\u66f4\u5177\u4e8b\u5be6\u6027\u3001\u76f8\u95dc\u6027\u548c\u5be6\u7528\u6027\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-text-align-center\">Embedding Model \u8207\u666e\u901a\u7684 LLM \u7684\u5206\u5225<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\u89d2\u8272<\/td><td>Embedding Model <br>(\u5d4c\u5165\u6a21\u578b)<\/td><td>\u4e00\u822c LLM <br>(\u5927\u578b\u8a9e\u8a00\u6a21\u578b)<\/td><\/tr><tr><td>\u6bd4\u55bb<\/td><td>\u5716\u66f8\u9928\u7684\u300c\u9996\u5e2d\u7de8\u76ee\u54e1\u300d<\/td><td>\u77e5\u8b58\u6df5\u535a\u7684\u300c\u9996\u5e2d\u79d1\u5b78\u5bb6\u300d<\/td><\/tr><tr><td>\u4e3b\u8981\u5de5\u4f5c<\/td><td>\u95b1\u8b80\u6bcf\u4e00\u672c\u66f8<br>\u6df1\u523b\u7406\u89e3\u5176\u5167\u5bb9\u3001<br>\u4e3b\u984c\u8207\u8a9e\u6c23\uff0c<br>\u7136\u5f8c\u70ba\u5176\u5206\u914d\u4e00\u500b<br>\u7368\u4e00\u7121\u4e8c\u4e14\u7cbe\u78ba\u7684\u66f8\u67b6\u7de8\u865f\uff08\u5411\u91cf\uff09<\/td><td>\u63a5\u6536\u4e00\u500b\u7814\u7a76\u554f\u984c<br>\uff08\u63d0\u793a\uff09\uff0c\u5e6b\u4f60<br>\u627e\u4f86\u5e7e\u672c\u76f8\u95dc\u66f8\u7c4d<br>\uff08\u6aa2\u7d22\u5230\u7684\u6587\u672c\uff09\uff0c\u7136\u5f8c\u64b0\u5beb\u4e00\u7bc7\u5168\u65b0\u7684\u3001<br>\u6709\u689d\u7406\u7684\u5b78\u8853\u5831\u544a<br>\uff08\u751f\u6210\u7684\u7b54\u6848\uff09<\/td><\/tr><tr><td>\u6838\u5fc3\u80fd\u529b<\/td><td>\u5c07\u8907\u96dc\u7684\u4eba\u985e\u8a9e\u8a00\u8f49\u63db\u6210<br>\u6a5f\u5668\u53ef\u4ee5<br>\u8a08\u7b97\u548c\u6bd4\u8f03\u7684\u6578\u5b78\u5ea7\u6a19<\/td><td>\u6839\u64da\u88ab\u8ce6\u4e88\u7684\u8cc7\u6599\u548c\u81ea\u8eab<br>\u9f90\u5927\u7684\u77e5\u8b58\u5eab\uff0c\u9032\u884c\u63a8\u7406\u3001<br>\u7e3d\u7d50\u3001\u4e26\u5275\u9020\u51fa\u65b0\u7684\u6587\u5b57<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"lyte-wrapper\" title=\"\u5192\u6b7b\u4e0a\u4f20\uff01\u5df2\u7ecf\u66ff\u5927\u5bb6\u4ed8\u8d39\u4e86\uff0c\u82b119980\u4e70\u7684AI\u5927\u6a21\u578bRAG\u7cfb\u7edf\u6559\u7a0b\uff0c\u903c\u81ea\u5df1\u4e00\u5468\u5b66\u5b8c\u56fd\u4ea7\u6700\u5f3aAI\u5927\u6a21\u578b\uff0c\u4e03\u5929\u5c31\u80fd\u4ece\u5c0f\u767d\u5230\u5927\u795e\uff01\" style=\"width:853px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_0PpN_iWMPps\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><div><meta itemprop=\"thumbnailUrl\" content=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0PpN_iWMPps%2Fhqdefault.jpg\" \/><meta itemprop=\"embedURL\" content=\"https:\/\/www.youtube.com\/embed\/0PpN_iWMPps\" \/><meta itemprop=\"duration\" content=\"PT1H45M22S\" \/><meta itemprop=\"uploadDate\" content=\"2025-08-25T02:01:40Z\" \/><\/div><div id=\"lyte_0PpN_iWMPps\" data-src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0PpN_iWMPps%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\" itemprop=\"name\">\u5192\u6b7b\u4e0a\u4f20\uff01\u5df2\u7ecf\u66ff\u5927\u5bb6\u4ed8\u8d39\u4e86\uff0c\u82b119980\u4e70\u7684AI\u5927\u6a21\u578bRAG\u7cfb\u7edf\u6559\u7a0b\uff0c\u903c\u81ea\u5df1\u4e00\u5468\u5b66\u5b8c\u56fd\u4ea7\u6700\u5f3aAI\u5927\u6a21\u578b\uff0c\u4e03\u5929\u5c31\u80fd\u4ece\u5c0f\u767d\u5230\u5927\u795e\uff01<\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/0PpN_iWMPps\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0PpN_iWMPps%2F0.jpg\" alt=\"\u5192\u6b7b\u4e0a\u4f20\uff01\u5df2\u7ecf\u66ff\u5927\u5bb6\u4ed8\u8d39\u4e86\uff0c\u82b119980\u4e70\u7684AI\u5927\u6a21\u578bRAG\u7cfb\u7edf\u6559\u7a0b\uff0c\u903c\u81ea\u5df1\u4e00\u5468\u5b66\u5b8c\u56fd\u4ea7\u6700\u5f3aAI\u5927\u6a21\u578b\uff0c\u4e03\u5929\u5c31\u80fd\u4ece\u5c0f\u767d\u5230\u5927\u795e\uff01\" width=\"853\" height=\"460\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><meta itemprop=\"description\" content=\"https:\/\/youtu.be\/R9wf58T3b8M?si=eQukTg1ylpo_Flpe\"><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:853px;margin:5px auto;\"><\/div><figcaption><\/figcaption><\/figure>\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"lyte-wrapper\" title=\"\u4ece\u96f6\u5199AI RAG \u4e2a\u4eba\u77e5\u8bc6\u5e93\" style=\"width:853px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_329G_4vJveU\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><div><meta itemprop=\"thumbnailUrl\" content=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F329G_4vJveU%2Fhqdefault.jpg\" \/><meta itemprop=\"embedURL\" content=\"https:\/\/www.youtube.com\/embed\/329G_4vJveU\" \/><meta itemprop=\"duration\" content=\"PT15M3S\" \/><meta itemprop=\"uploadDate\" content=\"2025-05-29T09:00:08Z\" \/><\/div><meta itemprop=\"accessibilityFeature\" content=\"captions\" \/><div id=\"lyte_329G_4vJveU\" data-src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F329G_4vJveU%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\" itemprop=\"name\">\u4ece\u96f6\u5199AI RAG \u4e2a\u4eba\u77e5\u8bc6\u5e93<\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/329G_4vJveU\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F329G_4vJveU%2F0.jpg\" alt=\"\u4ece\u96f6\u5199AI RAG \u4e2a\u4eba\u77e5\u8bc6\u5e93\" width=\"853\" height=\"460\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><meta itemprop=\"description\" content=\"\u4e00\u770b\u5c31\u61c2\u7684RAG\u77e5\u8bc6 https:\/\/www.youtube.com\/watch?v=qMc0v2OUK3s \u5173\u4e8e\u4ee4\u72d0\u51b2\u8f6c\u751f\u4e3a\u53f2\u83b1\u59c6\u5e76\u5bf9\u4e16\u754c\u732e\u4e0a\u4e86\u7f8e\u597d\u7684\u708e\u7206\u8fd9\u4ef6\u4e8b https:\/\/gist.github.com\/cradiator\/7fc01879115f993446ad9aa67859204b \u793a\u4f8b\u7a0b\u5e8f https:\/\/gist.github.com\/cradiator\/90e4a14797f74efda7559c80db5c2d45 RecursiveCharacterTextSplitter https:\/\/python.langchain.com\/api_reference\/text_splitters\/character\/langchain_text_splitters.character.RecursiveCharacterTextSplitter.html Gemini Embedding Doc https:\/\/ai.google.dev\/gemini-api\/docs\/embeddings \u65f6\u95f4\u8f74 00:00:00 \u4ecb\u7ecd 00:01:14 Chunking 00:03:58 Embedding 00:08:27 Store 00:10:47 Query 00:12:40 LLM\"><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:853px;margin:5px auto;\"><\/div><figcaption><\/figcaption><\/figure>\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"lyte-wrapper\" title=\"AI\u77e5\u8bc6\u5e93RAG\u6280\u672f\u539f\u7406\uff0c\u4e09\u5927\u75db\u70b9\uff0c\u4e0e\u8fdb\u9636\u65b9\u6848\u3010\u4e0d\u7528\u7f16\u7a0b\u3011#ai #MCP#\u79d1\u6280 #\u8ba1\u7b97\u673a\" style=\"width:853px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_p1AwNrOWTRQ\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><div><meta itemprop=\"thumbnailUrl\" content=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp1AwNrOWTRQ%2Fhqdefault.jpg\" \/><meta itemprop=\"embedURL\" content=\"https:\/\/www.youtube.com\/embed\/p1AwNrOWTRQ\" \/><meta itemprop=\"duration\" content=\"PT11M33S\" \/><meta itemprop=\"uploadDate\" content=\"2025-04-15T11:35:54Z\" \/><\/div><div id=\"lyte_p1AwNrOWTRQ\" data-src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp1AwNrOWTRQ%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\" itemprop=\"name\">AI\u77e5\u8bc6\u5e93RAG\u6280\u672f\u539f\u7406\uff0c\u4e09\u5927\u75db\u70b9\uff0c\u4e0e\u8fdb\u9636\u65b9\u6848\u3010\u4e0d\u7528\u7f16\u7a0b\u3011#ai #MCP#\u79d1\u6280 #\u8ba1\u7b97\u673a<\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/p1AwNrOWTRQ\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fp1AwNrOWTRQ%2F0.jpg\" alt=\"AI\u77e5\u8bc6\u5e93RAG\u6280\u672f\u539f\u7406\uff0c\u4e09\u5927\u75db\u70b9\uff0c\u4e0e\u8fdb\u9636\u65b9\u6848\u3010\u4e0d\u7528\u7f16\u7a0b\u3011#ai #MCP#\u79d1\u6280 #\u8ba1\u7b97\u673a\" width=\"853\" height=\"460\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><meta itemprop=\"description\" content=\"\u4f1a\u5458\u9891\u9053\u6709\u81ea\u5236\u8bfe\u7a0b\u300a\u5c0f\u767d\u73a9\u8f6cGit\/Github\uff0c\u5168\u529f\u80fd\u7cbe\u8bb2\u300b \u5f88\u591a\u4eba\u60f3\u8c61\u7684AI\u77e5\u8bc6\u5e93\uff0c\u5c31\u662f\u628a\u6240\u6709\u7684\u8d44\u6599\u4e00\u80a1\u8111\u62d6\u8fdbAI\u5ba2\u6237\u7aef\uff0c\u6bd4\u5982cherry studio\u91cc\u9762\uff0c\u7136\u540eAI\u5c31\u80fd\u628a\u91cc\u9762\u7684\u5185\u5bb9\u5168\u90e8\u8ba4\u771f\u8bfb\u4e00\u904d\uff0c\u7efc\u5408\u5206\u6790\u601d\u8003\uff0c\u6700\u540e\u751f\u6210\u4e00\u4e2a\u5b8c\u7f8e\u7ed3\u8bba\u3002 \u7136\u800c\u5b9e\u9645\u4f53\u9a8c\u4e86\u4ee5\u540e\uff0c\u5f88\u591a\u4eba\u53d1\u73b0AI\u77e5\u8bc6\u5e93\u6548\u679c\u5e76\u6ca1\u6709\u60f3\u8c61\u90a3\u4e48\u597d\uff0c\u603b\u662f\u9047\u5230\u5404\u79cd\u5947\u602a\u95ee\u9898\u3002\u672c\u671f\u89c6\u9891\u6211\u4eec\u4ece\u77e5\u8bc6\u5e93\u7684\u539f\u7406\u51fa\u53d1\uff0c\u63a2\u8ba8\u4e0bAI\u77e5\u8bc6\u5e93\u7684\u6280\u672f\u5c40\u9650\u6027\uff0c\u4ee5\u8fd8\u6709\u51e0\u4e2a\u8fdb\u9636\u65b9\u6848\uff0c\u6bd4\u5982\u52a0\u5165\u91cd\u6392\u5e8f\u6a21\u578b\uff0c\u6570\u636e\u5e93MCP Server\uff0c\u8fd8\u6709\u501f\u52a9\u8d85\u5927\u4e0a\u4e0b\u6587\u6a21\u578b\u7b49\u7b49\u3002 00:00 - 01:48 \u524d\u8a00 01:48 - 03:19 \u672c\u5730\u77e5\u8bc6\u5e93 03:19 - 07:28 \u4e09\u5927\u75db\u70b9 07:28 - 09:09 \u6570\u636e\u5e93MCP 09:09 - 11:33 \u8d85\u5927\u4e0a\u4e0b\u6587\"><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:853px;margin:5px auto;\"><\/div><figcaption><\/figcaption><\/figure>\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"lyte-wrapper\" title=\"RAG vs. Fine Tuning\" style=\"width:853px;max-width:100%;margin:5px auto;\"><div class=\"lyMe\" id=\"WYL_00Q0G84kq3M\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\"><div><meta itemprop=\"thumbnailUrl\" content=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F00Q0G84kq3M%2Fhqdefault.jpg\" \/><meta itemprop=\"embedURL\" content=\"https:\/\/www.youtube.com\/embed\/00Q0G84kq3M\" \/><meta itemprop=\"duration\" content=\"PT8M57S\" \/><meta itemprop=\"uploadDate\" content=\"2024-09-09T15:00:00Z\" \/><\/div><meta itemprop=\"accessibilityFeature\" content=\"captions\" \/><div id=\"lyte_00Q0G84kq3M\" data-src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F00Q0G84kq3M%2Fhqdefault.jpg\" class=\"pL\"><div class=\"tC\"><div class=\"tT\" itemprop=\"name\">RAG vs. Fine Tuning<\/div><\/div><div class=\"play\"><\/div><div class=\"ctrl\"><div class=\"Lctrl\"><\/div><div class=\"Rctrl\"><\/div><\/div><\/div><noscript><a href=\"https:\/\/youtu.be\/00Q0G84kq3M\" rel=\"nofollow\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/infernews.com\/blog\/wp-content\/plugins\/wp-youtube-lyte\/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2Fvi%2F00Q0G84kq3M%2F0.jpg\" alt=\"RAG vs. Fine Tuning\" width=\"853\" height=\"460\" \/><br \/>Watch this video on YouTube<\/a><\/noscript><meta itemprop=\"description\" content=\"Get the guide to GAI, learn more \u2192 https:\/\/ibm.biz\/BdKTbF Learn more about the technology \u2192 https:\/\/ibm.biz\/BdKTbX Join Cedric Clyburn as he explores the differences and use cases of Retrieval Augmented Generation (RAG) and fine-tuning in enhancing large language models. This video covers the strengths, weaknesses, and common applications of both techniques, and provides insights on how to choose between them using machine learning and natural language processing principles AI news moves fast. Sign up for a monthly newsletter for AI updates from IBM \u2192 https:\/\/www.ibm.com\/account\/reg\/us-en\/signup?formid=news-urx-52120 #AI #LargeLanguageModels #FineTuning #RAG #ReinforcementLearning #MachineLearning #NaturalLanguageProcessing\"><\/div><\/div><div class=\"lL\" style=\"max-width:100%;width:853px;margin:5px auto;\"><\/div><figcaption><\/figcaption><\/figure>","protected":false},"excerpt":{"rendered":"<p>\u5728\u5feb\u901f\u767c\u5c55\u7684\u4eba\u5de5\u667a\u6167\u9818\u57df\u4e2d\uff0c\u6aa2\u7d22\u589e\u5f37\u751f\u6210 (Retrieval-Augmented Generation, RAG) \u5df2\u6210\u70ba\u4e00\u9805\u63d0\u5347\u5927\u578b\u8a9e\u8a00\u6a21\u578b (LLM)\u80fd\u529b\u7684\u95dc\u9375\u6280\u8853\u3002RAG \u7684\u6838\u5fc3\u5728\u65bc\u89e3\u6c7a\u4e86 LLM \u7684\u4e00\u500b\u6839\u672c\u9650\u5236\uff1a\u5b83\u5011\u7684\u77e5\u8b58\u88ab\u51cd\u7d50\u5728\u6700\u5f8c\u4e00\u6b21\u8a13\u7df4\u7684\u6642\u9593\u9ede\u3002RAG \u900f\u904e\u5728\u63d0\u793a\u904e\u7a0b\u4e2d\u52d5\u614b\u6ce8\u5165\u76f8\u95dc\u7684\u5916\u90e8\u8cc7\u8a0a\u4f86\u898f\u907f\u9019\u500b\u554f\u984c\u3002\u9019\u662f\u900f\u904e\u5411\u91cf\u5316 (vectorization) \u548c\u4e0a\u4e0b\u6587\u6574\u5408 (context integration) \u7684\u8907\u96dc\u76f8\u4e92\u4f5c\u7528\u4f86\u5be6\u73fe\u7684\uff0c\u6700\u7d42\u70ba LLM \u63d0\u4f9b\u5fc5\u8981\u7684\u8cc7\u6599\uff0c\u4ee5\u751f\u6210\u66f4\u6e96\u78ba\u3001\u53ca\u6642\u4e14\u7b26\u5408\u4e0a\u4e0b\u6587\u7684\u56de\u61c9\u3002 RAG \u7684\u795e\u5947\u4e4b\u8655\u5728\u65bc\u5b83\u80fd\u5920\u5c07\u60a8\u7684\u539f\u59cb\u67e5\u8a62\u8207\u5f9e\u77e5\u8b58\u5eab\u4e2d\u7372\u53d6\u7684\u8cc7\u8a0a\u7121\u7e2b\u5730\u878d\u5408\u5728\u4e00\u8d77\u3002\u9019\u500b\u904e\u7a0b\u53ef\u4ee5\u5206\u70ba\u5169\u500b\u95dc\u9375\u968e\u6bb5\uff1a\u6aa2\u7d22 (retrieval) \u548c\u751f\u6210 (generation)\u3002 \u6aa2\u7d22\u968e\u6bb5\uff1a\u5c07\u63d0\u793a\u5411\u91cf\u5316\u4ee5\u9032\u884c\u7cbe\u6e96\u641c\u7d22 \u8207\u4e00\u500b\u5e38\u898b\u7684\u8aa4\u89e3\u76f8\u53cd\uff0c\u5728 RAG \u67b6\u69cb\u4e2d\uff0c\u60a8\u7684\u539f\u59cb\u6587\u672c\u63d0\u793a\u4e26\u4e0d\u6703\u76f4\u63a5\u88ab\u9001\u5230 LLM\u3002\u76f8\u53cd\u5730\uff0c\u5b83\u6703\u5148\u9032\u884c\u4e00\u500b\u81f3\u95dc\u91cd\u8981\u7684\u7b2c\u4e00\u6b65\uff1a\u5411\u91cf\u5316\u3002 \u60a8\u7684\u63d0\u793a\u6216\u67e5\u8a62\u6703\u88ab\u8f49\u63db\u6210\u4e00\u7a2e\u7a31\u70ba\u300c\u5411\u91cf\u5d4c\u5165\u300d(vector embedding) \u7684\u6578\u503c\u8868\u793a\u3002\u9019\u662f\u900f\u904e\u4e00\u500b\u80fd\u5920\u6355\u6349\u60a8\u6587\u5b57\u80cc\u5f8c\u8a9e\u7fa9\u548c\u610f\u5716\u7684\u5d4c\u5165\u6a21\u578b (embedding model) \u4f86\u5b8c\u6210\u7684\u3002\u9019\u500b\u5411\u91cf\u5c31\u50cf\u4e00\u500b\u8907\u96dc\u7684\u641c\u7d22\u67e5\u8a62\uff0c\u4f7f RAG \u7cfb\u7d71\u80fd\u5920\u5728\u4e00\u500b\u9810\u5148\u7d22\u5f15\u597d\u7684\u5411\u91cf\u8cc7\u6599\u5eab\u4e2d\u9032\u884c\u7be9\u9078\u3002 \u9019\u500b\u5411\u91cf\u8cc7\u6599\u5eab\u5305\u542b\u4e86\u4f86\u81ea\u60a8\u6307\u5b9a\u77e5\u8b58\u4f86\u6e90\uff08\u4f8b\u5982\uff0c\u516c\u53f8\u6587\u4ef6\u3001\u7db2\u7ad9\u5167\u5bb9\u6216\u4e00\u7d44\u7cbe\u9078\u6587\u7ae0\uff09\u7684\u8cc7\u8a0a\u7247\u6bb5\u3002\u9019\u4e9b\u7247\u6bb5\u4e2d\u7684\u6bcf\u4e00\u500b\u4e5f\u90fd\u5df2\u7d93\u88ab\u9810\u5148\u5411\u91cf\u5316\u3002\u900f\u904e\u6bd4\u8f03\u60a8\u7684\u63d0\u793a\u5411\u91cf\u8207\u8cc7\u6599\u5eab\u4e2d\u7684\u5411\u91cf\uff0c\u7cfb\u7d71\u53ef\u4ee5\u8b58\u5225\u4e26\u6aa2\u7d22\u51fa\u8a9e\u7fa9\u4e0a\u6700\u76f8\u4f3c\u548c\u6700\u76f8\u95dc\u7684\u8cc7\u8a0a\u7247\u6bb5\u3002\u9019\u500b\u904e\u7a0b\u985e\u4f3c\u65bc\u4e00\u500b\u9ad8\u5ea6\u667a\u80fd\u7684\u641c\u5c0b\u5f15\u64ce\uff0c\u5b83\u80fd\u7406\u89e3\u60a8\u67e5\u8a62\u7684\u300c\u610f\u7fa9\u300d\uff0c\u800c\u4e0d\u50c5\u50c5\u662f\u95dc\u9375\u5b57\u3002 \u751f\u6210\u968e\u6bb5\uff1a\u70ba LLM \u7cbe\u5fc3\u6253\u9020\u6700\u7d42\u63d0\u793a \u4e00\u65e6\u6aa2\u7d22\u5230\u6700\u76f8\u95dc\u7684\u8cc7\u8a0a\u7247\u6bb5\uff0cRAG \u7cfb\u7d71\u7684\u4e0b\u4e00\u500b\u4efb\u52d9\u5c31\u662f\u5de7\u5999\u5730\u5c07\u5b83\u5011\u8207\u60a8\u7684\u539f\u59cb\u63d0\u793a\u7d50\u5408\u8d77\u4f86\u3002\u9019\u500b\u65b0\u5f62\u6210\u7684\u3001\u7d93\u904e\u589e\u5f37\u7684\u63d0\u793a\uff0c\u63a5\u8457\u6703\u88ab\u9001\u5230 LLM \u9032\u884c\u8655\u7406\u3002 \u7d50\u5408\u7684\u65b9\u6cd5\u6703\u6839\u64da\u5177\u9ad4\u7684\u5be6\u4f5c\u65b9\u5f0f\u548c RAG \u8a2d\u7f6e\u7684\u8907\u96dc\u6027\u800c\u6709\u6240\u4e0d\u540c\u3002\u5728\u4e00\u7a2e\u5e38\u898b\u7684\u65b9\u6cd5\u4e2d\uff0c\u5373\u6240\u8b02\u7684\u300c\u6a38\u7d20 RAG\u300d(Naive RAG)\uff0c\u6aa2\u7d22\u5230\u7684\u6587\u4ef6\u6703\u8207\u60a8\u7684\u539f\u59cb\u63d0\u793a\u4e32\u63a5\u5728\u4e00\u8d77\uff0c\u901a\u5e38\u6703\u4f7f\u7528\u6e05\u6670\u7684\u5206\u9694\u7b26\u4f86\u5340\u5206\u7528\u6236\u7684\u67e5\u8a62\u548c\u63d0\u4f9b\u7684\u4e0a\u4e0b\u6587\u3002 \u66f4\u5148\u9032\u7684 RAG \u5be6\u4f5c\uff0c\u6709\u6642\u88ab\u7a31\u70ba\u300c\u9032\u968e RAG\u300d(Advanced RAG) \u6216\u300c\u6a21\u7d44\u5316 RAG\u300d(Modular [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"googlesitekit_rrm_CAowvqSiDA:productID":"","footnotes":""},"class_list":["post-4730","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/pages\/4730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/comments?post=4730"}],"version-history":[{"count":0,"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/pages\/4730\/revisions"}],"wp:attachment":[{"href":"https:\/\/infernews.com\/blog\/wp-json\/wp\/v2\/media?parent=4730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}