{"id":112751,"date":"2026-10-04T19:25:06","date_gmt":"2026-10-04T11:25:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/112751.html"},"modified":"2026-10-04T19:25:06","modified_gmt":"2026-10-04T11:25:06","slug":"30%e5%a4%a9%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%ad%a6ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%ef%bc%88day-16%ef%bc%89%ef%bc%9aembedding-%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f%e7%94%a8%e4%ba%ba%e8%af%9d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/112751.html","title":{"rendered":"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d"},"content":{"rendered":"<p>\u8fd9\u662f\u7cfb\u5217\u7684\u7b2c 16 \u7bc7\u3002\u6574\u4e2a\u7cfb\u5217\u5199\u7ed9\u96f6\u57fa\u7840\u3001\u60f3\u5165\u884c AI \u7684\u670b\u53cb&#xff0c;\u6bcf\u5929\u4e00\u7bc7&#xff0c;30 \u5929\u540e\u4f60\u4f1a\u505a\u51fa 3 \u4e2a\u80fd\u5199\u8fdb\u7b80\u5386\u7684\u9879\u76ee\u3002<\/p>\n<h3>\u8fd9\u7bc7\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898<\/h3>\n<p>\u6628\u5929\u8bf4 RAG \u7684\u6838\u5fc3\u662f\u201c\u5148\u53bb\u8d44\u6599\u91cc\u67e5\u51fa\u76f8\u5173\u7684\u5185\u5bb9\u201d\u3002\u53ef\u8fd9\u91cc\u6709\u4e2a\u95ee\u9898&#xff1a;\u600e\u4e48\u67e5&#xff1f;<\/p>\n<p>\u4f20\u7edf\u65b9\u6cd5\u662f\u641c\u5173\u952e\u8bcd\u3002\u4f60\u95ee\u201c\u600e\u4e48\u62a5\u9500\u5dee\u65c5\u8d39\u201d&#xff0c;\u5b83\u5c31\u53bb\u6587\u6863\u91cc\u627e\u6709\u6ca1\u6709\u201c\u62a5\u9500\u201d\u8fd9\u4e24\u4e2a\u5b57\u3002\u8fd9\u62db\u6709\u4e2a\u81f4\u547d\u7f3a\u9677&#xff1a;\u6362\u4e2a\u8bf4\u6cd5\u5c31\u641c\u4e0d\u5230\u4e86\u3002 \u6587\u6863\u91cc\u5199\u7684\u662f\u201c\u5dee\u65c5\u652f\u51fa\u7533\u8bf7\u6d41\u7a0b\u201d&#xff0c;\u4f60\u95ee\u201c\u51fa\u5dee\u82b1\u7684\u94b1\u600e\u4e48\u62a5\u201d&#xff0c;\u5173\u952e\u8bcd\u4e00\u4e2a\u90fd\u4e0d\u5bf9&#xff0c;\u641c\u51fa\u6765\u4e00\u7247\u7a7a\u767d\u3002<\/p>\n<p>\u4f46\u4eba\u770b\u5f97\u51fa\u6765\u8fd9\u4e24\u53e5\u8bdd\u662f\u4e00\u4e2a\u610f\u601d\u3002\u600e\u4e48\u8ba9\u673a\u5668\u4e5f\u770b\u5f97\u51fa\u6765&#xff1f;\u7b54\u6848\u662f Embedding\u3002\u4eca\u5929\u8fd9\u7bc7\u53ef\u80fd\u6709\u70b9\u62bd\u8c61&#xff0c;\u4f46\u6211\u4fdd\u8bc1\u7528\u4eba\u8bdd\u80fd\u8bb2\u660e\u767d\u3002<\/p>\n<h3>\u4e00\u3001\u5148\u7406\u89e3\u4e00\u4ef6\u4e8b&#xff1a;\u628a\u610f\u601d\u53d8\u6210\u5750\u6807<\/h3>\n<p>\u601d\u8def\u662f\u8fd9\u6837\u7684&#xff1a;\u65e2\u7136\u673a\u5668\u770b\u4e0d\u61c2\u6587\u5b57&#xff0c;\u90a3\u5c31\u628a\u6587\u5b57\u53d8\u6210\u6570\u5b57\u3002<\/p>\n<p>\u4e0d\u662f\u968f\u4fbf\u53d8&#xff0c;\u800c\u662f\u6309\u201c\u610f\u601d\u201d\u6765\u53d8\u3002\u610f\u601d\u76f8\u8fd1\u7684\u53e5\u5b50&#xff0c;\u53d8\u51fa\u6765\u7684\u6570\u5b57\u4e5f\u76f8\u8fd1&#xff1b;\u610f\u601d\u5dee\u5f88\u8fdc\u7684&#xff0c;\u6570\u5b57\u5c31\u5dee\u5f88\u8fdc\u3002<\/p>\n<p>\u6700\u76f4\u89c2\u7684\u7406\u89e3\u65b9\u5f0f\u662f\u628a\u5b83\u60f3\u6210\u5730\u56fe\u4e0a\u7684\u5750\u6807\u3002\u6bcf\u4e2a\u53e5\u5b50\u5728\u201c\u610f\u601d\u7684\u5730\u56fe\u201d\u4e0a\u6709\u4e00\u4e2a\u4f4d\u7f6e&#xff1a;<\/p>\n<ul>\n<li>\u201c\u600e\u4e48\u62a5\u9500\u5dee\u65c5\u8d39\u201d<\/li>\n<li>\u201c\u51fa\u5dee\u82b1\u7684\u94b1\u600e\u4e48\u62a5\u201d<\/li>\n<li>\u201c\u5dee\u65c5\u652f\u51fa\u7533\u8bf7\u6d41\u7a0b\u201d<\/li>\n<\/ul>\n<p>\u8fd9\u4e09\u53e5\u8bdd\u610f\u601d\u76f8\u8fd1&#xff0c;\u5728\u5730\u56fe\u4e0a\u6328\u5f97\u5f88\u8fd1&#xff0c;\u805a\u6210\u4e00\u5c0f\u56e2\u3002<\/p>\n<ul>\n<li>\u201c\u4eca\u5929\u4e2d\u5348\u5403\u4ec0\u4e48\u201d<\/li>\n<\/ul>\n<p>\u79bb\u5b83\u4eec\u5c31\u5f88\u8fdc&#xff0c;\u5728\u53e6\u4e00\u7247\u533a\u57df\u3002<\/p>\n<p>\u8fd9\u4e2a\u201c\u5750\u6807\u201d\u5c31\u662f\u5411\u91cf&#xff0c;\u4e00\u957f\u4e32\u6570\u5b57\u3002\u628a\u6587\u5b57\u8f6c\u6210\u5411\u91cf\u7684\u8fc7\u7a0b\u53eb Embedding\u3002\u4f60\u4e0d\u7528\u7ba1\u8fd9\u4e32\u6570\u5b57\u5177\u4f53\u662f\u591a\u5c11&#xff0c;\u4e5f\u4e0d\u7528\u7ba1\u5b83\u662f\u600e\u4e48\u7b97\u51fa\u6765\u7684&#xff0c;\u90a3\u662f\u6a21\u578b\u5185\u90e8\u7684\u4e8b\u3002\u4f60\u53ea\u9700\u8981\u77e5\u9053&#xff1a;\u610f\u601d\u76f8\u8fd1&#xff0c;\u5750\u6807\u5c31\u76f8\u8fd1\u3002<\/p>\n<h3>\u4e8c\u3001\u67e5\u8d44\u6599\u53d8\u6210\u4e86\u91cf\u8ddd\u79bb<\/h3>\n<p>\u6709\u4e86\u5750\u6807&#xff0c;\u68c0\u7d22\u8fd9\u4ef6\u4e8b\u5c31\u53d8\u6210\u4e86\u5c0f\u5b66\u51e0\u4f55\u9898&#xff1a;\u7b97\u51fa\u63d0\u95ee\u7684\u5750\u6807&#xff0c;\u53bb\u5730\u56fe\u4e0a\u627e\u79bb\u5b83\u6700\u8fd1\u7684\u90a3\u51e0\u4e2a\u70b9&#xff0c;\u53d6\u51fa\u6765\u3002<\/p>\n<p>\u4e3e\u4f8b\u8bf4\u660e\u3002\u5047\u8bbe\u5e93\u91cc\u5b58\u4e86\u4e09\u6bb5\u8d44\u6599&#xff0c;\u63d0\u95ee\u662f\u201c\u51fa\u5dee\u600e\u4e48\u62a5\u9500\u201d&#xff1a;<\/p>\n<table>\n<tr>\u8d44\u6599\u5185\u5bb9\u548c\u63d0\u95ee\u7684\u201c\u8ddd\u79bb\u201d\u7ed3\u679c<\/tr>\n<tbody>\n<tr>\n<td>\u5dee\u65c5\u652f\u51fa\u7533\u8bf7\u6d41\u7a0b&#xff1a;\u5148\u586b\u5355\u2026\u2026<\/td>\n<td>\u5f88\u8fd1<\/td>\n<td>\u547d\u4e2d<\/td>\n<\/tr>\n<tr>\n<td>\u5458\u5de5\u8003\u52e4\u7ba1\u7406\u89c4\u5b9a\u2026\u2026<\/td>\n<td>\u5f88\u8fdc<\/td>\n<td>\u4e0d\u76f8\u5173<\/td>\n<\/tr>\n<tr>\n<td>\u5dee\u65c5\u8d39\u6807\u51c6&#xff1a;\u9ad8\u94c1\u4e8c\u7b49\u5ea7\u2026\u2026<\/td>\n<td>\u8f83\u8fd1<\/td>\n<td>\u547d\u4e2d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u673a\u5668\u7b97\u7684\u5c31\u662f\u8ddd\u79bb&#xff0c;\u8ddf\u5173\u952e\u8bcd\u4e00\u4e2a\u5b57\u90fd\u5bf9\u4e0d\u4e0a\u4e5f\u6ca1\u5173\u7cfb&#xff0c;\u56e0\u4e3a\u6bd4\u7684\u662f\u610f\u601d&#xff0c;\u4e0d\u662f\u5b57\u9762\u3002<\/p>\n<p>\u8bb0\u4f4f\u8fd9\u4e2a\u6bd4\u55bb&#xff0c;\u6574\u4e2a RAG \u5c31\u901a\u4e86&#xff1a;Embedding \u7ed9\u6bcf\u53e5\u8bdd\u53d1\u4e86\u4e2a\u5750\u6807&#xff0c;\u68c0\u7d22\u5c31\u662f\u5728\u5730\u56fe\u4e0a\u627e\u6700\u8fd1\u7684\u90bb\u5c45\u3002<\/p>\n<h3>\u4e09\u3001\u52a8\u624b\u611f\u53d7\u4e00\u4e0b&#xff1a;\u7b97\u4e24\u53e5\u8bdd\u6709\u591a\u50cf<\/h3>\n<p>\u5149\u770b\u6bd4\u55bb\u8fd8\u662f\u865a&#xff0c;\u8dd1\u4e00\u904d\u4ee3\u7801\u5c31\u6709\u611f\u89c9\u4e86\u3002Embedding \u4e5f\u662f\u8c03\u7528 API \u62ff\u5230\u7684&#xff0c;\u5199\u6cd5\u4f60\u65e9\u5c31\u719f\u4e86&#xff1a;<\/p>\n<p><span class=\"token keyword\">from<\/span> openai <span class=\"token keyword\">import<\/span> OpenAI<\/p>\n<p>client <span class=\"token operator\">&#061;<\/span> OpenAI<span class=\"token punctuation\">(<\/span>api_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;\u4f60\u7684\u5bc6\u94a5&#034;<\/span><span class=\"token punctuation\">,<\/span> base_url<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;https:\/\/api.deepseek.com&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">get_embedding<\/span><span class=\"token punctuation\">(<\/span>text<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u628a\u4e00\u53e5\u8bdd\u53d8\u6210\u4e00\u4e32\u6570\u5b57&#xff08;\u5411\u91cf&#xff09;&#034;&#034;&#034;<\/span><br \/>\n    response <span class=\"token operator\">&#061;<\/span> client<span class=\"token punctuation\">.<\/span>embeddings<span class=\"token punctuation\">.<\/span>create<span class=\"token punctuation\">(<\/span><br \/>\n        model<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;embedding-model-name&#034;<\/span><span class=\"token punctuation\">,<\/span>     <span class=\"token comment\"># \u6362\u6210\u4f60\u6240\u7528\u5e73\u53f0\u7684 embedding \u6a21\u578b\u540d<\/span><br \/>\n        <span class=\"token builtin\">input<\/span><span class=\"token operator\">&#061;<\/span>text<br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> response<span class=\"token punctuation\">.<\/span>data<span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>embedding<\/p>\n<p><span class=\"token comment\"># \u8bd5\u4e09\u53e5\u8bdd<\/span><br \/>\na <span class=\"token operator\">&#061;<\/span> get_embedding<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u600e\u4e48\u62a5\u9500\u5dee\u65c5\u8d39&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nb <span class=\"token operator\">&#061;<\/span> get_embedding<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u51fa\u5dee\u82b1\u7684\u94b1\u600e\u4e48\u62a5&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nc <span class=\"token operator\">&#061;<\/span> get_embedding<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u4eca\u5929\u4e2d\u5348\u5403\u4ec0\u4e48&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u5411\u91cf\u7684\u957f\u5ea6&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span>     <span class=\"token comment\"># \u901a\u5e38\u662f\u4e00\u5343\u591a\u4e2a\u6570\u5b57<\/span><\/p>\n<p>\u4f60\u4f1a\u770b\u5230\u6253\u5370\u51fa\u6765\u7684\u957f\u5ea6\u662f\u4e00\u5343\u591a&#xff0c;\u4e5f\u5c31\u662f\u8bf4\u6bcf\u53e5\u8bdd\u88ab\u53d8\u6210\u4e86\u4e00\u5343\u591a\u4e2a\u5750\u6807\u503c\u3002\u8fd9\u662f\u9ad8\u7ef4\u7a7a\u95f4&#xff0c;\u6211\u4eec\u753b\u4e0d\u51fa\u6765&#xff0c;\u4f46\u8ddd\u79bb\u7684\u8ba1\u7b97\u903b\u8f91\u548c\u5e73\u9762\u4e0a\u4e00\u6a21\u4e00\u6837\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u7b97\u76f8\u4f3c\u5ea6\u3002\u6570\u5b66\u4e0a\u4e00\u822c\u7528\u4f59\u5f26\u76f8\u4f3c\u5ea6&#xff0c;\u4f60\u4e0d\u7528\u8bb0\u516c\u5f0f&#xff0c;\u77e5\u9053\u5b83\u8f93\u51fa 0 \u5230 1&#xff0c;\u8d8a\u63a5\u8fd1 1 \u8d8a\u50cf\u5c31\u884c&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> numpy <span class=\"token keyword\">as<\/span> np<\/p>\n<p><span class=\"token keyword\">def<\/span> <span class=\"token function\">similarity<\/span><span class=\"token punctuation\">(<\/span>v1<span class=\"token punctuation\">,<\/span> v2<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u76f8\u4f3c\u5ea6&#xff0c;\u7ed3\u679c\u8d8a\u63a5\u8fd1 1 \u8d8a\u76f8\u4f3c&#034;&#034;&#034;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token builtin\">float<\/span><span class=\"token punctuation\">(<\/span>np<span class=\"token punctuation\">.<\/span>dot<span class=\"token punctuation\">(<\/span>v1<span class=\"token punctuation\">,<\/span> v2<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token punctuation\">(<\/span>np<span class=\"token punctuation\">.<\/span>linalg<span class=\"token punctuation\">.<\/span>norm<span class=\"token punctuation\">(<\/span>v1<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">*<\/span> np<span class=\"token punctuation\">.<\/span>linalg<span class=\"token punctuation\">.<\/span>norm<span class=\"token punctuation\">(<\/span>v2<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u610f\u601d\u76f8\u8fd1\u7684\u4e24\u53e5&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> similarity<span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">,<\/span> b<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span>    <span class=\"token comment\"># \u4f1a\u6bd4\u8f83\u9ad8&#xff0c;\u6bd4\u5982 0.85<\/span><br \/>\n<span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\u6beb\u4e0d\u76f8\u5173\u7684\u4e24\u53e5&#xff1a;&#034;<\/span><span class=\"token punctuation\">,<\/span> similarity<span class=\"token punctuation\">(<\/span>a<span class=\"token punctuation\">,<\/span> c<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span>    <span class=\"token comment\"># \u4f1a\u4f4e\u5f88\u591a&#xff0c;\u6bd4\u5982 0.3<\/span><\/p>\n<p>\u8dd1\u5b8c\u4f60\u4f1a\u4eb2\u773c\u770b\u5230&#xff1a;\u610f\u601d\u76f8\u8fd1\u7684\u4e24\u53e5\u76f8\u4f3c\u5ea6\u660e\u663e\u66f4\u9ad8&#xff0c;\u867d\u7136\u5b83\u4eec\u4e00\u4e2a\u5b57\u90fd\u4e0d\u4e00\u6837\u3002\u8fd9\u5c31\u662f\u201c\u673a\u5668\u7406\u89e3\u610f\u601d\u201d\u7684\u5b9e\u73b0\u65b9\u5f0f&#xff0c;\u4e00\u70b9\u90fd\u4e0d\u795e\u79d8\u3002<\/p>\n<p>&#xff08;\u8fd9\u6bb5\u7528\u5230\u4e86 numpy&#xff0c;\u5982\u679c\u6ca1\u88c5&#xff0c;\u6267\u884c pip install numpy \u5c31\u884c\u3002&#xff09;<\/p>\n<h3>\u56db\u3001\u4e00\u4e2a\u65b0\u624b\u5fc5\u77e5\u7684\u5751<\/h3>\n<p>Embedding \u7684\u6a21\u578b\u548c\u5bf9\u8bdd\u7684\u6a21\u578b\u662f\u4e24\u56de\u4e8b&#xff0c;\u522b\u641e\u6df7\u3002<\/p>\n<p>\u5bf9\u8bdd\u6a21\u578b\u8d1f\u8d23\u8bf4\u8bdd&#xff08;deepseek-chat \u8fd9\u7c7b&#xff09;&#xff0c;Embedding \u6a21\u578b\u4e13\u95e8\u8d1f\u8d23\u628a\u6587\u5b57\u53d8\u6210\u5411\u91cf&#xff0c;\u540d\u5b57\u901a\u5e38\u5e26 embedding \u6216 bge \u4e4b\u7c7b\u3002\u6709\u4e9b\u5e73\u53f0\u8fd9\u4e24\u4e2a\u662f\u5206\u5f00\u7684&#xff0c;\u4f60\u9700\u8981\u5355\u72ec\u770b\u6587\u6863\u786e\u8ba4\u6a21\u578b\u540d&#xff0c;\u6709\u7684\u5e73\u53f0\u751a\u81f3\u8981\u5355\u72ec\u5f00\u901a\u3002<\/p>\n<p>\u53e6\u5916&#xff0c;\u751f\u6210\u5411\u91cf\u548c\u68c0\u7d22\u5fc5\u987b\u7528\u540c\u4e00\u4e2a Embedding \u6a21\u578b\u3002\u5982\u679c\u5b58\u5e93\u65f6\u7528\u7684\u662f A \u6a21\u578b&#xff0c;\u67e5\u8be2\u65f6\u6362\u4e86 B \u6a21\u578b&#xff0c;\u4e24\u8fb9\u7684\u5750\u6807\u7cfb\u90fd\u4e0d\u4e00\u6837&#xff0c;\u7b97\u51fa\u6765\u7684\u8ddd\u79bb\u6beb\u65e0\u610f\u4e49\u3002\u8fd9\u4e2a\u5751\u65b0\u624b\u5f88\u5bb9\u6613\u8e29&#xff0c;\u56e0\u4e3a\u62a5\u9519\u5f88\u4e0d\u660e\u663e&#xff0c;\u53ea\u662f\u641c\u7d22\u7ed3\u679c\u4e71\u3002<\/p>\n<h3>\u4e94\u3001\u4e3a\u4ec0\u4e48\u8fd9\u4e00\u7bc7\u503c\u5f97\u82b1\u4e00\u5929<\/h3>\n<p>\u56e0\u4e3a\u201c\u5411\u91cf\u68c0\u7d22\u201d\u662f\u73b0\u4ee3 AI \u5e94\u7528\u7684\u57fa\u7840\u6280\u672f\u4e4b\u4e00&#xff0c;\u5b83\u4e0d\u662f RAG \u72ec\u6709\u7684&#xff1a;<\/p>\n<ul>\n<li>\u641c\u56fe\u3001\u641c\u89c6\u9891&#xff0c;\u672c\u8d28\u662f\u628a\u56fe\u7247\u4e5f\u53d8\u6210\u5411\u91cf<\/li>\n<li>\u63a8\u8350\u7cfb\u7edf&#xff0c;\u7b97\u7684\u662f\u7528\u6237\u548c\u5546\u54c1\u5728\u5411\u91cf\u7a7a\u95f4\u91cc\u7684\u8ddd\u79bb<\/li>\n<li>\u53bb\u91cd\u548c\u805a\u7c7b&#xff0c;\u4e5f\u662f\u9760\u7b97\u76f8\u4f3c\u5ea6<\/li>\n<\/ul>\n<p>\u4f60\u4eca\u5929\u641e\u61c2\u7684\u8fd9\u4e2a\u601d\u8def&#xff0c;\u4ee5\u540e\u9047\u5230\u5f88\u591a\u6280\u672f\u90fd\u80fd\u5bf9\u53f7\u5165\u5ea7\u3002\u9762\u8bd5\u65f6\u88ab\u95ee\u5230\u201cRAG \u600e\u4e48\u68c0\u7d22\u7684\u201d&#xff0c;\u4f60\u80fd\u4ece\u201c\u628a\u610f\u601d\u53d8\u6210\u5750\u6807&#xff0c;\u518d\u627e\u6700\u8fd1\u7684\u90bb\u5c45\u201d\u8bb2\u8d77&#xff0c;\u6bd4\u80cc\u672f\u8bed\u5f3a\u5f97\u591a\u3002<\/p>\n<h3>\u4eca\u5929\u7684\u4f5c\u4e1a<\/h3>\n<p>\u8dd1\u4e00\u904d\u4e0a\u9762\u7684\u4ee3\u7801&#xff0c;\u8bd5\u8bd5\u4f60\u81ea\u5df1\u60f3\u6d4b\u7684\u4e09\u53e5\u8bdd&#xff0c;\u628a\u4e24\u4e24\u7684\u76f8\u4f3c\u5ea6\u6570\u5b57\u8d34\u5230\u8bc4\u8bba\u533a\u3002\u5efa\u8bae\u4f60\u6d4b\u4e00\u7ec4\u53cd\u4f8b&#xff0c;\u6bd4\u5982\u201c\u6211\u8981\u8bf7\u5047\u201d\u548c\u201c\u6211\u60f3\u8bf7\u51e0\u5929\u5047\u201d&#xff0c;\u770b\u770b\u76f8\u4f3c\u5ea6\u662f\u591a\u5c11&#xff0c;\u611f\u53d7\u4e00\u4e0b\u8fd9\u4e2a\u65b9\u6cd5\u7684\u9760\u8c31\u7a0b\u5ea6\u3002<\/p>\n<h3>\u660e\u5929\u9884\u544a<\/h3>\n<p>Day 17&#xff1a;\u300aChromaDB \u4e0a\u624b&#xff1a;\u7ed9\u672c\u5730\u6587\u6863\u5efa\u4e00\u4e2a\u201c\u5916\u6302\u5927\u8111\u201d\u300b\u3002\u4eca\u5929\u5b66\u4f1a\u4e86\u600e\u4e48\u628a\u6587\u5b57\u53d8\u5750\u6807&#xff0c;\u660e\u5929\u5c31\u6709\u5730\u65b9\u5b58\u5b83\u4eec\u4e86\u3002ChromaDB \u662f\u6700\u597d\u4e0a\u624b\u7684\u5411\u91cf\u6570\u636e\u5e93&#xff0c;\u8f7b\u91cf\u3001\u4e0d\u7528\u88c5\u670d\u52a1\u3001\u51e0\u884c\u4ee3\u7801\u5c31\u80fd\u7528\u3002\u660e\u5929\u6211\u4eec\u628a\u4e00\u6279\u6587\u6863\u771f\u7684\u585e\u8fdb\u53bb&#xff0c;\u5e76\u4e14\u5b9e\u73b0\u201c\u63d0\u95ee\u5c31\u8fd4\u56de\u6700\u76f8\u5173\u7684\u6bb5\u843d\u201d\u3002<\/p>\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<br \/>\n*\u7cfb\u5217\u76ee\u5f55&#xff1a;30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528 \u5f00\u53d1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u7cfb\u5217\u7684\u7b2c 16 \u7bc7\u3002\u6574\u4e2a\u7cfb\u5217\u5199\u7ed9\u96f6\u57fa\u7840\u3001\u60f3\u5165\u884c AI \u7684\u670b\u53cb&#xff0c;\u6bcf\u5929\u4e00\u7bc7&#xff0c;30 \u5929\u540e\u4f60\u4f1a\u505a\u51fa 3 \u4e2a\u80fd\u5199\u8fdb\u7b80\u5386\u7684\u9879\u76ee\u3002\u8fd9\u7bc7\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898<br \/>\n\u6628\u5929\u8bf4 RAG \u7684\u6838\u5fc3\u662f\u201c\u5148\u53bb\u8d44\u6599\u91cc\u67e5\u51fa\u76f8\u5173\u7684\u5185\u5bb9\u201d\u3002\u53ef\u8fd9\u91cc\u6709\u4e2a\u95ee\u9898&#xff1a;\u600e\u4e48\u67e5&#xff1f;<br \/>\n\u4f20\u7edf\u65b9\u6cd5\u662f\u641c\u5173\u952e\u8bcd\u3002\u4f60\u95ee\u201c\u600e\u4e48\u62a5\u9500\u5dee\u65c5\u8d39\u201d&#xff0c;\u5b83\u5c31\u53bb\u6587\u6863\u91cc\u627e\u6709\u6ca1\u6709\u201c\u62a5\u9500\u201d\u8fd9\u4e24\u4e2a\u5b57\u3002\u8fd9\u62db\u6709\u4e2a\u81f4\u547d\u7f3a\u9677&#xff1a;\u6362\u4e2a\u8bf4\u6cd5\u5c31\u641c\u4e0d\u5230\u4e86\u3002 \u6587\u6863\u91cc\u5199\u7684\u662f\u201c\u5dee\u65c5\u652f\u51fa\u7533\u8bf7\u6d41\u7a0b\u201d&#xff0c;\u4f60\u95ee\u201c\u51fa<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[346,50,427],"topic":[],"class_list":["post-112751","post","type-post","status-publish","format-standard","hentry","category-server","tag-embedding","tag-50","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\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.wsisp.com\/helps\/112751.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u662f\u7cfb\u5217\u7684\u7b2c 16 \u7bc7\u3002\u6574\u4e2a\u7cfb\u5217\u5199\u7ed9\u96f6\u57fa\u7840\u3001\u60f3\u5165\u884c AI \u7684\u670b\u53cb&#xff0c;\u6bcf\u5929\u4e00\u7bc7&#xff0c;30 \u5929\u540e\u4f60\u4f1a\u505a\u51fa 3 \u4e2a\u80fd\u5199\u8fdb\u7b80\u5386\u7684\u9879\u76ee\u3002\u8fd9\u7bc7\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898 \u6628\u5929\u8bf4 RAG \u7684\u6838\u5fc3\u662f\u201c\u5148\u53bb\u8d44\u6599\u91cc\u67e5\u51fa\u76f8\u5173\u7684\u5185\u5bb9\u201d\u3002\u53ef\u8fd9\u91cc\u6709\u4e2a\u95ee\u9898&#xff1a;\u600e\u4e48\u67e5&#xff1f; \u4f20\u7edf\u65b9\u6cd5\u662f\u641c\u5173\u952e\u8bcd\u3002\u4f60\u95ee\u201c\u600e\u4e48\u62a5\u9500\u5dee\u65c5\u8d39\u201d&#xff0c;\u5b83\u5c31\u53bb\u6587\u6863\u91cc\u627e\u6709\u6ca1\u6709\u201c\u62a5\u9500\u201d\u8fd9\u4e24\u4e2a\u5b57\u3002\u8fd9\u62db\u6709\u4e2a\u81f4\u547d\u7f3a\u9677&#xff1a;\u6362\u4e2a\u8bf4\u6cd5\u5c31\u641c\u4e0d\u5230\u4e86\u3002 \u6587\u6863\u91cc\u5199\u7684\u662f\u201c\u5dee\u65c5\u652f\u51fa\u7533\u8bf7\u6d41\u7a0b\u201d&#xff0c;\u4f60\u95ee\u201c\u51fa\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/112751.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-04T11:25:06+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112751.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/112751.html\",\"name\":\"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-04T11:25:06+00:00\",\"dateModified\":\"2026-10-04T11:25:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/112751.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/112751.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112751.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/112751.html","og_locale":"zh_CN","og_type":"article","og_title":"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8fd9\u662f\u7cfb\u5217\u7684\u7b2c 16 \u7bc7\u3002\u6574\u4e2a\u7cfb\u5217\u5199\u7ed9\u96f6\u57fa\u7840\u3001\u60f3\u5165\u884c AI \u7684\u670b\u53cb&#xff0c;\u6bcf\u5929\u4e00\u7bc7&#xff0c;30 \u5929\u540e\u4f60\u4f1a\u505a\u51fa 3 \u4e2a\u80fd\u5199\u8fdb\u7b80\u5386\u7684\u9879\u76ee\u3002\u8fd9\u7bc7\u89e3\u51b3\u4ec0\u4e48\u95ee\u9898 \u6628\u5929\u8bf4 RAG \u7684\u6838\u5fc3\u662f\u201c\u5148\u53bb\u8d44\u6599\u91cc\u67e5\u51fa\u76f8\u5173\u7684\u5185\u5bb9\u201d\u3002\u53ef\u8fd9\u91cc\u6709\u4e2a\u95ee\u9898&#xff1a;\u600e\u4e48\u67e5&#xff1f; \u4f20\u7edf\u65b9\u6cd5\u662f\u641c\u5173\u952e\u8bcd\u3002\u4f60\u95ee\u201c\u600e\u4e48\u62a5\u9500\u5dee\u65c5\u8d39\u201d&#xff0c;\u5b83\u5c31\u53bb\u6587\u6863\u91cc\u627e\u6709\u6ca1\u6709\u201c\u62a5\u9500\u201d\u8fd9\u4e24\u4e2a\u5b57\u3002\u8fd9\u62db\u6709\u4e2a\u81f4\u547d\u7f3a\u9677&#xff1a;\u6362\u4e2a\u8bf4\u6cd5\u5c31\u641c\u4e0d\u5230\u4e86\u3002 \u6587\u6863\u91cc\u5199\u7684\u662f\u201c\u5dee\u65c5\u652f\u51fa\u7533\u8bf7\u6d41\u7a0b\u201d&#xff0c;\u4f60\u95ee\u201c\u51fa","og_url":"https:\/\/www.wsisp.com\/helps\/112751.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-04T11:25:06+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/112751.html","url":"https:\/\/www.wsisp.com\/helps\/112751.html","name":"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-04T11:25:06+00:00","dateModified":"2026-10-04T11:25:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/112751.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/112751.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/112751.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"30\u5929\u4ece\u96f6\u5f00\u59cb\u5b66AI\u5e94\u7528\u5f00\u53d1\uff08Day 16\uff09\uff1aEmbedding \u662f\u4ec0\u4e48\uff1f\u7528\u4eba\u8bdd\u8bb2\u660e\u767d\u201c\u5411\u91cf\u68c0\u7d22\u201d"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/112751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=112751"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/112751\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=112751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=112751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=112751"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=112751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}