{"id":50172,"date":"2023-10-23T12:39:50","date_gmt":"2024-02-29T20:20:14","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/"},"modified":"2024-05-04T05:36:42","modified_gmt":"2024-05-03T21:36:42","slug":"%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/","title":{"rendered":"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8"},"content":{"rendered":"<h2>\u9996\u5148<\/h2>\n<h3>\u672c\u6587\u7684\u76ee\u7684<\/h3>\n<p>\u672c\u6587\u662f\u4e3a\u5bf9LangChain\u6280\u672f\u611f\u5174\u8da3\u7684\u8bfb\u8005\u63d0\u4f9b\u4fe1\u606f\u800c\u64b0\u5199\u7684\uff0c\u65e8\u5728\u5c3d\u53ef\u80fd\u5730\u63d0\u4f9b\u5165\u95e8\u7ea7\u7684\u77e5\u8bc6\uff0c\u4e0d\u9700\u8981\u4efb\u4f55\u9884\u5148\u7684\u80cc\u666f\u77e5\u8bc6\u3002<\/p>\n<h3>\u4e3b\u8981\u7684\u76ee\u6807\u8bfb\u8005<\/h3>\n<p>\u8fd9\u7bc7\u7a3f\u4ef6\u7684\u4e3b\u8981\u76ee\u6807\u8bfb\u8005\u662f\u6d89\u53ca\u5546\u4e1a\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u548c\u67b6\u6784\u7684\u4eba\u5458\u3002\u56e0\u6b64\uff0c\u91cd\u70b9\u66f4\u52a0\u6ce8\u91cd\u5b9e\u8df5\u65b9\u9762\uff08\u4f8b\u5982\uff0c\u4ece\u5229\u7528\u751f\u6210\u4eba\u5de5\u667a\u80fd\u8fdb\u884c\u670d\u52a1\u5f00\u53d1\u7684\u89d2\u5ea6\uff09\u3002<\/p>\n<h3>\u672c\u6587\u7684\u7ed3\u6784<\/h3>\n<p>\u672c\u6587\u7684\u7ed3\u6784\u5305\u62ec\u4ee5\u4e0b\u4e09\u4e2a\u6b65\u9aa4\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u751f\u6210AI\u6d3b\u7528\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u6982\u8981<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d9\u30af\u30c8\u30eb\u691c\u7d22<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">LangChain\u5165\u9580<\/ul>\n<h2>\u751f\u6210AI\u6d3b\u7528\u5e94\u7528\u7a0b\u5e8f\u6982\u8ff0<\/h2>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5c06\u770b\u4e00\u4e0b\u5229\u7528\u751f\u6210\u4eba\u5de5\u667a\u80fd\u7684\u5e94\u7528\u7a0b\u5e8f\u662f\u4ec0\u4e48\u6837\u7684\u3002<\/p>\n<p>\u5728\u751f\u6210AI\u5e94\u7528\u7a0b\u5e8f\u7684\u5185\u90e8\uff0c\u7528\u6237\u8f93\u5165\u7684\u6570\u636e\u88ab\u5904\u7406\u4e3aLLM\u7684\u8f93\u5165\uff0c\u5373\u5927\u89c4\u6a21\u8bed\u8a00\u6a21\u578b\u3002\u5982\u679c\u8003\u8651\u6700\u7b80\u5355\u7684\u6784\u6210\uff0c\u5219\u53ef\u4ee5\u7b80\u5355\u5730\u8ba4\u4e3a\u662f\u8c03\u7528\u5916\u90e8\u7684LLM API\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/11-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u7531\u4e8e\u5728\u73b0\u6709\u7684LLM\u4e0a\u8fdb\u884c\u7b80\u5355\u4f7f\u7528\uff0c\u65e0\u8bba\u662f\u901a\u8fc7API\u8c03\u7528\u8fd8\u662f\u4f7f\u7528\u5f00\u6e90\u6a21\u578b\uff0c\u90fd\u65e0\u6cd5\u4e3a\u4f01\u4e1a\u7684\u670d\u52a1\u6216\u5185\u90e8\u7cfb\u7edf\u63d0\u4f9b\u5b9e\u8d28\u6027\u7684\u4ef7\u503c\uff0c\u8fd9\u4e00\u70b9\u53ef\u4ee5\u7acb\u5373\u7406\u89e3\u3002\u56e0\u6b64\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5229\u7528\u4f01\u4e1a\u62e5\u6709\u7684\u6570\u636e\u53d8\u5f97\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/13-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728\u8fd9\u4e2a\u56fe\u8868\u4e2d\uff0c\u6982\u5ff5\u4e0a\u6211\u4eec\u5c06\u5176\u8868\u8fbe\u4e3a\u201c\u4f01\u4e1a\u6301\u6709\u6570\u636e+LLM=\u589e\u5f3aLLM\u201d\u3002\u7136\u800c\uff0c\u5728\u589e\u5f3aLLM\u7684\u65b9\u6cd5\u65b9\u9762\uff0c\u6211\u4eec\u5177\u4f53\u4ecb\u7ecd\u4e86\u4e24\u79cd\u65b9\u5f0f\u3002<\/p>\n<h3>\u8c03\u6574\u7ec6\u8282\u8bbe\u7f6e<\/h3>\n<p>\u7b2c\u4e00\u79cd\u65b9\u6cd5\u662f\u8fdb\u884c\u5fae\u8c03\u3002\u901a\u8fc7\u4f7f\u7528\u4f01\u4e1a\u62e5\u6709\u7684\u6570\u636e\u5bf9\u73b0\u6709\u7684LLM\u8fdb\u884c\u91cd\u65b0\u8bad\u7ec3\uff0c\u4e3a\u8be5\u4f01\u4e1a\uff08\u5982A\u516c\u53f8\uff09\u6784\u5efa\u4e13\u5c5e\u7684LLM\u6a21\u578b\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/17-0.png\" alt=\"image.png\" \/><\/div>\n<h3>\u5373\u65f6\u5de5\u7a0b<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/19-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u63a5\u4e0b\u6765\u662fPrompt Engineering\u3002\u5728\u8fd9\u91cc\uff0c\u201cPrompt\u201d\u53ef\u4ee5\u7406\u89e3\u4e3a\u5bf9LLM\u7684\u8f93\u5165\u548c\u7406\u89e3\u3002\u5728LLM\u7684\u63d0\u793a\u4e2d\uff0c\u4e0d\u662f\u76f4\u63a5\u4f7f\u7528\u7528\u6237\u7684\u8bf7\u6c42\uff0c\u800c\u662f\u901a\u8fc7\u4f7f\u7528\u4e0e\u8be5\u8bf7\u6c42\u76f8\u5173\u7684\u4f01\u4e1a\u5185\u90e8\u6570\u636e\u6765\u5904\u7406\uff0c\u5373\u8fdb\u884c\u5de5\u7a0b\u5904\u7406\uff0c\u53ef\u4ee5\u5c06\u7cfb\u7edf\u5bf9\u7528\u6237\u7684\u54cd\u5e94\u8f6c\u5316\u4e3a\u5177\u6709\u4f01\u4e1a\u72ec\u7279\u4ef7\u503c\u7684\u56de\u5e94\u3002<\/p>\n<p>\u672f\u8bed\u201cPrompt Engineering\u201d\u7ed9\u4eba\u4e00\u79cd\u5de5\u7a0b\u5e08\u7684\u89c6\u89d2\uff0c\u800c\u672f\u8bed\u201cContext Injection\u201d\uff0c\u5373\u4e0a\u4e0b\u6587\u63d2\u5165\uff0c\u4e5f\u88ab\u7528\u6765\u6307\u4ee3\u540c\u4e00\u6982\u5ff5\u3002<\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u5411LLM\u53d1\u51fa\u7684\u8bf7\u6c42\uff0c\u7b80\u5355\u6765\u8bf4\uff0c\u5c31\u662f\u56de\u7b54\u7528\u6237\u7684\u8bf7\u6c42\uff0c\u5982\u5de6\u4e0b\u65b9\u7684\u6c14\u6ce1\u4e2d\u6240\u793a\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8981\u5229\u7528\u4ee5\u4e0b\u63d0\u4f9b\u7684\u6570\u636e\u3002<\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u4ece\u4f01\u4e1a\u62e5\u6709\u7684\u5927\u91cf\u6570\u636e\u4e2d\u5feb\u901f\u627e\u5230\u4e0e\u7528\u6237\u95ee\u9898\u76f8\u5173\u7684\u4fe1\u606f\u975e\u5e38\u91cd\u8981\u3002\u5728\u8fd9\u91cc\uff0c\u6570\u636e\u7684\u641c\u7d22\u9700\u8981\u80fd\u591f\u5904\u7406\u975e\u7ed3\u6784\u5316\u6570\u636e\uff0c\u4f8b\u5982\u81ea\u7136\u8bed\u8a00\uff08\u5728\u8fd9\u91cc\uff0c\u201c\u80fd\u591f\u5904\u7406\u201d\u8fd9\u4e2a\u8868\u8fbe\u4e0a\uff0c\u4e0d\u4ec5\u4ec5\u610f\u5473\u7740\u53ef\u4ee5\u64cd\u4f5c\uff0c\u8fd8\u6697\u793a\u4e86\u5bf9\u81ea\u7136\u8bed\u8a00\u7684\u7406\u89e3\u548c\u5904\u7406\uff09\u3002<\/p>\n<h3>\u77e2\u91cf\u641c\u7d22<\/h3>\n<p>\u5728\u8fd9\u91cc\uff0c\u7528\u4e8e\u641c\u7d22\u975e\u7ed3\u6784\u5316\u6570\u636e\u7684\u76ee\u7684\u7684\u5411\u91cf\u641c\u7d22\u53d8\u5f97\u91cd\u8981\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/25-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u76ee\u524d\uff0c\u6709\u8bb8\u591a\u63d0\u4f9b\u5411\u91cf\u641c\u7d22\u529f\u80fd\u7684\u5411\u91cf\u5b58\u50a8\u6216\u5411\u91cf\u6570\u636e\u5e93\u5e94\u8fd0\u800c\u751f\u3002\u540c\u65f6\uff0c\u8bf8\u591a\u5411\u91cf\u641c\u7d22\u5f15\u64ce\u548c\u5411\u91cf\u6570\u636e\u5e93\u4e5f\u76f8\u7ee7\u95ee\u4e16\u3002<\/p>\n<p>\u5411\u91cf\u6570\u636e\u5e93\u5b58\u50a8\u4e86\u5411\u91cf\u6570\u636e\uff0c\u5e76\u901a\u8fc7\u5bf9\u8fd9\u4e9b\u5411\u91cf\u6570\u636e\u8fdb\u884c\u7d22\u5f15\u5316\uff0c\u5b9e\u73b0\u4e86\u5411\u91cf\u68c0\u7d22\u7684\u529f\u80fd\u3002<\/p>\n<h4>\u5411\u91cf\u641c\u7d22\u662f\u4ec0\u4e48\uff1f<\/h4>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u89e3\u91ca\u4e00\u4e0b\u4ec0\u4e48\u662f\u5411\u91cf\u641c\u7d22\u3002<\/p>\n<p>\u5728\u8c37\u6b4c\u7684\u4e00\u7bc7\u535a\u5ba2\u6587\u7ae0\u4e2d\uff08\u6807\u9898\u4e3a\u201c\u5b9e\u73b0\u5bf9\u6240\u6709\u6570\u636e\u7684\u5373\u65f6\u8bbf\u95ee\u7684\u8c37\u6b4c\u5411\u91cf\u641c\u7d22\u6280\u672f\u201d\uff09\uff0c\u5bf9\u4e8e\u5411\u91cf\u641c\u7d22\u7684\u5185\u5bb9\u88ab\u63cf\u8ff0\u4e3a\u4e00\u9879\u80fd\u591f\u5373\u523b\u8bbf\u95ee\u4efb\u4f55\u6570\u636e\u7684\u6280\u672f\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/31-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8fd9\u4e2a\u8868\u8fbe\u662f\u57fa\u4e8e\u6240\u6709\u6570\u636e\u90fd\u53ef\u4ee5\u8f6c\u6362\u4e3a\u201c\u6570\u5b57\u5411\u91cf\u201d\u7684\u524d\u63d0\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u65e0\u8bba\u662f\u6587\u672c\u8fd8\u662f\u56fe\u50cf\uff0c\u53ea\u8981\u5c06\u6570\u636e\u96c6\u8f6c\u6362\u4e3a\u5411\u91cf\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u6570\u503c\u8ba1\u7b97\u6765\u6bd4\u8f83\u6570\u636e\u4e4b\u95f4\u7684\u76f8\u4f3c\u6027\u3002\u8fd9\u4e9b\u662f\u5411\u91cf\u641c\u7d22\u7684\u4e24\u4e2a\u5173\u952e \u3002<\/p>\n<p>\u5411\u91cf\u6570\u636e\u5e93\u6240\u6db5\u76d6\u7684\u662f\u5373\u540e\u8005\uff0c\u5373\u7528\u4e8e\u68c0\u6d4b\u5411\u91cf\u4e4b\u95f4\u76f8\u4f3c\u6027\u7684\u7b97\u6cd5\u3002\u8fd9\u6837\u7684\u7b97\u6cd5\u6709\u51e0\u79cd\u7c7b\u578b\uff0c\u800c\u6bcf\u79cd\u5411\u91cf\u6570\u636e\u5e93\u6240\u6db5\u76d6\u7684\u8303\u56f4\u4e5f\u4e0d\u540c\u3002<\/p>\n<p>\u5728\u53e6\u4e00\u65b9\u9762\uff0c\u6570\u636e\u5411\u91cf\u5316\u4e5f\u5b58\u5728\u8bb8\u591a\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u60a8\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u6587\u7ae0\u6765\u4e86\u89e3\u5411\u91cf\u5316\uff08\u5d4c\u5165\uff09\u7684\u542b\u4e49\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5728\u5411\u91cf\u6570\u636e\u5e93\u4e2d\uff0c\u6709\u4e00\u4e9b\u662f\u4e13\u95e8\u4e3a\u5411\u91cf\u641c\u7d22\u800c\u5f00\u53d1\u7684\uff0c\u4f8b\u5982Pinecone\u548cMilvus\uff0c\u8fd8\u6709\u4e00\u4e9b\u662f\u5728\u73b0\u6709\u6570\u636e\u5e93\u4e2d\u6dfb\u52a0\u4e86\u5411\u91cf\u641c\u7d22\u529f\u80fd\u7684\uff0c\u4f8b\u5982PostgreSQL\u548cMongoDB\u3002<br \/>\n\u901a\u8fc7\u5728Apache Cassandra\u4e2d\u6dfb\u52a0\u5411\u91cf\u641c\u7d22\u529f\u80fd\uff0cDataStax Astra\u53ef\u4ee5\u4f5c\u4e3a\u4e3a\u751f\u6210AI\u5e94\u7528\u7a0b\u5e8f\u800c\u8bbe\u8ba1\u7684\u5411\u91cf\u6570\u636e\u5e93\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/38-0.png\" alt=\"image.png\" \/><\/div>\n<h4>Cassandra\u7684\u5411\u91cf\u76f8\u4f3c\u5ea6\u641c\u7d22\u5f15\u64ce\uff1aJVector<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/40-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u7b80\u8981\u4ecb\u7ecdAstraDB\u548c\u5373\u5c06\u5728Cassandra\u7684\u4e0b\u4e00\u4e2a\u7248\u672c\u4e2d\u642d\u8f7d\u7684\u5411\u91cf\u76f8\u4f3c\u6027\u641c\u7d22\u5f15\u64ce\u3002<br \/>\n\u5728AstraDB\u7684\u6700\u521d\u5b9e\u73b0\u4e2d\uff0c\u91c7\u7528\u4e86\u4e1a\u754c\u6807\u51c6\u7684Lucene\u3002\u7136\u800c\uff0cDataStax\u7684\u5de5\u7a0b\u5e08\u4eec\u53d1\u73b0\u4e86Lucene\u5b9e\u73b0\u4e2d\u5b58\u5728\u7684\u95ee\u9898\uff0c\u4e8e\u662f\u4ed6\u4eec\u5f00\u53d1\u4e86\u4e00\u6b3e\u540d\u4e3aJVector\u7684\u72ec\u7279\u5411\u91cf\u5f15\u64ce\uff0c\u5e76\u4e3aCassandra\u793e\u533a\u505a\u51fa\u4e86\u8d21\u732e\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u6784\u6210\u5411\u91cf\u641c\u7d22\u5f15\u64ce\u7684\u7d22\u5f15\u529f\u80fd\u4f7f\u7528\u4e86\u4e00\u79cd\u79f0\u4e3a\u5b58\u50a8\u9644\u52a0\u7d22\u5f15\u7684\u6280\u672f\uff0c\u4ee5\u514b\u670d\u4f20\u7edf\u7684Cassandra\u7d22\u5f15\u6240\u9762\u4e34\u7684\u95ee\u9898\u3002<\/p>\n<p>\u901a\u8fc7\u8fd9\u4e9b\u5f00\u53d1\uff0cAstraDB\u7684\u641c\u7d22\u5f15\u64ce\u5b9e\u73b0\u4e86\u6bd4\u884c\u4e1a\u6807\u51c6\u7684Lucene\u9ad8\u51fa12\u500d\u4ee5\u4e0a\u7684\u541e\u5410\u91cf\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5bf9 Jvector \u5f00\u53d1\u7684\u7ecf\u8fc7\u611f\u5174\u8da3\uff0c\u53ef\u4ee5\u9605\u8bfb\u6211\u4eec\u7684\u535a\u5ba2\u300a\u89e3\u51b3\u5411\u91cf\u641c\u7d22\u4e2d\u4e94\u4e2a\u56f0\u96be\u95ee\u9898\u53ca Cassandra \u7684\u65b9\u6cd5\u300b\uff0c\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5176\u53d1\u5c55\u5386\u7a0b\u3002\u8bf7\u52a1\u5fc5\u524d\u5f80\u67e5\u770b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u4ece\u8fd9\u7bc7\u6587\u7ae0\u4e2d\u5f15\u7528\u4e00\u5f20\u56fe\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/47-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u6211\u5011\u9032\u884c\u4e86\u5c08\u9580\u91dd\u5c0d\u5411\u91cf\u641c\u7d22\u7684\u5411\u91cf\u5b58\u5132\u5eabPinecone\u548cAstraDB\u7684\u541e\u5410\u91cf\u6027\u80fd\u6bd4\u8f03\u3002\u7d2b\u8272\u8868\u793aAstraDB\uff0c\u7070\u8272\u8868\u793aPinecone\u3002<br \/>\n\u7070\u8272\u7684\u67f1\u72c0\u5716\u6709\u5169\u500b\uff0c\u800c\u6df1\u7070\u8272\u7684\u67f1\u72c0\u5716\u8868\u793a\u7684\u662f\u5728\u6578\u64da\u5eab\u4e2d\u9032\u884c\u6578\u64da\u7d22\u5f15\u7684\u6027\u80fd\u3002<br \/>\n\u9019\u6a23\uff0c\u5c08\u9580\u7684\u5411\u91cf\u5b58\u5132\u5eab\u4e2d\uff0c\u7531\u65bc\u6578\u64da\u66f4\u6539\u5f15\u8d77\u7684\u7d22\u5f15\u66f4\u65b0\u5c0d\u6027\u80fd\u7684\u5f71\u97ff\u975e\u5e38\u986f\u8457\u3002<br \/>\n\u5411\u91cf\u641c\u7d22\u529f\u80fd\u5305\u62ec\u5169\u500b\u6b65\u9a5f\uff1a\u6578\u64da\u7d22\u5f15\u548c\u5229\u7528\u7d22\u5f15\u9032\u884c\u641c\u7d22\u3002<br \/>\n\u9019\u7a2e\u6027\u80fd\u5dee\u7570\u53ef\u80fd\u662f\u7531\u65bc\u5c0d\u904b\u71df\u4e2d\u7684\u6578\u64da\u6dfb\u52a0\u548c\u66f4\u65b0\u9700\u6c42\u7684\u4e0d\u540c\u8003\u616e\u6240\u5c0e\u81f4\u7684\u3002\u5728\u67d0\u4e9b\u7528\u4f8b\u4e2d\uff0c\u9019\u53ef\u80fd\u4ecd\u7136\u8db3\u5920\u3002\u4f8b\u5982\uff0c\u5728\u7814\u767c\u9818\u57df\u7b49\u60c5\u6cc1\u4e0b\uff0c\u9019\u7a2e\u7f3a\u9ede\u53ef\u80fd\u4e26\u4e0d\u6210\u554f\u984c\u3002\u7136\u800c\uff0c\u5c0d\u65bc\u50c5\u9650\u65bc\u5411\u91cf\u641c\u7d22\u7684\u4e00\u822c\u6027\u6578\u64da\u5eab\u4f86\u8aaa\uff0c\u5728\u6578\u64da\u5eab\u9032\u884c\u6578\u64da\u6dfb\u52a0\u548c\u66f4\u65b0\u7684\u540c\u6642\uff0c\u6574\u500b\u6578\u64da\u5eab\u7684\u641c\u7d22\u6027\u80fd\u53d7\u5230\u5f71\u97ff\u662f\u96e3\u4ee5\u63a5\u53d7\u7684\u3002<\/p>\n<h4>SQL\u548c\u5411\u91cf\u641c\u7d22\uff1a\u7b80\u5355\u6613\u64cd\u4f5c<\/h4>\n<p>\u5728AstraDB\u4e2d\uff0c\u5bf9Cassandra\u8fdb\u884c\u529f\u80fd\u6269\u5c55\u5e76\u6dfb\u52a0\u4e86\u5411\u91cf\u641c\u7d22\u7684\u597d\u5904\u4e0d\u6b62\u4e00\u4e2a\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/51-0.png\" alt=\"image.png\" \/><\/div>\n<p>Cassandra\u7684CQL\u662f\u57fa\u4e8e\u6807\u51c6SQL\u7684\u67e5\u8be2\u8bed\u8a00\uff0c\u73b0\u5728\u5728\u5f15\u5165\u5411\u91cf\u641c\u7d22\u529f\u80fd\u540e\uff0c\u7528\u6237\u53ef\u4ee5\u5c06\u5411\u91cf\u641c\u7d22\u529f\u80fd\u5f53\u4f5cCQL\u7684\u6269\u5c55\u8bed\u6cd5\u6765\u4f7f\u7528\u3002<\/p>\n<p>\u4f5c\u4e3a\u5177\u4f53\u6269\u5c55\uff0c\u5f15\u5165\u4e86\u65b0\u7684\u6570\u636e\u7c7b\u578bVECTOR\u3002\u901a\u8fc7\u5b9a\u4e49\u7d22\u5f15\uff0c\u53ef\u4ee5\u5bf9\u8be5\u7c7b\u578b\u8fdb\u884c\u5411\u91cf\u641c\u7d22\u3002\u6b64\u5916\uff0c\u4f5c\u4e3aCQL\u67e5\u8be2\u7684\u6269\u5c55\uff0c\u5f15\u5165\u4e86\u7528\u4e8e\u5411\u91cf\u641c\u7d22\u7684\u64cd\u4f5c\u7b26ANN OF\u3002ANN\u4ee3\u8868\u8fd1\u4f3c\u6700\u8fd1\u90bb\u641c\u7d22\uff0c\u5373\u4f7f\u7528\u8fd1\u4f3c\u65b9\u6cd5\u8fdb\u884c\u6700\u8fd1\u90bb\u641c\u7d22\u3002<\/p>\n<p>\u6709\u4e00\u7bc7\u5173\u4e8eApache Cassandra\u7684\u5411\u91cf\u641c\u7d22\u529f\u80fd\u7684\u6587\u7ae0\u5982\u4e0b\u89e3\u91ca\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4>\u5bf9\u4e8e\u76f8\u4f3c\u5ea6\u7684\u7406\u89e3<\/h4>\n<p>\u6b64\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u7528\u4e8e\u4ee5\u6570\u503c\u5f62\u5f0f\u8861\u91cf\u5411\u91cf\u76f8\u4f3c\u5ea6\u7684\u51fd\u6570\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">SELECT<\/span> \r\n<span class=\"n\">description<\/span><span class=\"p\">,<\/span> \r\n<span class=\"n\">similarity_cosine<\/span><span class=\"p\">(<\/span><span class=\"n\">item_vector<\/span><span class=\"p\">,<\/span> <span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">15<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">12<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">05<\/span><span class=\"p\">])<\/span> \r\n<span class=\"k\">FROM<\/span> <span class=\"n\">vsearch<\/span><span class=\"p\">.<\/span><span class=\"n\">products<\/span> \r\n<span class=\"k\">ORDER<\/span> <span class=\"k\">BY<\/span> <span class=\"n\">item_vector<\/span> <span class=\"n\">ANN<\/span> <span class=\"k\">OF<\/span> <span class=\"p\">[<\/span><span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">1<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">15<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">3<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">12<\/span><span class=\"p\">,<\/span> <span class=\"mi\">0<\/span><span class=\"p\">.<\/span><span class=\"mi\">05<\/span><span class=\"p\">]<\/span> <span class=\"k\">LIMIT<\/span> <span class=\"mi\">1<\/span><span class=\"p\">;<\/span>\r\n<\/code><\/pre>\n<p>\u5411\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\u662f\u901a\u8fc7\u201c\u76f8\u4f3c\u5ea6\u201d\u800c\u4e0d\u662f\u201c\u5339\u914d\u5ea6\u201d\u6765\u8861\u91cf\u7684\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5411\u91cf\u641c\u7d22\u67e5\u8be2\u7684\u672c\u8d28\u662f\u6392\u5e8f\u529f\u80fd\uff0c\u800c\u4e0d\u662f\u901a\u5e38\u5728SQL\u7684WHERE\u5b50\u53e5\u4e2d\u5047\u8bbe\u7684\u641c\u7d22\u6761\u4ef6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u5b58\u50a8\u5728\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u5f88\u7a00\u5c11\uff0c\u6216\u8005\u67e5\u8be2\u5411\u91cf\u4e0e\u6570\u636e\u5e93\u5185\u5bb9\u5dee\u5f02\u8f83\u5927\uff0c\u4ece\u5411\u91cf\u6570\u636e\u5e93\u4e2d\u8fd4\u56de\u7684\u76f8\u4f3c\u6570\u636e\u53ef\u80fd\u4e0e\u4e4b\u4f3c\u4e4e\u6ca1\u6709\u5173\u7cfb\u3002\u901a\u8fc7\u4ee5\u6570\u503c\u5f62\u5f0f\u8861\u91cf\u5411\u91cf\u76f8\u4f3c\u5ea6\uff0c\u5e76\u4e22\u5f03\u4f4e\u4e8e\u67d0\u4e2a\u7279\u5b9a\u6570\u503c\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u907f\u514d\u8fd9\u79cd\u4e0d\u5339\u914d\u3002<\/p>\n<h4>\u5411\u91cf\u6570\u636e\u5e93\u9762\u4e34\u7684\u4e09\u4e2a\u6311\u6218<\/h4>\n<p>\u6211\u5c06\u5bf9\u5411\u91cf\u6570\u636e\u5e93\u53ef\u80fd\u9762\u4e34\u7684\u4e09\u4e2a\u6311\u6218\u8fdb\u884c\u6574\u7406\u3002<\/p>\n<p>\u691c\u7d22\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u66f4\u65b0<\/p>\n<p>\u30c7\u30fc\u30bf\u306f\u66f4\u65b0\u3055\u308c\u308b<br \/>\n\u5c02\u7528\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\u306f\u904b\u7528\u4e2d\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u66f4\u65b0\u306b\u96e3\u3042\u308a<\/p>\n<p>\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8<\/p>\n<p>\u30c7\u30fc\u30bf\u306f\u5897\u3048\u308b<br \/>\n\u6027\u80fd\u8981\u4ef6\u306f\u69d8\u3005<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3057\u3066\u306e\u6c4e\u7528\u6027<\/p>\n<p>\u30d9\u30af\u30c8\u30eb\u691c\u7d22\u3060\u3051\u3067\u306f\u4e8b\u8db3\u308a\u306a\u3044<\/p>\n<p>\u4e8c\u3064\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\uff08\u6c4e\u7528\u3068\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\uff09\u3092\u904b\u7528\u3059\u308b\u304b\uff1f<br \/>\n\u30d9\u30af\u30c8\u30eb\u691c\u7d22\u6a5f\u80fd\u3092\u6301\u3063\u305f\u4e00\u3064\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u904b\u7528\u3059\u308b\u306e\u304b\uff1f<\/p>\n<p>\u958b\u767a\u3078\u306e\u5f71\u97ff<\/p>\n<p>\u65e2\u5b58\u306e\u77e5\u8b58\u30fb\u7d4c\u9a13\u3092\u6d3b\u304b\u305b\u308b\u5229\u70b9<\/p>\n<p>\u6b63\u5982\u524d\u9762\u63d0\u5230\u7684\uff0c\u4e13\u7528\u7684\u5411\u91cf\u5b58\u50a8\u5728\u7d22\u5f15\u66f4\u65b0\u671f\u95f4\u53ef\u80fd\u5b58\u5728\u95ee\u9898\uff0c\u4e0d\u9002\u5408\u8fdb\u884c\u6b63\u5f0f\u7684\u670d\u52a1\u8fd0\u8425\u3002\u6b64\u5916\uff0c\u65e0\u8bba\u5ffd\u7565\u7d22\u5f15\u5316\u5bf9\u6027\u80fd\u7684\u5f71\u54cd\uff0c\u6570\u636e\u5e93\u90fd\u4f1a\u53d7\u5230\u5904\u7406\u6570\u636e\u589e\u52a0\u3001\u4ee5\u53ca\u4f5c\u4e3a\u670d\u52a1\u4f7f\u7528\u91cf\u589e\u52a0\u7b49\u53d8\u5316\u7684\u5f71\u54cd\u3002\u50cfCassandra\u8fd9\u6837\u88ab\u79f0\u4e3aNoSQL\u7684\u6570\u636e\u5e93\u5c31\u662f\u4e3a\u4e86\u5e94\u5bf9\u8fd9\u79cd\u89c4\u6a21\u6269\u5c55\u7684\u6311\u6218\u800c\u5f00\u53d1\u7684\u3002\u6b64\u5916\uff0c\u6570\u636e\u5e93\u7684\u901a\u7528\u6027\u4e0d\u4ec5\u76f4\u63a5\u76f8\u5173\u8fd0\u8425\u6210\u672c\uff0c\u8fd8\u4f1a\u5f71\u54cd\u5f00\u53d1\u6210\u672c\u3002<\/p>\n<h2>LangChain\u7684\u4ecb\u7d39<\/h2>\n<p>\u90a3\u4e48\uff0c\u73b0\u5728\u6211\u4eec\u5f00\u59cb\u8fdb\u5165LangChain\u7684\u5165\u95e8\u6559\u7a0b\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u65e0\u6cd5\u5bf9LangChain\u7684\u6240\u6709\u529f\u80fd\u505a\u5168\u9762\u8ba8\u8bba\uff0c\u4f46\u662f\u8003\u8651\u5230\u5b83\u5728\u5b9e\u9645\u670d\u52a1\u5f00\u53d1\u4e2d\u7684\u4f7f\u7528\uff0c\u6211\u4f1a\u6839\u636e\u8fc7\u53bb\u7684\u8fdb\u5c55\u6765\u89e3\u91ca\u4e00\u4e9b\u6709\u7528\u7684\u4fe1\u606f\u3002<\/p>\n<h3>LLM\u6846\u67b6\u7684\u80cc\u666f\u548c\u4f18\u52bf<\/h3>\n<h4>\u4ea7\u751fAI\u5229\u7528\u7684\u9009\u62e9<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/69-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5173\u4e8eAI\u751f\u6210\uff0c\u9664\u4e86\u6d89\u53ca\u5904\u7406\u81ea\u7136\u8bed\u8a00\u7684\u4e00\u9762\uff0c\u8fd8\u6709\u56fe\u50cf\u751f\u6210\u7684\u65b9\u9762\uff0c\u4f46\u5728\u63a5\u4e0b\u6765\u7684\u8ba8\u8bba\u4e2d\uff0c\u7279\u522b\u5173\u6ce8\u81ea\u7136\u8bed\u8a00\u5904\u7406\uff0c\u57fa\u4e8e\u5176\u5728\u5546\u4e1a\u4e0a\u7684\u91cd\u8981\u6027\u3002<\/p>\n<p>\u751f\u6210AI\u5728\u81ea\u7136\u8bed\u8a00\u5904\u7406\u9886\u57df\u7684\u5e94\u7528\u5305\u62ec\u7406\u89e3\u548c\u56de\u7b54\u81ea\u7136\u8bed\u8a00\u67e5\u8be2\uff0c\u4ee5\u53ca\u9488\u5bf9\u975e\u7ed3\u6784\u5316\u6570\u636e\u5982PDF\u6587\u4ef6\u7684\u64cd\u4f5c\u3001\u641c\u7d22\u548c\u6458\u8981\u751f\u6210\uff0c\u8fd9\u4e9b\u90fd\u53ef\u4ee5\u901a\u8fc7\u7406\u89e3\u6587\u672c\u7684\u542b\u4e49\u548c\u4e0a\u4e0b\u6587\u6765\u5b9e\u73b0\u3002\u5728LangChain\u4e2d\uff0c\u4e13\u95e8\u63d0\u4f9b\u4e86\u76f8\u5e94\u7684\u7ec4\u4ef6\u6765\u5b9e\u73b0\u8fd9\u4e9b\u529f\u80fd\u3002\u7136\u800c\uff0c\u751f\u6210AI\u7684\u6f5c\u529b\u8fdc\u4e0d\u6b62\u4e8e\u6b64\uff0c\u7279\u522b\u662f\u5728\u5546\u4e1a\u5316\u5e94\u7528\u65b9\u9762\u3002<\/p>\n<p>\u5728\u670d\u52a1\u5316\u9886\u57df\uff0cLLM\u4e0d\u4ec5\u53ef\u4ee5\u7528\u4e8e\u76f4\u63a5\u4e0e\u7528\u6237\u8fdb\u884c\u804a\u5929\u7b49\u4ea4\u4e92\u5f0f\u670d\u52a1\uff0c\u8fd8\u53ef\u4ee5\u4f5c\u4e3a\u7cfb\u7edf\u7684\u4e00\u90e8\u5206\u4e0e\u5404\u79cd\u5176\u4ed6\u529f\u80fd\u7ed3\u5408\uff0c\u4ece\u800c\u53d1\u6325\u66f4\u5927\u7684\u4ef7\u503c\u3002\u63d0\u4f9bLLM\u7684\u5404\u4e2a\u4f9b\u5e94\u5546\u90fd\u63d0\u4f9b\u4e86API\uff0c\u901a\u8fc7\u5229\u7528\u8fd9\u4e9bAPI\uff0c\u5b9e\u73b0\u6b64\u7c7b\u670d\u52a1\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7cfb\u7edf\u81ea\u52a8\u53d1\u9001\u90ae\u4ef6\u7684\u65b9\u5f0f\u6765\u5904\u7406\u7528\u6237\u901a\u8fc7\u7535\u5b50\u90ae\u4ef6\u63d0\u51fa\u7684\u67e5\u8be2\uff0c\u800c\u65e0\u9700\u7ecf\u8fc7\u4eba\u5de5\u786e\u8ba4\u7684\u6d41\u7a0b\uff0c\u4ece\u800c\u63d0\u9ad8\u6548\u7387\u3002\u53e6\u5916\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u8003\u8651\u901a\u8fc7\u751f\u6210\u57fa\u4e8e\u89e6\u53d1\u5668\u4e0a\u4e0b\u6587\u7684\u6587\u7ae0\uff0c\u5728\u7535\u5b50\u5546\u52a1\u6d3b\u52a8\u4e2d\u8fdb\u884c\u4fc3\u9500\u6d3b\u52a8\uff0c\u5e76\u5728\u7f51\u7ad9\u4e0a\u8fdb\u884c\u63a8\u9001\u901a\u77e5\u3002<\/p>\n<p>LLM\u53ef\u4ee5\u6839\u636e\u6307\u4ee4\u6765\u6307\u5b9a\u54cd\u5e94\u7684\u8f93\u51fa\u683c\u5f0f\uff0c\u5982JSON\u6216CSV\u7b49\u7cfb\u7edf\u53ef\u5904\u7406\u7684\u683c\u5f0f\uff0c\u4ece\u800c\u65b9\u4fbf\u7cfb\u7edf\u96c6\u6210\u3002<\/p>\n<p>\u5b9e\u9645\u4e0a\uff0c\u4f7f\u7528LLM\u5c06\u65b0\u670d\u52a1\u7528\u4e8e\u4f01\u4e1a\u4f3c\u4e4e\u6210\u529f\u5b9e\u73b0\u4e86\u8fd9\u6837\u7684\u7cfb\u7edf\u96c6\u6210\u3002\u53e6\u4e00\u65b9\u9762\uff0c\u6839\u636e\u6211\u4e2a\u4eba\u7684\u89c2\u70b9\uff0c\u900f\u8fc7LangChain\u7684\u6587\u6863\u672c\u8eab\uff0c\u6216\u8005\u4ee5\u6b64\u4e3a\u57fa\u7840\u7684\u89e3\u91ca\u6027\u6587\u7ae0\u7b49\uff0c\u4f3c\u4e4e\u4f1a\u4ea7\u751f\u5bf9\u6587\u6863\u5904\u7406\u548c\u4ec5\u9002\u7528\u4e8e\u804a\u5929\u754c\u9762\u7b49\u9886\u57df\u7684\u9650\u5236\u6027\u5370\u8c61\u3002\u56e0\u6b64\uff0c\u5728\u8fd9\u91cc\uff0c\u6211\u60f3\u5c3d\u91cf\u6d88\u9664\u8fd9\u79cd\u9650\u5b9a\u5370\u8c61\uff0c\u5e76\u8fdb\u884c\u89e3\u91ca\u3002<\/p>\n<h4>\u5e94\u7528\/\u6846\u67b6\u7684\u6838\u5fc3\uff1a\u4ee3\u7406<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/74-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4f7f\u7528\u8fd9\u79cd\u6846\u67b6\u65f6\uff0c\u5178\u578b\u7684\u5e94\u7528\u7a0b\u5e8f\u7684\u6784\u6210\u5305\u62ec\u4e00\u4e2a\u88ab\u79f0\u4e3a\u4ee3\u7406\u7684\u7ec4\u4ef6\uff0c\u6b63\u5982\u5176\u540d\u79f0\u6240\u793a\uff0c\u8be5\u7ec4\u4ef6\u5145\u5f53\u7528\u6237\u7684\u4ee3\u7406\u4eba\uff0c\u626e\u6f14\u4e2d\u4ecb\u5404\u79cd\u529f\u80fd\u7684\u89d2\u8272\u3002\u5176\u4e2d\u4e4b\u4e00\u7684\u89d2\u8272\u662f\u9664\u4e86\u63d0\u793a\u5de5\u7a0b\u4e4b\u5916\uff0c\u8fd8\u6709\u5404\u79cd\u7f13\u5b58\u7684\u64cd\u4f5c\u3002\u4f8b\u5982\uff0c\u7f13\u5b58LLM\u7684\u54cd\u5e94\uff0c\u5e76\u5728\u63a5\u6536\u5230\u76f8\u540c\u8bf7\u6c42\u65f6\u8fd4\u56de\u7f13\u5b58\u7684\u54cd\u5e94\uff0c\u5c31\u50cf\u8fc7\u53bb\u5df2\u7ecf\u53d1\u751f\u8fc7\u4e00\u6837\u3002<\/p>\n<p>\u66f4\u91cd\u8981\u7684\u662f\uff0c\u8fd9\u4e9bLLM\u7684\u54cd\u5e94\u53ef\u4ee5\u591a\u6b21\u6267\u884c\u4ee5\u56de\u5e94\u7cfb\u7edf\u7684\u5355\u4e2a\u8bf7\u6c42\u76ee\u7684\u3002\u5728\u63d0\u793a\u5de5\u7a0b\u6280\u672f\u7684\u53d1\u5c55\u4e2d\uff0c\u6709\u5404\u79cd\u5173\u4e8e\u5229\u7528\u8fd9\u4e9bLLM\u7684\u89c1\u89e3\u88ab\u5206\u4eab\u3002\u8fd9\u4e9b\u89c1\u89e3\u4ee5\u6846\u67b6\u7684\u5f62\u5f0f\u53ef\u4f9b\u4f7f\u7528\u3002<\/p>\n<p>\u4f5c\u4e3a\u8fd9\u79cd\u6846\u67b6\u7684\u4ee3\u8868\uff0c\u6709LangChain\u3002<\/p>\n<h4>\u4f7f\u7528LangChain\u7684\u597d\u5904<\/h4>\n<p>\u9996\u5148\uff0c\u8ba9\u6211\u4eec\u6574\u7406\u4e00\u4e0b\u4f7f\u7528LangChain\u7684\u597d\u5904\u3002<\/p>\n<h5>\u5178\u578b\u7684\u7684AI\u5e94\u7528\u7a0b\u5e8f\u7ed3\u6784\u7684\u8868\u793a\u65b9\u5f0f<\/h5>\n<p>\u9996\u5148\uff0c\u5173\u4e8e\u751f\u6210\u4eba\u5de5\u667a\u80fd\u5e94\u7528\u7a0b\u5e8f\u7684\u5178\u578b\u7ed3\u6784\uff0c\u6709\u5982\u4e0b\u7684\u8868\u8fbe\u65b9\u5f0f\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30e2\u30c7\u30eb<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\uff08\u5178\u578b\u7684\u306a\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u3092\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\u306b\u30ed\u30fc\u30c9\u3059\u308b\u6a5f\u80fd\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8<\/ul>\n<h5>\u5b9e\u65bdPrompt Engineering\u7684\u5404\u79cd\u6280\u672f\u3002<\/h5>\n<p>\u540c\u65f6\uff0c\u5b9e\u65bd\u4e86\u5404\u79cd\u63d0\u53d6\u5de5\u7a0b\u7684\u6210\u679c\u7684\u591a\u79cd\u6280\u5de7\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">ReAct<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Chain Of Thought<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">FLARE\u3001\u7b49<\/ul>\n<h5>\u5355\u72ec\u5b9e\u65bd\u751f\u6210AI\u5e94\u7528\u7a0b\u5e8f\u6784\u5efa\u8981\u7d20\u3002<\/h5>\n<p>\u9664\u6b64\u4e4b\u5916\uff0c\u8fd8\u63d0\u4f9b\u4e86\u591a\u79cd\u4e0d\u540c\u7684\u5355\u72ec\u5b9e\u65bd\uff0c\u5982\u5404\u79cdLLM\u6a21\u578b\u548c\u77e2\u91cf\u5b58\u50a8\uff0c\u7528\u4e8e\u6784\u5efa\u751f\u6210\u578b\u4eba\u5de5\u667a\u80fd\u5e94\u7528\u7a0b\u5e8f\u7684\u8981\u7d20\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">LLM\uff1aOpenAI\u7b49<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\uff1aPineCone, Cassandra\u7b49<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u30ed\u30fc\u30c0\u30fc\u3001\u7b49<\/ul>\n<p>\u5728\u5411\u5411\u91cf\u5b58\u50a8\u4e2d\u6ce8\u518c\u6570\u636e\u65f6\uff0c\u8fd8\u53ef\u4ee5\u8003\u8651\u5305\u542b\u6570\u636e\u52a0\u8f7d\u5668\u529f\u80fd\u3002<\/p>\n<h4>\u5361\u897f\u5965<\/h4>\n<p>&nbsp;<\/p>\n<p>\u5728\u4f7f\u7528LangChain\u7684\u4f18\u70b9\u4e2d\uff0cCassandra\u793e\u533a\u63a8\u51fa\u4e86CassIO\u9879\u76ee\u4f5c\u4e3a\u6700\u540e\u4e00\u4e2a\u8981\u7d20\u3002<\/p>\n<p>CassIO\u7684\u76ee\u6807\u662f\u5728\u4e0e\u5404\u79cd\u751f\u6210AI\u6846\u67b6\u7ed3\u5408\u65f6\uff0c\u5c06\u6846\u67b6\u5bf9Cassandra\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u7ec6\u8282\u8fdb\u884c\u62bd\u8c61\u5316\uff0c\u5b9e\u73b0Cassandra\u4e0e\u6846\u67b6\u7684\u65e0\u7f1d\u96c6\u6210\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/94-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u4ece\u5f00\u53d1\u7684\u89d2\u5ea6\u6765\u770bCassIO\uff0cCassandra\u7c7b\u5305\u542b\u5728langchain.vectorstore\u5305\u4e2d\uff08\u5b9e\u73b0\u7531import cassio\u63d0\u4f9b\uff09\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/96-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u8fd9\u4e2aCassandra\u7c7b\u4e0elangchain.vectorstora\u5305\u4e2d\u7684\u5176\u4ed6\u5411\u91cf\u6570\u636e\u5e93\u5177\u6709\u76f8\u540c\u7684\u8bbe\u8ba1\uff0c\u56e0\u6b64\u5f00\u53d1\u8005\u4e0d\u4e00\u5b9a\u9700\u8981\u4e86\u89e3Cassandra\u7684\u4e13\u6709\u6280\u672f\u5c31\u53ef\u4ee5\u5c06Cassandra\u7528\u4f5c\u5411\u91cf\u5b58\u50a8\u3002<\/p>\n<h3>LangChain\u5165\u95e8\uff1a\u6570\u636e\u6e90\u548c\u5411\u91cf\u5b58\u50a8<\/h3>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u7740\u773c\u4e8e\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u7684\u66f4\u5177\u4f53\u65b9\u9762\u3002<\/p>\n<p>\u4f5c\u4e3a\u4eba\u5de5\u667a\u80fd\u4e2d\u5178\u578b\u7684\u6570\u636e\u6e90\uff0c\u6587\u6863\u548c\u6587\u672c\u88ab\u63d0\u4f9b\u76f8\u5e94\u7684\u7ec4\u4ef6\u3002\u8fd9\u4e9b\u7ec4\u4ef6\u4ece\u6570\u636e\u6e90\u4e2d\u8bfb\u53d6\u6570\u636e\uff0c\u5e76\u8fdb\u884c\u5fc5\u8981\u7684\u8f6c\u6362\uff0c\u7136\u540e\u52a0\u8f7d\u5230\u5411\u91cf\u5b58\u50a8\u4ee5\u6784\u5efa\u5411\u91cf\u5b58\u50a8\uff0c\u6db5\u76d6\u4e86\u4e00\u7cfb\u5217\u64cd\u4f5c\u3002<\/p>\n<p>\u5728\u52a0\u8f7d\u6570\u636e\u5230\u5411\u91cf\u5b58\u50a8\u4e2d\u7684\u201c\u6587\u6863\u52a0\u8f7d\u5668\u201d\u4e2d\uff0c\u5b58\u5728\u7740\u4ee5\u4e0b\u591a\u79cd\u4e0d\u540c\u7684\u9009\u62e9\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u8fd9\u4e9b\u662f\u6846\u67b6\u5728\u6548\u7528\u65b9\u9762\u7684\u4e00\u4e9b\u65b9\u9762\uff0c\u5728\u8fd9\u91cc\u53ea\u4ecb\u7ecd\u4e00\u90e8\u5206\u3002<\/p>\n<h4>\u5411\u91cf\u5b58\u50a8\uff1a\u5d4c\u5165\u7ea7\u522b\u7684\u5411\u91cf\u5b58\u50a8<\/h4>\n<p>\u5982\u679c\u6211\u4eec\u5c06\u6ce8\u610f\u529b\u8f6c\u5411VectorStore\u672c\u8eab\uff0c\u6211\u4eec\u9996\u5148\u4f1a\u5728LangChain\u7684\u6587\u6863\u4e2d\u770b\u5230\u7684\u662f\u4e00\u4e2a\u88ab\u79f0\u4e3aChroma\u7684VectorStore\u3002Chroma\u53ef\u4ee5\u8bf4\u662f\u4e00\u4e2a\u5d4c\u5165\u7ea7\u522b\u7684\u6570\u636e\u5e93\uff0c\u901a\u8fc7\u4f7f\u7528Chroma\uff0c\u60a8\u53ef\u4ee5\u5728Vector\u6570\u636e\u5e93\u4e2d\u5b89\u88c5\u6570\u636e\u5e93\uff0c\u4f7f\u7528\u8fde\u63a5\u70b9\u548c\u7528\u6237\u8fdb\u884c\u6ce8\u518c\uff0c\u800c\u65e0\u9700\u4f7f\u7528API\u5bc6\u94a5\u3002\u7136\u800c\uff0c\u6b63\u5982\u7a0d\u52a0\u601d\u8003\u5c31\u4f1a\u660e\u767d\u7684\u90a3\u6837\uff0c\u5bf9\u4e8e\u771f\u6b63\u7684\u5e94\u7528\u7a0b\u5e8f\u6765\u8bf4\uff0c\u8fd9\u8fd8\u4e0d\u591f\u3002\u7136\u800c\uff0c\u5728\u6846\u67b6\u4e2d\uff0c\u5bf9VectorStore\u7684\u64cd\u4f5c\u5df2\u7ecf\u5728\u7a0d\u540e\u4ecb\u7ecd\u7684\u7c7bRetriever\u7ea7\u522b\u4e0a\u8fdb\u884c\u4e86\u62bd\u8c61\u5316\u3002\u56e0\u6b64\uff0c\u5728\u5f00\u59cb\u5b66\u4e60LangChain\u65f6\uff0c\u4f7f\u7528Chroma\u53ef\u4ee5\u5feb\u901f\u5165\u95e8\u3002<\/p>\n<h4>\u4f7f\u7528DataStax Astra\u6765\u64cd\u4f5c\u5411\u91cf\u6570\u636e\u5e93\u3002<\/h4>\n<p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u4ecb\u7ecd\u4f7f\u7528AstraDB\u7684\u60c5\u51b5\uff0c\u9884\u8ba1\u5728\u66f4\u4e3a\u6b63\u5f0f\u7684\u5e94\u7528\u4e2d\u4f7f\u7528\u3002<br \/>\n\u4f7f\u7528cassandra\u5305\uff0c\u521d\u59cb\u5316\u4e0eCassandra\u6570\u636e\u5e93\u7684\u4f1a\u8bdd\uff0c\u5e76\u4f7f\u7528\u8be5\u4f1a\u8bdd\u4f5c\u4e3a\u53c2\u6570\uff0c\u901a\u8fc7\u521d\u59cb\u5316Cassandra\u7c7b\u6765\u5c06AstraDB\u7528\u4f5cLangChain\u6846\u67b6\u4e2d\u7684\u5411\u91cf\u5b58\u50a8\u3002<br \/>\n\u901a\u8fc7\u521d\u59cb\u5316\u8be5\u7c7b\uff0c\u5c06\u81ea\u52a8\u5728AstraDB\u4e0a\u8fdb\u884c\u8868\u5b9a\u4e49\u548c\u7d22\u5f15\u5b9a\u4e49\u3002<\/p>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u7c7b\uff0c\u81ea\u52a8\u751f\u6210\u7684\u8868\u4f1a\u6210\u4e3a\u4e00\u4e2a\u5171\u540c\u6a21\u578b\uff0c\u9664\u4e86\u540d\u5b57\u4ee5\u5916\u90fd\u662f\u76f8\u540c\u7684\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/109-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u57fa\u672c\u4e0a\uff0c\u8bb0\u5f55\u7531\u5411\u91cf\u6570\u636e\u548c\u5411\u91cf\u5316\u4e4b\u524d\u7684\u6570\u636e\u6784\u6210\u3002\u4f46\u662f\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u4e0e\u7528\u4f8b\u76f8\u9002\u5e94\u7684\u503c\u5b58\u50a8\u5728\u7531\u9879\u76ee\u540d\u548c\u503c\u7ec4\u6210\u7684\u6620\u5c04\u683c\u5f0f\u7684\u5217\u4e2d\uff0c\u79f0\u4e3a\u5143\u6570\u636e\u3002<\/p>\n<h4>\u521b\u5efa\u5b9a\u5236\u7684Retriever<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/112-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u5728LangChain\u4e2d\uff0c\u9664\u4e86\u652f\u6301Cassandra\u548c\u5176\u4ed6\u5411\u91cf\u641c\u7d22\u529f\u80fd\u7684\u6570\u636e\u5e93\u5916\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u6269\u5c55BaseRetriever\u5e76\u5b9a\u4e49\u81ea\u5df1\u7684Retriever\u7c7b\u6765\u5b9e\u73b0\u53e6\u4e00\u79cd\u65b9\u6cd5\u3002<\/p>\n<p>\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u5145\u5206\u5229\u7528\u8be5\u6570\u636e\u5e93\u6700\u539f\u59cb\u7684\u6f5c\u529b\u3002<\/p>\n<p>\u5728\u5d4c\u5165\u5f0f\u7ea7\u522b\u7684\u6570\u636e\u5e93\u4e2d\uff0c\u53ef\u4ee5\u8fdb\u884c\u4e0e\u4f7f\u7528\u6848\u4f8b\u548c\u6570\u636e\u6a21\u578b\u76f8\u9002\u5e94\u7684\u8bbe\u8ba1\u548c\u64cd\u4f5c\uff0c\u4f8b\u5982\uff0c\u5206\u5e03\u5f0f\u73af\u5883\u4e0b\u7684\u6570\u636e\u5e03\u5c40\u4f18\u5316\uff0c\u8fd9\u662f\u65e0\u6cd5\u60f3\u8c61\u7684\u3002<\/p>\n<p>\u800c\u4e14\uff0c\u5982\u679c\u4f7f\u7528LangChain\u7684\u5411\u91cf\u5b58\u50a8\u7c7b\uff0c\u5373\u4f7f\u6ca1\u6709\u6570\u636e\u5e93\u7279\u5b9a\u7684\u77e5\u8bc6\uff0c\u4e5f\u53ef\u4ee5\u6267\u884c\u901a\u8fc7\u5143\u6570\u636e\u8fdb\u884c\u8fc7\u6ee4\u3001\u83b7\u53d6\u76f8\u4f3c\u5ea6\u8bc4\u5206\u7b49\u5e38\u89c4\u5904\u7406\uff0c\u800c\u5982\u679c\u5b9e\u73b0Retriever\uff0c\u5c06\u9700\u8981\u76f4\u63a5\u7f16\u5199\u9488\u5bf9\u6570\u636e\u5e93\u7684\u67e5\u8be2\u8bed\u53e5\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e0d\u5e0c\u671b\u8fc7\u591a\u5730\u5173\u6ce8\u5bf9\u6570\u636e\u5c42\u7684\u64cd\u4f5c\uff0c\u90a3\u4e48\u4f7f\u7528\u7c7b\u662f\u5408\u7406\u7684\u9009\u62e9\u3002\u4f46\u5bf9\u4e8e\u90a3\u4e9b\u5177\u5907\u6570\u636e\u5e93\u7cfb\u7edf\u5f00\u53d1\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u901a\u8fc7\u5f00\u53d1\u81ea\u5b9a\u4e49\u7684\u68c0\u7d22\u5668\uff08Retriever\uff09\u7c7b\u53ef\u4ee5\u6700\u5927\u7a0b\u5ea6\u5730\u5229\u7528\u8bbe\u8ba1\u548c\u5f00\u53d1\u81ea\u7531\u5ea6\u3002<\/p>\n<h3>LangChain\u5f00\u59cb\u4f7f\u7528\uff1a\u4ee3\u7406\u5546<\/h3>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u89e3\u91ca\u751f\u6210AI\u5e94\u7528\u7a0b\u5e8f\u7684\u6838\u5fc3\u4ee3\u7406\u3002<\/p>\n<p>\u5728\u8fdb\u5165\u4ee3\u7406\u5546\u7ec6\u8282\u4e4b\u524d\uff0c\u6211\u4eec\u5148\u63d0\u4e00\u4e0b\u5728LangChain\u4e2d\u6709\u4e00\u4e2a\u7c7b\u4f3c\u4e8e\u4ee3\u7406\u5546\u7684\u7ec4\u4ef6\u94fe\uff0c\u5176\u76ee\u7684\u4e0e\u4ee3\u7406\u5546\u76f8\u4f3c\u3002<\/p>\n<p>\u8fd9\u662f\u4eceLangChain\u7684\u6587\u6863\u4e2d\u5f15\u7528\u7684\uff0c\u4f46\u662f\u5728\u94fe\u6761\u4e2d\uff0c\u4e00\u7cfb\u5217\u7684\u52a8\u4f5c\u662f\u786c\u7f16\u7801\u5728\u4ee3\u7801\u4e2d\u7684\uff0c\u800c\u5728\u4ee3\u7406\u4e2d\uff0c\u8bed\u8a00\u6a21\u578b\u88ab\u7528\u4f5c\u63a8\u7406\u5f15\u64ce\uff0c\u51b3\u5b9a\u4ee5\u4ec0\u4e48\u987a\u5e8f\u6267\u884c\u54ea\u4e9b\u52a8\u4f5c\u3002<\/p>\n<p>\u5728LangChain\u4e0a\u4f7f\u7528LLM\u6709\u4e09\u79cd\u65b9\u6cd5\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u307e\u305a\u306f\u3001\u5358\u7d14\u306b\u3001\u30e2\u30c7\u30eb\u3092\u76f4\u63a5\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u6b21\u306b\u30c1\u30a7\u30fc\u30f3\u3092\u4f7f\u3063\u305f\u5834\u5408\u3001\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3057\u305f\u4e00\u9023\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u53ef\u80fd\u3068\u8aac\u660e\u3057\u307e\u3057\u305f\u304c\u3001\u30c1\u30a7\u30fc\u30f3\u3092\u4f7f\u308f\u305a\u306b\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3067\u9806\u6b21\u30e2\u30c7\u30eb\u3092\u5b9f\u884c\u3057\u305f\u5834\u5408\u3068\u6bd4\u3079\u305f\u5229\u70b9\u3068\u3057\u3066\u3001\u305d\u308c\u3089\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u969b\u306e\u30d0\u30c3\u30c1\u51e6\u7406\u306e\u3055\u307e\u3056\u307e\u306a\u624b\u6cd5\u3092\u6d3b\u7528\u3067\u304d\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u305d\u3057\u3066\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3092\u5229\u7528\u3057\u305f\u5834\u5408\u306b\u306f\u3001\u8a00\u8a9e\u30e2\u30c7\u30eb\u3092\u63a8\u8ad6\u30a8\u30f3\u30b8\u30f3\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u3001\u975e\u5e38\u306b\u591a\u304f\u306e\u5229\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/ul>\n<p>\u90a3\u4e48\uff0c\u4ece\u8fd9\u91cc\u5f00\u59cb\u6211\u4eec\u6765\u770b\u4e00\u4e0b\u4ee3\u7406\u5546\u3002<\/p>\n<h4>\u4ee3\u7406\u5546\u7684\u5efa\u7acb\u548c\u4f7f\u7528<\/h4>\n<p>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u91cd\u70b9\u4ecb\u7ecdAgent\u548cRetriever\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<br \/>\n\u6b63\u5982LangChain\u7684\u6587\u6863\u4e2d\u6240\u5355\u72ec\u63d0\u5230\u7684\u90a3\u6837\uff0c\u6784\u5efaAgent\u6709\u51e0\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u53ef\u4ee5\u5728LangChain\u4e2d\u5b9e\u73b0\u3002<br \/>\n\u901a\u8fc7\u89e3\u5f00\u5b83\u4eec\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u6211\u4eec\u5e0c\u671b\u63d0\u4f9b\u4e00\u4e9b\u4fe1\u606f\u6765\u5e94\u7528\u4e8e\u4eca\u540e\u7684\u5b66\u4e60\u3002<\/p>\n<p>\u9996\u5148\uff0cLangChain\u4e2d\u7684\u201cAgent with retrieval tool\u201d\u90e8\u5206\u7684\u89e3\u91ca\u4ece\u6784\u9020\u51fd\u6570\u7528\u4e8e\u6784\u5efa\u4ee3\u7406\u7684\u5b50\u90e8\u5206\u5f00\u59cb\u3002<br \/>\n\u4e2a\u4eba\u8ba4\u4e3a\u8fd9\u4e2a\u8868\u8fbe\u6709\u4e9b\u8bef\u5bfc\u6027\uff0c\u8fd9\u91cc\u6240\u8bf4\u7684\u6784\u9020\u51fd\u6570\u4e0d\u662f\u6307\u6784\u9020\u51fd\u6570\u65b9\u6cd5\u8d1f\u8d23\u521d\u59cb\u5316\u7c7b\uff0c\u800c\u662f\u6307\u7528\u4e8e\u666e\u901a\u51fd\u6570\u6216\u529f\u80fd\u7684\u8868\u8fbe\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/128-0.png\" alt=\"image.png\" \/><\/div>\n<p>\u901a\u8fc7\u4f7f\u7528LLM\u548cTOOLS\u4f5c\u4e3a\u53c2\u6570\uff0c\u6784\u5efa\u540d\u4e3acreate_conversational_retrieval_agent\u7684\u51fd\u6570\u4e2d\u7684agent_executor\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u8bf7\u8bb0\u4f4f\u8fd9\u4e2a\u51fd\u6570\u6240\u5728\u7684\u5305\u662flangchain.agents.agent_toolkits\u3002<\/p>\n<h4>\u901a\u8fc7\u5b9e\u7528\u65b9\u6cd5\u521b\u5efa\u4ee3\u7406\u3002<\/h4>\n<p>\u67e5\u770b\u8fd9\u4e2a\u51fd\u6570\u7684\u5185\u90e8\u5b9a\u4e49\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5728\u6267\u884c\u4e86\u591a\u4e2a\u76f8\u5173\u7684\u5904\u7406\u6b65\u9aa4\u4e4b\u540e\uff0c\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3aOpenAIFunctionsAgent\u7684\u7c7b\u7684\u5b9e\u4f8b\u3002<\/p>\n<p>\u6362\u53e5\u8bdd\u8bf4\uff0c\u8fd9\u4e2a\u51fd\u6570\u5e76\u4e0d\u662f\u4f5c\u4e3a\u901a\u7528\u51fd\u6570\u8bbe\u8ba1\u7684\uff0c\u800c\u662f\u5047\u5b9a\u4f7f\u7528\u7279\u5b9a\u7684\u6700\u5e38\u7528\u7684LLM\u63d0\u4f9b\u5546\u7684\u51fd\u6570\u3002\u8003\u8651\u5230\u8fd9\u4e2a\u51fd\u6570\u5305\u542b\u5728\u4e00\u4e2a\u540d\u4e3a&#8221;\u5de5\u5177\u5305&#8221;\u7684\u8f6f\u4ef6\u5305\u4e2d\uff0c\u8fd9\u4e5f\u4e0d\u5947\u602a\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e2a\u51fd\u6570\u89c6\u4e3a\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u5b83\u5c55\u793a\u4e86\u4f7f\u7528LangChain\u6846\u67b6\u7684\u6837\u672c\uff0c\u800c\u4e0d\u662f\u5b9e\u73b0\u67d0\u79cd\u7279\u5b9a\u7684\u81ea\u5b9a\u4e49\u5904\u7406\u3002<\/p>\n<h4>\u4f7f\u7528Agent\u7c7b\u521b\u5efa\u4ee3\u7406<\/h4>\n<p>\u91cd\u8981\u7684\u662f\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u540d\u4e3aAgentExecutor\u7684\u901a\u7528\u7c7b\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u6267\u884c\u4e3aOpenAI\u5b9e\u73b0\u7684\u4ee3\u7406\u3002<\/p>\n<p>\u6211\u8ba4\u4e3a\u4f60\u53ef\u80fd\u5df2\u7ecf\u7406\u89e3\u5230\u4e86\uff0c\u5728\u6b64\u4e4b\u524d\uff0c\u6211\u4eec\u9009\u62e9\u4e86\u9002\u7528\u4e8e\u5404\u79cd\u6a21\u5f0f\u7684\u4ee3\u7406\u7c7b\uff0c\u5e76\u4e3a\u521d\u59cb\u5316\u63d0\u4f9b\u4e86\u5fc5\u8981\u7684\u5143\u7d20\uff0c\u4ee5\u6784\u5efa\u4ee3\u7406\u3002\u6b64\u5916\uff0c\u6211\u4eec\u8fd8\u4ece\u8be5\u4ee3\u7406\u6784\u5efa\u4e86\u4ee3\u7406\u6267\u884c\u5668\u3002<\/p>\n<p>\u5728\u8fd9\u4e9b\u51c6\u5907\u4e2d\uff0cLLM\u548c\u63d0\u793a\u7b49\u7ec4\u4ef6\u4e4b\u5916\uff0c\u8fd8\u6709\u4e00\u4e2a\u540d\u4e3a\u5de5\u5177\u7684\u8981\u7d20\u3002<\/p>\n<h4>\u4f5c\u4e3a\u4ee3\u7406\u5546\u5de5\u5177\u7684\u68c0\u7d22\u5668<\/h4>\n<p>Retriever\uff08\u68c0\u7d22\u5668\uff09\u88ab\u63cf\u8ff0\u4e3a\u4e00\u79cd\u5bf9\u5411\u91cf\u5b58\u50a8\u7684\u64cd\u4f5c\u8fdb\u884c\u62bd\u8c61\u5316\u7684\u5de5\u5177\u4e4b\u4e00\u3002\u5177\u4f53\u800c\u8a00\uff0c\u6211\u4eec\u5c06Retriever\u8f6c\u6362\u4e3aRetrieverTool\u7684\u5f62\u5f0f\uff0c\u4ee5\u4fbf\u4f5c\u4e3a\u4ee3\u7406\u5de5\u5177\u4f7f\u7528\u3002\u8fd9\u4e2a\u8f6c\u6362\u5305\u62ec\u4e86\u4ee3\u7406\u5982\u4f55\u4f7f\u7528\u8be5\u5de5\u5177\u7684\u8bf4\u660e\u3002<br \/>\nLangChain\u4ee3\u7406\u662f\u4e00\u79cd\u53ef\u6269\u5c55\u7684\u8bbe\u8ba1\uff0c\u5e76\u63d0\u4f9b\u4e86\u591a\u79cd\u6269\u5c55\u7c7b\u7684\u5b9e\u73b0\uff0c\u57fa\u4e8e\u5404\u79cd\u63d0\u793a\u5de5\u7a0b\u7684\u6210\u679c\u3002<br \/>\n\u8fd9\u4e2a\u5de5\u5177\u5143\u7d20\u7528\u4e8e\u5438\u6536\u62bd\u8c61\u5316\u7684\u5c42\u6b21\u3001\u5728\u4f7f\u7528LLM\u65f6\u9644\u5e26\u7684\u5404\u79cd\u5904\u7406\u7b49\u3002<\/p>\n<h2>\u6700\u540e\u7684\u7ed3\u8bba<\/h2>\n<p>\u8fd9\u7bc7\u7a3f\u4ef6\u7ed3\u675f\u4e86\u3002<br \/>\n\u4f5c\u4e3a\u672a\u6765\u8fdb\u4e00\u6b65\u8ba8\u8bba\u7684\u8bdd\u9898\uff0c\u6211\u8ba4\u4e3a\u4ed4\u7ec6\u7814\u7a76Prompt Engineering\u5728LangChain\u4e2d\u7684\u53d1\u5c55\u548c\u5b9e\u65bd\u662f\u975e\u5e38\u6709\u8da3\u7684\u63a2\u7d22\u3002<br \/>\n\u53e6\u5916\uff0c\u867d\u7136\u8fd9\u6b21\u65e0\u6cd5\u6d89\u53ca\u5230\u5185\u5b58\u7f13\u5b58\u7684\u529f\u80fd\uff0c\u4f46\u6211\u8ba4\u4e3a\u5b83\u4e5f\u662f\u4e00\u4e2a\u503c\u5f97\u8ba8\u8bba\u7684\u4e3b\u9898\u3002<br \/>\n\u7c7b\u4f3c\u8fd9\u6837\u7684\u5728LangChain\u4e2d\u65e0\u6cd5\u5904\u7406\u7684\u90e8\u5206\u6216\u8005\u5176\u4ed6\u751f\u6210AI\u5e94\u7528\u7a0b\u5e8f\u7684\u6784\u5efa\uff0c\u53ef\u4ee5\u8003\u8651\u5728\u4e4b\u540e\u7684\u673a\u4f1a\u518d\u8fdb\u884c\u8ba8\u8bba\uff0c\u4f8b\u5982\u4f7f\u7528\u5176\u4ed6\u7684\u6846\u67b6\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148 \u672c\u6587\u7684\u76ee\u7684 \u672c\u6587\u662f\u4e3a\u5bf9LangChain\u6280\u672f\u611f\u5174\u8da3\u7684\u8bfb\u8005\u63d0\u4f9b\u4fe1\u606f\u800c\u64b0\u5199\u7684\uff0c\u65e8\u5728\u5c3d\u53ef\u80fd\u5730\u63d0\u4f9b\u5165\u95e8\u7ea7\u7684\u77e5\u8bc6\uff0c [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-50172","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8 - Blog - Silicon Cloud<\/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.silicloud.com\/zh\/blog\/\u5b66\u4e60\u5982\u4f55\u4f7f\u7528ai\u5e94\u7528\u5f00\u53d1\u6846\u67b6langchain\u5165\u95e8\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8\" \/>\n<meta property=\"og:description\" content=\"\u9996\u5148 \u672c\u6587\u7684\u76ee\u7684 \u672c\u6587\u662f\u4e3a\u5bf9LangChain\u6280\u672f\u611f\u5174\u8da3\u7684\u8bfb\u8005\u63d0\u4f9b\u4fe1\u606f\u800c\u64b0\u5199\u7684\uff0c\u65e8\u5728\u5c3d\u53ef\u80fd\u5730\u63d0\u4f9b\u5165\u95e8\u7ea7\u7684\u77e5\u8bc6\uff0c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5b66\u4e60\u5982\u4f55\u4f7f\u7528ai\u5e94\u7528\u5f00\u53d1\u6846\u67b6langchain\u5165\u95e8\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-29T20:20:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T21:36:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/11-0.png\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\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.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/\",\"name\":\"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-02-29T20:20:14+00:00\",\"dateModified\":\"2024-05-03T21:36:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8 - Blog - Silicon Cloud","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.silicloud.com\/zh\/blog\/\u5b66\u4e60\u5982\u4f55\u4f7f\u7528ai\u5e94\u7528\u5f00\u53d1\u6846\u67b6langchain\u5165\u95e8\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8","og_description":"\u9996\u5148 \u672c\u6587\u7684\u76ee\u7684 \u672c\u6587\u662f\u4e3a\u5bf9LangChain\u6280\u672f\u611f\u5174\u8da3\u7684\u8bfb\u8005\u63d0\u4f9b\u4fe1\u606f\u800c\u64b0\u5199\u7684\uff0c\u65e8\u5728\u5c3d\u53ef\u80fd\u5730\u63d0\u4f9b\u5165\u95e8\u7ea7\u7684\u77e5\u8bc6\uff0c [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5b66\u4e60\u5982\u4f55\u4f7f\u7528ai\u5e94\u7528\u5f00\u53d1\u6846\u67b6langchain\u5165\u95e8\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-02-29T20:20:14+00:00","article_modified_time":"2024-05-03T21:36:42+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8fc7913a08637a6da29d\/11-0.png"}],"author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/","name":"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-02-29T20:20:14+00:00","dateModified":"2024-05-03T21:36:42+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5b66\u4e60\u5982\u4f55\u4f7f\u7528AI\u5e94\u7528\u5f00\u53d1\u6846\u67b6LangChain\u5165\u95e8"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%ad%a6%e4%b9%a0%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8ai%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e6%a1%86%e6%9e%b6langchain%e5%85%a5%e9%97%a8\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=50172"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50172\/revisions"}],"predecessor-version":[{"id":96432,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/50172\/revisions\/96432"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=50172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=50172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=50172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}