{"id":58453,"date":"2025-08-16T10:44:51","date_gmt":"2025-08-16T02:44:51","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/58453.html"},"modified":"2025-08-16T10:44:51","modified_gmt":"2025-08-16T02:44:51","slug":"agentic-rag%e7%b3%bb%e5%88%97%ef%bc%9a3%e3%80%81agentic-rag%e6%b5%81%e7%a8%8b%e5%92%8c%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5-%e5%ae%8c%e6%95%b4%e8%90%bd%e5%9c%b0%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/58453.html","title":{"rendered":"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5"},"content":{"rendered":"<h3>1. Agentic RAG \u539f\u7406<\/h3>\n<p>Agentic RAG&#xff08;Agent-based Retrieval-Augmented Generation&#xff09;\u662f\u6307\u5728\u4f20\u7edf\u7684 RAG&#xff08;Retrieval-Augmented Generation&#xff09;\u6846\u67b6\u4e2d\u5f15\u5165\u4e86 Agent&#xff08;\u667a\u80fd\u4f53&#xff09;\u4f5c\u4e3a\u6838\u5fc3\u7ec4\u4ef6\u7684\u53d8\u4f53\u3002\u5728\u6807\u51c6\u7684 RAG \u7cfb\u7edf\u4e2d&#xff0c;\u4e3b\u8981\u662f\u901a\u8fc7\u68c0\u7d22\u76f8\u5173\u6587\u6863\u6216\u4fe1\u606f\u6765\u589e\u5f3a\u751f\u6210\u6a21\u578b\u7684\u80fd\u529b&#xff0c;\u800c Agentic RAG \u5219\u901a\u8fc7\u96c6\u6210\u4e00\u4e2a\u667a\u80fd\u4f53&#xff0c;\u5e2e\u52a9\u7cfb\u7edf\u5728\u641c\u7d22\u548c\u751f\u6210\u8fc7\u7a0b\u4e2d\u8fdb\u884c\u66f4\u667a\u80fd\u7684\u51b3\u7b56\u548c\u4ea4\u4e92\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816024448-689ff0a0e57af.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5177\u4f53\u6765\u8bf4&#xff1a;\u5b83\u5c06 AI \u4ee3\u7406\u5408\u5e76\u5230 RAG \u7ba1\u9053\u4e2d&#xff0c;\u4ee5\u7f16\u6392\u5176\u7ec4\u4ef6\u5e76\u6267\u884c\u7b80\u5355\u4fe1\u606f\u68c0\u7d22\u548c\u751f\u6210\u4e4b\u5916\u7684\u5176\u4ed6\u64cd\u4f5c&#xff0c;\u4ee5\u514b\u670d\u975e\u4ee3\u7406\u7ba1\u9053\u7684\u9650\u5236\u3002\u4ee3\u7406 RAG \u6700\u5e38\u89c1\u7684\u662f\u6307\u5728\u68c0\u7d22\u7ec4\u4ef6\u4e2d\u4f7f\u7528\u4ee3\u7406\u3002\u901a\u8fc7\u4f7f\u7528\u53ef\u8bbf\u95ee\u4e0d\u540c\u68c0\u7d22\u5668\u5de5\u5177\u7684\u68c0\u7d22\u4ee3\u7406\u800c\u53d8\u5f97\u4ee3\u7406&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\u77e2\u91cf\u641c\u7d22\u5f15\u64ce&#xff08;\u4e5f\u79f0\u4e3a\u67e5\u8be2\u5f15\u64ce&#xff09;&#xff0c;\u901a\u8fc7\u77e2\u91cf\u7d22\u5f15\u6267\u884c\u77e2\u91cf\u641c\u7d22&#xff08;\u5982\u5178\u578b\u7684 RAG \u7ba1\u9053&#xff09;<\/li>\n<li>Web search \u7f51\u9875\u641c\u7d22<\/li>\n<li>\u4efb\u4f55\u4ee5\u7f16\u7a0b\u65b9\u5f0f\u8bbf\u95ee\u8f6f\u4ef6\u7684 API&#xff0c;\u4f8b\u5982\u7535\u5b50\u90ae\u4ef6\u6216\u804a\u5929\u7a0b\u5e8f<\/li>\n<\/ul>\n<p>\u8fd9\u91cc\u6211\u4eec\u7528 Agentic RAG \u53bb\u6574\u5408 Web \u641c\u7d22\u548c\u4f20\u7edf\u7684 RAG\u3002\u9996\u5148 \u6784\u5efa\u4f20\u7edf RAG \u7684Agent\u8282\u70b9:<\/p>\n<p><span class=\"token keyword\">from<\/span> langchain_openai <span class=\"token keyword\">import<\/span> ChatOpenAI<br \/>\n<span class=\"token keyword\">from<\/span> langchain<span class=\"token punctuation\">.<\/span>prompts <span class=\"token keyword\">import<\/span> PromptTemplate<br \/>\n<span class=\"token keyword\">from<\/span> langchain<span class=\"token punctuation\">.<\/span>schema<span class=\"token punctuation\">.<\/span>output_parser <span class=\"token keyword\">import<\/span> StrOutputParser<br \/>\n<span class=\"token keyword\">from<\/span> langchain<span class=\"token punctuation\">.<\/span>tools <span class=\"token keyword\">import<\/span> tool<\/p>\n<p>llm <span class=\"token operator\">&#061;<\/span> ChatOpenAI<span class=\"token punctuation\">(<\/span>model_name<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;gpt-4o-mini&#034;<\/span><span class=\"token punctuation\">,<\/span> temperature<span class=\"token operator\">&#061;<\/span><span class=\"token number\">0.1<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token decorator annotation punctuation\">&#064;tool<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">vec_kg<\/span><span class=\"token punctuation\">(<\/span>question<span class=\"token punctuation\">:<\/span><span class=\"token builtin\">str<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><\/p>\n<p>    <span class=\"token triple-quoted-string string\">&#034;&#034;&#034;<br \/>\n    \u4e2a\u4eba\u77e5\u8bc6\u5e93&#xff0c;\u5b58\u50a8AI Agent\u9879\u76ee\u6982\u5ff5\u7684\u89e3\u8bfb<br \/>\n    &#034;&#034;&#034;<\/span><\/p>\n<p>    prompt <span class=\"token operator\">&#061;<\/span> PromptTemplate<span class=\"token punctuation\">(<\/span><br \/>\n        template<span class=\"token operator\">&#061;<\/span><span class=\"token triple-quoted-string string\">&#034;&#034;&#034;\u4f60\u662f\u4e00\u540d\u95ee\u7b54\u4efb\u52a1\u7684\u52a9\u624b\u3002<br \/>\n        \u8bf7\u4f7f\u7528\u4ee5\u4e0b\u68c0\u7d22\u5230\u7684\u4e0a\u4e0b\u6587\u6765\u56de\u7b54\u95ee\u9898\u3002\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u7b54\u6848&#xff0c;\u5c31\u76f4\u63a5\u8bf4\u4f60\u4e0d\u77e5\u9053\u3002<br \/>\n        \u6700\u591a\u4f7f\u75285\u53e5\u8bdd&#xff0c;\u5e76\u4fdd\u6301\u7b54\u6848\u7b80\u6d01&#xff1a;<br \/>\n        Question: {question}<br \/>\n        Context: {context}<br \/>\n        Answer:<br \/>\n        &#034;&#034;&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        input_variables<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;question&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;document&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6784\u5efa\u4f20\u7edf\u7684RAG Chain<\/span><br \/>\n    rag_chain <span class=\"token operator\">&#061;<\/span> prompt <span class=\"token operator\">|<\/span> llm <span class=\"token operator\">|<\/span> StrOutputParser<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6784\u5efa\u68c0\u7d22\u5668<\/span><br \/>\n    retriever <span class=\"token operator\">&#061;<\/span> vectorstore<span class=\"token punctuation\">.<\/span>as_retriever<span class=\"token punctuation\">(<\/span>search_kwargs<span class=\"token operator\">&#061;<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;k&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token comment\"># \u6267\u884c\u68c0\u7d22<\/span><br \/>\n    docs <span class=\"token operator\">&#061;<\/span> retriever<span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;question&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    generation <span class=\"token operator\">&#061;<\/span> rag_chain<span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;context&#034;<\/span><span class=\"token punctuation\">:<\/span> docs<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;question&#034;<\/span><span class=\"token punctuation\">:<\/span> question<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>    <span class=\"token keyword\">return<\/span> generation<\/p>\n<p>tools <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span>fetch_real_time_info<span class=\"token punctuation\">,<\/span> vec_kg<span class=\"token punctuation\">]<\/span><\/p>\n<p>model <span class=\"token operator\">&#061;<\/span> llm<span class=\"token punctuation\">.<\/span>bind_tools<span class=\"token punctuation\">(<\/span>tools<span class=\"token punctuation\">)<\/span><\/p>\n<p>tools<\/p>\n<p>[StructuredTool(name&#061;&#039;fetch_real_time_info&#039;, description&#061;&#039;Get real-time Internet information&#039;, args_schema&#061;&lt;class &#039;__main__.SearchQuery&#039;&gt;, func&#061;&lt;function fetch_real_time_info at 0x15cb50ae0&gt;),<br \/>\n StructuredTool(name&#061;&#039;vec_kg&#039;, description&#061;&#039;\u4e2a\u4eba\u77e5\u8bc6\u5e93&#xff0c;\u5b58\u50a8AI Agent\u9879\u76ee\u6982\u5ff5\u7684\u89e3\u8bfb&#039;, args_schema&#061;&lt;class &#039;langchain_core.utils.pydantic.vec_kg&#039;&gt;, func&#061;&lt;function vec_kg at 0x15d79df80&gt;)]<\/p>\n<p><span class=\"token keyword\">import<\/span> json<br \/>\n<span class=\"token keyword\">from<\/span> langchain_core<span class=\"token punctuation\">.<\/span>messages <span class=\"token keyword\">import<\/span> ToolMessage<span class=\"token punctuation\">,<\/span> SystemMessage<span class=\"token punctuation\">,<\/span> HumanMessage<br \/>\n<span class=\"token keyword\">from<\/span> langchain_core<span class=\"token punctuation\">.<\/span>runnables <span class=\"token keyword\">import<\/span> RunnableConfig<\/p>\n<p>tools_by_name <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span>tool<span class=\"token punctuation\">.<\/span>name<span class=\"token punctuation\">:<\/span> tool <span class=\"token keyword\">for<\/span> tool <span class=\"token keyword\">in<\/span> tools<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u5b9a\u4e49\u5de5\u5177\u8282\u70b9<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">tool_node<\/span><span class=\"token punctuation\">(<\/span>state<span class=\"token punctuation\">:<\/span> AgentState<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    outputs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> tool_call <span class=\"token keyword\">in<\/span> state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>tool_calls<span class=\"token punctuation\">:<\/span><br \/>\n        tool_result <span class=\"token operator\">&#061;<\/span> tools_by_name<span class=\"token punctuation\">[<\/span>tool_call<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;name&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span>tool_call<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;args&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        outputs<span class=\"token punctuation\">.<\/span>append<span class=\"token punctuation\">(<\/span><br \/>\n            ToolMessage<span class=\"token punctuation\">(<\/span><br \/>\n                content<span class=\"token operator\">&#061;<\/span>json<span class=\"token punctuation\">.<\/span>dumps<span class=\"token punctuation\">(<\/span>tool_result<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                name<span class=\"token operator\">&#061;<\/span>tool_call<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;name&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                tool_call_id<span class=\"token operator\">&#061;<\/span>tool_call<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;id&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">,<\/span><br \/>\n            <span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> outputs<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u5b9a\u4e49\u95ee\u7b54\u6a21\u578b<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">call_model<\/span><span class=\"token punctuation\">(<\/span><br \/>\n    state<span class=\"token punctuation\">:<\/span> AgentState<span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    system_prompt <span class=\"token operator\">&#061;<\/span> SystemMessage<span class=\"token punctuation\">(<\/span><br \/>\n        <span class=\"token string\">&#034;\u60a8\u662f\u4e00\u4f4d\u4e50\u4e8e\u52a9\u4eba\u7684AI\u52a9\u624b&#xff0c;\u8bf7\u5c3d\u529b\u56de\u590d\u7528\u6237\u7684\u67e5\u8be2&#xff01;&#034;<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><br \/>\n    response <span class=\"token operator\">&#061;<\/span> model<span class=\"token punctuation\">.<\/span>invoke<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">[<\/span>system_prompt<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#043;<\/span> state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span>response<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u5b9a\u4e49\u8def\u7531\u8282\u70b9<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">should_continue<\/span><span class=\"token punctuation\">(<\/span>state<span class=\"token punctuation\">:<\/span> AgentState<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    messages <span class=\"token operator\">&#061;<\/span> state<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">]<\/span><br \/>\n    last_message <span class=\"token operator\">&#061;<\/span> messages<span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><\/p>\n<p>    <span class=\"token keyword\">if<\/span> <span class=\"token keyword\">not<\/span> last_message<span class=\"token punctuation\">.<\/span>tool_calls<span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;end&#034;<\/span><\/p>\n<p>    <span class=\"token keyword\">else<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token string\">&#034;continue&#034;<\/span><\/p>\n<p><span class=\"token keyword\">from<\/span> langgraph<span class=\"token punctuation\">.<\/span>graph <span class=\"token keyword\">import<\/span> StateGraph<span class=\"token punctuation\">,<\/span> END<\/p>\n<p><span class=\"token comment\"># \u5b9a\u4e49\u4e00\u4e2a\u56fe\u7ed3\u6784<\/span><br \/>\nworkflow <span class=\"token operator\">&#061;<\/span> StateGraph<span class=\"token punctuation\">(<\/span>AgentState<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u5728\u56fe\u7ed3\u6784\u4e2d\u6dfb\u52a0\u8282\u70b9<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_node<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;agent&#034;<\/span><span class=\"token punctuation\">,<\/span> call_model<span class=\"token punctuation\">)<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_node<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;tools&#034;<\/span><span class=\"token punctuation\">,<\/span> tool_node<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u8bbe\u7f6e\u542f\u52a8\u70b9\u662f agent<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>set_entry_point<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;agent&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u8def\u7531\u8fb9<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_conditional_edges<span class=\"token punctuation\">(<\/span><br \/>\n    <span class=\"token string\">&#034;agent&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    should_continue<span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string\">&#034;continue&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;tools&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token string\">&#034;end&#034;<\/span><span class=\"token punctuation\">:<\/span> END<span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0\u8fd4\u56de\u8fb9<\/span><br \/>\nworkflow<span class=\"token punctuation\">.<\/span>add_edge<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;tools&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;agent&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u7f16\u8bd1\u56fe<\/span><br \/>\ngraph <span class=\"token operator\">&#061;<\/span> workflow<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">compile<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">from<\/span> IPython<span class=\"token punctuation\">.<\/span>display <span class=\"token keyword\">import<\/span> Image<span class=\"token punctuation\">,<\/span> display<\/p>\n<p>display<span class=\"token punctuation\">(<\/span>Image<span class=\"token punctuation\">(<\/span>graph<span class=\"token punctuation\">.<\/span>get_graph<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>draw_mermaid_png<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816024449-689ff0a1efd2b.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><span class=\"token comment\"># \u5b9a\u4e49\u95ee\u7b54\u7684\u6d41<\/span><br \/>\n<span class=\"token keyword\">def<\/span> <span class=\"token function\">print_stream<\/span><span class=\"token punctuation\">(<\/span>stream<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token keyword\">for<\/span> s <span class=\"token keyword\">in<\/span> stream<span class=\"token punctuation\">:<\/span><br \/>\n        message <span class=\"token operator\">&#061;<\/span> s<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">[<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span><br \/>\n        <span class=\"token keyword\">if<\/span> <span class=\"token builtin\">isinstance<\/span><span class=\"token punctuation\">(<\/span>message<span class=\"token punctuation\">,<\/span> <span class=\"token builtin\">tuple<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>message<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">else<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            message<span class=\"token punctuation\">.<\/span>pretty_print<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>inputs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;OpenAI \u6700\u8fd1\u5728\u4e92\u8054\u7f51\u4e0a\u6709\u4ec0\u4e48\u65b0\u95fb&#xff1f;\u6ce8\u610f&#xff0c;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u590d\u3002&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><br \/>\nprint_stream<span class=\"token punctuation\">(<\/span>graph<span class=\"token punctuation\">.<\/span>stream<span class=\"token punctuation\">(<\/span>inputs<span class=\"token punctuation\">,<\/span> stream_mode<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;values&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Human Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>OpenAI \u6700\u8fd1\u5728\u4e92\u8054\u7f51\u4e0a\u6709\u4ec0\u4e48\u65b0\u95fb&#xff1f;\u6ce8\u610f&#xff0c;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u590d\u3002<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nTool Calls:<br \/>\n  fetch_real_time_info (call_10hLZlqE6FQ66C7o9p0BfgDn)<br \/>\n Call ID: call_10hLZlqE6FQ66C7o9p0BfgDn<br \/>\n  Args:<br \/>\n    query: OpenAI \u65b0\u95fb<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Tool Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nName: fetch_real_time_info<\/p>\n<p>&#034;[{\\\\&#034;title\\\\&#034;: \\\\&#034;OpenAI News\\\\&#034;, \\\\&#034;link\\\\&#034;: \\\\&#034;https:\/\/openai.com\/news\/\\\\&#034;, \\\\&#034;snippet\\\\&#034;: \\\\&#034;Introducing OpenAI o3 and o4-mini, Release Apr 16, 2025, API GPT-4.1, Art 16.9, Introducing GPT-4.1 in the API, Product Apr 14, 2025.\\\\&#034;, \\\\&#034;sitelinks\\\\&#034;: [{\\\\&#034;title\\\\&#034;: \\\\&#034;Company\\\\&#034;, \\\\&#034;link\\\\&#034;: \\\\&#034;https:\/\/openai.com\/news\/company-announcements\/\\\\&#034;}, {\\\\&#034;title\\\\&#034;: \\\\&#034;Research\\\\&#034;, \\\\&#034;link\\\\&#034;: \\\\&#034;https:\/\/openai.com\/news\/research\/\\\\&#034;}], \\\\&#034;position\\\\&#034;: 1}]&#034;<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u6700\u8fd1&#xff0c;OpenAI \u53d1\u5e03\u4e86\u4e00\u4e9b\u65b0\u6d88\u606f&#xff0c;\u5305\u62ec\u63a8\u51fa OpenAI o3 \u548c o4-mini&#xff0c;\u4ee5\u53ca\u5728 API \u4e2d\u5f15\u5165 GPT-4.1\u3002\u5177\u4f53\u4fe1\u606f\u53ef\u4ee5\u8bbf\u95ee [OpenAI \u65b0\u95fb\u9875\u9762](https:\/\/openai.com\/news\/)\u3002\u5982\u679c\u4f60\u5bf9\u516c\u53f8\u7684\u516c\u544a\u6216\u7814\u7a76\u611f\u5174\u8da3&#xff0c;\u53ef\u4ee5\u67e5\u770b\u4ee5\u4e0b\u94fe\u63a5&#xff1a;<\/p>\n<p>&#8211; [\u516c\u53f8\u516c\u544a](https:\/\/openai.com\/news\/company-announcements\/)<br \/>\n&#8211; [\u7814\u7a76\u52a8\u6001](https:\/\/openai.com\/news\/research\/)<\/p>\n<p>inputs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u8bf7\u68c0\u7d22\u6211\u7684\u77e5\u8bc6\u5e93\u5e76\u603b\u7ed3\u4e00\u4e0b\u4ec0\u4e48\u662f \u767e\u5c0f\u7075&#xff0c; \u6ce8\u610f&#xff0c;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u590d\u3002&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><br \/>\nprint_stream<span class=\"token punctuation\">(<\/span>graph<span class=\"token punctuation\">.<\/span>stream<span class=\"token punctuation\">(<\/span>inputs<span class=\"token punctuation\">,<\/span> stream_mode<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;values&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Human Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u8bf7\u68c0\u7d22\u6211\u7684\u77e5\u8bc6\u5e93\u5e76\u603b\u7ed3\u4e00\u4e0b\u4ec0\u4e48\u662f \u767e\u5c0f\u7075&#xff0c; \u6ce8\u610f&#xff0c;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u590d\u3002<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nTool Calls:<br \/>\n  vec_kg (call_H0qK1LrDo00h1uvM1tWw2Lx7)<br \/>\n Call ID: call_H0qK1LrDo00h1uvM1tWw2Lx7<br \/>\n  Args:<br \/>\n    question: \u767e\u5c0f\u7075<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Tool Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nName: vec_kg<\/p>\n<p>&#034;\\\\u767e\\\\u5c0f\\\\u7075\\\\u662f\\\\u4e00\\\\u4e2aAI\\\\u52a9\\\\u624b\\\\uff0c\\\\u80fd\\\\u591f\\\\u56de\\\\u7b54\\\\u7528\\\\u6237\\\\u7684\\\\u5404\\\\u79cd\\\\u95ee\\\\u9898\\\\u3002\\\\u5b83\\\\u53ef\\\\u4ee5\\\\u5904\\\\u7406\\\\u8bed\\\\u97f3\\\\u3001\\\\u56fe\\\\u7247\\\\u548c\\\\u9644\\\\u4ef6\\\\u63d0\\\\u95ee\\\\uff0c\\\\u5e76\\\\u81f4\\\\u529b\\\\u4e8e\\\\u4fdd\\\\u62a4\\\\u7528\\\\u6237\\\\u9690\\\\u79c1\\\\u3002\\\\u8be5\\\\u52a9\\\\u624b\\\\u7684\\\\u5177\\\\u4f53\\\\u7814\\\\u53d1\\\\u516c\\\\u53f8\\\\u548c\\\\u4e0a\\\\u7ebf\\\\u65f6\\\\u95f4\\\\u5728\\\\u63d0\\\\u4f9b\\\\u7684\\\\u4e0a\\\\u4e0b\\\\u6587\\\\u4e2d\\\\u6ca1\\\\u6709\\\\u660e\\\\u786e\\\\u8bf4\\\\u660e\\\\u3002&#034;<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u767e\u5c0f\u7075\u662f\u4e00\u4e2aAI\u52a9\u624b&#xff0c;\u80fd\u591f\u56de\u7b54\u7528\u6237\u7684\u5404\u79cd\u95ee\u9898\u3002\u5b83\u53ef\u4ee5\u5904\u7406\u8bed\u97f3\u3001\u56fe\u7247\u548c\u9644\u4ef6\u63d0\u95ee&#xff0c;\u5e76\u81f4\u529b\u4e8e\u4fdd\u62a4\u7528\u6237\u9690\u79c1\u3002\u8be5\u52a9\u624b\u7684\u5177\u4f53\u7814\u53d1\u516c\u53f8\u548c\u4e0a\u7ebf\u65f6\u95f4\u5728\u63d0\u4f9b\u7684\u8d44\u6599\u4e2d\u5e76\u6ca1\u6709\u660e\u786e\u8bf4\u660e\u3002<\/p>\n<hr \/>\n<p>\u5f53\u7136&#xff0c;\u4e5f\u4f1a\u5b58\u5728\u4e00\u4e9b\u95ee\u9898&#xff0c;\u6bd4\u5982&#xff1a;\u63a8\u7406\u6a21\u578b\u4ec5\u505a\u6b65\u9aa4\u62c6\u89e3&#xff0c;\u4f46\u4e0d\u4f1a\u89e6\u53d1\u8bbf\u95eeweb\u68c0\u7d22\u6216\u8005RAG\u7684\u64cd\u4f5c&#xff0c;\u5982\u4e0b\u6240\u793a&#xff1a;<\/p>\n<p>inputs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u8bf7\u68c0\u7d22\u6211\u7684\u77e5\u8bc6\u5e93&#xff0c;\u5e76\u5b9e\u65f6\u8054\u7f51\u68c0\u7d22&#xff0c;\u7ed3\u5408\u4e24\u90e8\u5206\u7684\u4fe1\u606f\u5e2e\u6211\u603b\u7ed3&#xff1a;\u4ec0\u4e48\u662f \u767e\u5c0f\u7075\u3002\u6ce8\u610f&#xff1a;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u7b54\u6211&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><br \/>\nprint_stream<span class=\"token punctuation\">(<\/span>graph<span class=\"token punctuation\">.<\/span>stream<span class=\"token punctuation\">(<\/span>inputs<span class=\"token punctuation\">,<\/span> stream_mode<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;values&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Human Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u8bf7\u68c0\u7d22\u6211\u7684\u77e5\u8bc6\u5e93&#xff0c;\u5e76\u5b9e\u65f6\u8054\u7f51\u68c0\u7d22&#xff0c;\u7ed3\u5408\u4e24\u90e8\u5206\u7684\u4fe1\u606f\u5e2e\u6211\u603b\u7ed3&#xff1a;\u4ec0\u4e48\u662f \u767e\u5c0f\u7075\u3002\u6ce8\u610f&#xff1a;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u7b54\u6211<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nTool Calls:<br \/>\n  vec_kg (call_opPVIwKbLmBC4iZqPe9fof1T)<br \/>\n Call ID: call_opPVIwKbLmBC4iZqPe9fof1T<br \/>\n  Args:<br \/>\n    question: \u4ec0\u4e48\u662f\u767e\u5c0f\u7075<br \/>\n  fetch_real_time_info (call_YWFEHv2giZ2XSfwCznTpPIl4)<br \/>\n Call ID: call_YWFEHv2giZ2XSfwCznTpPIl4<br \/>\n  Args:<br \/>\n    query: \u767e\u5c0f\u7075<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Tool Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nName: fetch_real_time_info<\/p>\n<p>&#034;[{\\\\&#034;title\\\\&#034;: \\\\&#034;https:\/\/ying.baichuan-ai.com\/chat?from&#061;home\\\\&#034;, \\\\&#034;link\\\\&#034;: \\\\&#034;https:\/\/ying.baichuan-ai.com\/chat?from&#061;home\\\\&#034;, \\\\&#034;snippet\\\\&#034;: \\\\&#034;No information is available for this page. \\\\u00b7 Learn why\\\\&#034;, \\\\&#034;position\\\\&#034;: 1}, {\\\\&#034;title\\\\&#034;: \\\\&#034;\\\\u767e\\\\u53d8\\\\u5c0f\\\\u7075  \\\\u7684\\\\u4e3b\\\\u9875- \\\\u6296\\\\u97f3\\\\&#034;, \\\\&#034;link\\\\&#034;: \\\\&#034;https:\/\/www.douyin.com\/user\/MS4wLjABAAAAJ4B8d_pkbJ1HdnI669kwWAKMuissXDqa5RZMsu1U2hH2e1Ygs_TstyzTu6BeC-nq\\\\&#034;, \\\\&#034;snippet\\\\&#034;: \\\\&#034;\\\\u767e\\\\u53d8\\\\u5c0f\\\\u7075 \\\\uff1a\\\\u662f\\\\u591a\\\\u53d8\\\\u7684\\\\u5c0f\\\\u7075 \\\\u4fdd\\\\u6301\\\\u5bf9\\\\u751f\\\\u6d3b\\\\u7684\\\\u7231\\\\u548c\\\\u70ed\\\\u6795\\\\u628a\\\\u6bcf\\\\u4e00\\\\u5929\\\\u6d3b\\\\u7684\\\\u70ed\\\\u6c14\\\\u817e\\\\u817e\\\\uff01 \\\\u7b49\\\\u4e00\\\\u675f\\\\u5149\\\\u7167\\\\u4eae\\\\u6211\\\\u7684\\\\u4e16\\\\u754c\\\\uff01\\\\u3002\\\\u767e\\\\u53d8\\\\u5c0f\\\\u7075 \\\\u5165\\\\u9a7b\\\\u6296\\\\u97f3\\\\uff0cTA\\\\u7684\\\\u6296\\\\u97f3\\\\u53f7\\\\u662fXling1688\\\\uff0c\\\\u5df2\\\\u67091000\\\\u4e2a\\\\u7c89\\\\u4e1d\\\\uff0c\\\\u6536\\\\u83b7\\\\u4e867279\\\\u4e2a &#8230;\\\\&#034;, \\\\&#034;position\\\\&#034;: 2}, {\\\\&#034;title\\\\&#034;: \\\\&#034;\\\\u53e4\\\\u5c0f\\\\u7075_\\\\u767e\\\\u5ea6\\\\u767e\\\\u79d1\\\\&#034;, \\\\&#034;link\\\\&#034;: \\\\&#034;https:\/\/baike.baidu.hk\/item\/%E5%8F%A4%E5%B0%8F%E9%9D%88\/19910830\\\\&#034;, \\\\&#034;snippet\\\\&#034;: \\\\&#034;\\\\u53e4\\\\u5c0f\\\\u7075\\\\uff0c\\\\u5973\\\\uff0c\\\\u5c0f\\\\u8bf4\\\\u300a\\\\u60ca\\\\u609a\\\\u4e50\\\\u56ed\\\\u300b[1] \\\\u4e2d\\\\u7684\\\\u4eba\\\\u7269\\\\u3002\\\\u5728\\\\u6e38\\\\u620f\\\\u4e2d\\\\u7684\\\\u6635\\\\u79f0\\\\u4e3a\\\\u60b2\\\\u7075\\\\u7b11\\\\u9aa8\\\\uff0c\\\\u793e\\\\u56e2\\\\u201c\\\\u5730\\\\u72f1\\\\u524d\\\\u7ebf\\\\u201d\\\\u56e2\\\\u5458\\\\u3002\\\\u7237\\\\u7237\\\\u662f\\\\u53e4\\\\u5c18\\\\uff08\\\\u732b\\\\u7237\\\\uff09\\\\uff0c\\\\u7236\\\\u4eb2\\\\u662f\\\\u53e4\\\\u51ca\\\\uff0c\\\\u6bcd\\\\u4eb2\\\\u662f\\\\u5361\\\\u95e8.\\\\u83ab\\\\u83b1\\\\u8bfa\\\\uff0c\\\\u81ea\\\\u79f0\\\\u201c\\\\u8d85\\\\u7ea7\\\\u7f8e\\\\u5c11\\\\u5973\\\\u201d\\\\uff0c\\\\u5e73\\\\u65e5\\\\u91cc\\\\u53e4 &#8230;\\\\&#034;, \\\\&#034;position\\\\&#034;: 3}]&#034;<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u767e\u5c0f\u7075\u662f\u4e00\u79cd\u4eba\u5de5\u667a\u80fd\u52a9\u624b&#xff0c;\u80fd\u591f\u56de\u7b54\u7528\u6237\u7684\u5404\u79cd\u95ee\u9898\u3002\u5b83\u53ef\u4ee5\u5904\u7406\u8bed\u97f3\u3001\u56fe\u7247\u548c\u9644\u4ef6\u63d0\u95ee&#xff0c;\u5e76\u81f4\u529b\u4e8e\u4fdd\u62a4\u7528\u6237\u9690\u79c1\u3002\u767e\u5c0f\u7075\u7684\u529f\u80fd\u5305\u62ec\u63d0\u4f9b\u8425\u9500\u6587\u6848\u548c\u793e\u4ea4\u5a92\u4f53\u5185\u5bb9\u7684\u5efa\u8bae\u3002<\/p>\n<p>\u6839\u636e\u5b9e\u65f6\u4fe1\u606f&#xff0c;\u767e\u5c0f\u7075\u4f3c\u4e4e\u4e0e\u4e00\u4e2a\u540d\u4e3a\u201c\u767e\u53d8\u5c0f\u7075\u201d\u7684\u9879\u76ee\u6709\u5173&#xff0c;\u540e\u8005\u662f\u4e00\u4e2a\u591a\u53d8\u7684\u667a\u80fd\u52a9\u624b&#xff0c;\u65e8\u5728\u4e3a\u7528\u6237\u63d0\u4f9b\u751f\u6d3b\u4e2d\u7684\u5404\u79cd\u5e2e\u52a9\u548c\u5efa\u8bae\u3002<\/p>\n<p>\u603b\u7ed3\u6765\u8bf4&#xff0c;\u767e\u5c0f\u7075\u662f\u4e00\u4e2a\u667a\u80fd\u52a9\u624b&#xff0c;\u65e8\u5728\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f&#xff08;\u5982\u8bed\u97f3\u548c\u56fe\u50cf&#xff09;\u4e0e\u7528\u6237\u4e92\u52a8&#xff0c;\u63d0\u4f9b\u4fe1\u606f\u548c\u5efa\u8bae&#xff0c;\u540c\u65f6\u6ce8\u91cd\u7528\u6237\u9690\u79c1\u4fdd\u62a4\u3002<\/p>\n<hr \/>\n<p>\u6216\u8005\u4ea7\u751f\u5e7b\u89c9&#xff0c;\u76f4\u63a5\u8bf4\u81ea\u5df1\u65e0\u6cd5\u8bbf\u95ee\u77e5\u8bc6\u5e93\u3002\u5982\u4e0b\u6240\u793a&#xff1a;<\/p>\n<p>inputs <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;messages&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;user&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u8bf7\u68c0\u7d22\u6211\u7684\u77e5\u8bc6\u5e93&#xff0c;\u5e2e\u6211\u603b\u7ed3\u4e00\u4e0b\u4ec0\u4e48\u662f \u767e\u5c0f\u7075&#xff0c; \u6ce8\u610f&#xff0c;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u590d\u3002&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">}<\/span><br \/>\nprint_stream<span class=\"token punctuation\">(<\/span>graph<span class=\"token punctuation\">.<\/span>stream<span class=\"token punctuation\">(<\/span>inputs<span class=\"token punctuation\">,<\/span> stream_mode<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;values&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Human Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u8bf7\u68c0\u7d22\u6211\u7684\u77e5\u8bc6\u5e93&#xff0c;\u5e2e\u6211\u603b\u7ed3\u4e00\u4e0b\u4ec0\u4e48\u662f \u767e\u5c0f\u7075&#xff0c; \u6ce8\u610f&#xff0c;\u8bf7\u4f7f\u7528\u4e2d\u6587\u56de\u590d\u3002<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nTool Calls:<br \/>\n  vec_kg (call_9qkzgUSQVzbrODsygE1u38M5)<br \/>\n Call ID: call_9qkzgUSQVzbrODsygE1u38M5<br \/>\n  Args:<br \/>\n    question: \u767e\u5c0f\u7075<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Tool Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nName: vec_kg<\/p>\n<p>&#034;\\\\u767e\\\\u5c0f\\\\u7075\\\\u662f\\\\u4e00\\\\u79cd\\\\u4eba\\\\u5de5\\\\u667a\\\\u80fd\\\\u52a9\\\\u624b\\\\uff0c\\\\u80fd\\\\u591f\\\\u56de\\\\u7b54\\\\u7528\\\\u6237\\\\u7684\\\\u5404\\\\u79cd\\\\u95ee\\\\u9898\\\\u3002\\\\u5b83\\\\u53ef\\\\u4ee5\\\\u5904\\\\u7406\\\\u8bed\\\\u97f3\\\\u3001\\\\u56fe\\\\u7247\\\\u548c\\\\u9644\\\\u4ef6\\\\u63d0\\\\u95ee\\\\uff0c\\\\u5e76\\\\u4e14\\\\u4f1a\\\\u4fdd\\\\u62a4\\\\u7528\\\\u6237\\\\u9690\\\\u79c1\\\\u3002\\\\u8be5\\\\u52a9\\\\u624b\\\\u7684\\\\u5177\\\\u4f53\\\\u7814\\\\u53d1\\\\u516c\\\\u53f8\\\\u548c\\\\u4e0a\\\\u7ebf\\\\u65f6\\\\u95f4\\\\u5728\\\\u63d0\\\\u4f9b\\\\u7684\\\\u4e0a\\\\u4e0b\\\\u6587\\\\u4e2d\\\\u6ca1\\\\u6709\\\\u660e\\\\u786e\\\\u8bf4\\\\u660e\\\\u3002&#034;<br \/>\n&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;[1m Ai Message [0m&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<\/p>\n<p>\u767e\u5c0f\u7075\u662f\u4e00\u79cd\u4eba\u5de5\u667a\u80fd\u52a9\u624b&#xff0c;\u80fd\u591f\u56de\u7b54\u7528\u6237\u7684\u5404\u79cd\u95ee\u9898\u3002\u5b83\u53ef\u4ee5\u5904\u7406\u8bed\u97f3\u3001\u56fe\u7247\u548c\u9644\u4ef6\u63d0\u95ee&#xff0c;\u5e76\u4e14\u4f1a\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u3002\u8be5\u52a9\u624b\u7684\u5177\u4f53\u7814\u53d1\u516c\u53f8\u548c\u4e0a\u7ebf\u65f6\u95f4\u5728\u63d0\u4f9b\u7684\u8d44\u6599\u4e2d\u5e76\u6ca1\u6709\u660e\u786e\u8bf4\u660e\u3002<\/p>\n<hr \/>\n<p>\u4ee5\u4e0a\u5b58\u5728\u7684\u95ee\u9898\u4f7f\u6211\u4eec\u5728\u505aAI Agent \u5f00\u53d1\u8fc7\u7a0b\u4e2d\u57fa\u672c\u90fd\u4f1a\u9047\u5230\u7684\u60c5\u51b5&#xff0c;\u540c\u65f6\u4e5f\u662f\u6839\u636e\u5b9e\u9645\u4e1a\u52a1\u505a\u7279\u5b9a\u4f18\u5316\u7684\u4e3b\u8981\u5de5\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb289\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u57fa\u4e8eAgent\u7684RAG\u589e\u5f3a\u7cfb\u7edf\u7814\u7a76 \u672c\u6587\u63d0\u51fa\u4e86\u4e00\u79cdAgentic RAG\uff08Agent-based Retrieval-Augmented Generation\uff09\u6846\u67b6\uff0c\u901a\u8fc7\u5f15\u5165\u667a\u80fd\u4f53\u7ec4\u4ef6\u6765\u589e\u5f3a\u4f20\u7edfRAG\u7cfb\u7edf\u7684\u68c0\u7d22\u548c\u751f\u6210\u80fd\u529b\u3002\u7814\u7a76\u6784\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u77e5\u8bc6\u5e93\u68c0\u7d22\u548c\u5b9e\u65f6\u7f51\u7edc\u641c\u7d22\u7684\u591a\u5de5\u5177\u667a\u80fd\u4f53\u7cfb\u7edf\uff0c\u91c7\u7528LangGraph\u56fe\u7ed3\u6784\u5b9e\u73b0\u6d41\u7a0b\u7f16\u6392\uff0c\u5305\u542b\u6a21\u578b\u8c03\u7528\u3001\u5de5\u5177\u6267\u884c\u548c\u6761\u4ef6\u8def\u7531\u7b49\u6838\u5fc3\u8282\u70b9\u3002\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u8be5\u7cfb\u7edf\u80fd\u591f\u667a\u80fd\u51b3\u7b56\u4f55\u65f6\u8c03\u7528\u5404\u7c7b\u68c0\u7d22\u5de5\u5177\uff0c\u5e76\u901a\u8fc7\u6d88\u606f\u4f20\u9012\u673a\u5236\u5b9e\u73b0\u7ec4\u4ef6\u95f4\u534f\u4f5c\uff0c\u6709\u6548\u89e3\u51b3\u4e86\u4f20\u7edfRAG\u5728\u52a8\u6001\u4fe1\u606f\u83b7\u53d6\u65b9\u9762\u7684\u5c40\u9650\u6027\u3002\u8be5\u6846\u67b6<\/p>\n","protected":false},"author":2,"featured_media":58451,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[74,6162,144,997,3503,6163,50],"topic":[],"class_list":["post-58453","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-agent","tag-agentic-rag","tag-dify","tag-langchain","tag-langgraph","tag-multi-agent","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5 - \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\/58453.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb289\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u57fa\u4e8eAgent\u7684RAG\u589e\u5f3a\u7cfb\u7edf\u7814\u7a76 \u672c\u6587\u63d0\u51fa\u4e86\u4e00\u79cdAgentic RAG\uff08Agent-based Retrieval-Augmented Generation\uff09\u6846\u67b6\uff0c\u901a\u8fc7\u5f15\u5165\u667a\u80fd\u4f53\u7ec4\u4ef6\u6765\u589e\u5f3a\u4f20\u7edfRAG\u7cfb\u7edf\u7684\u68c0\u7d22\u548c\u751f\u6210\u80fd\u529b\u3002\u7814\u7a76\u6784\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u77e5\u8bc6\u5e93\u68c0\u7d22\u548c\u5b9e\u65f6\u7f51\u7edc\u641c\u7d22\u7684\u591a\u5de5\u5177\u667a\u80fd\u4f53\u7cfb\u7edf\uff0c\u91c7\u7528LangGraph\u56fe\u7ed3\u6784\u5b9e\u73b0\u6d41\u7a0b\u7f16\u6392\uff0c\u5305\u542b\u6a21\u578b\u8c03\u7528\u3001\u5de5\u5177\u6267\u884c\u548c\u6761\u4ef6\u8def\u7531\u7b49\u6838\u5fc3\u8282\u70b9\u3002\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u8be5\u7cfb\u7edf\u80fd\u591f\u667a\u80fd\u51b3\u7b56\u4f55\u65f6\u8c03\u7528\u5404\u7c7b\u68c0\u7d22\u5de5\u5177\uff0c\u5e76\u901a\u8fc7\u6d88\u606f\u4f20\u9012\u673a\u5236\u5b9e\u73b0\u7ec4\u4ef6\u95f4\u534f\u4f5c\uff0c\u6709\u6548\u89e3\u51b3\u4e86\u4f20\u7edfRAG\u5728\u52a8\u6001\u4fe1\u606f\u83b7\u53d6\u65b9\u9762\u7684\u5c40\u9650\u6027\u3002\u8be5\u6846\u67b6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/58453.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-16T02:44:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816024448-689ff0a0e57af.png\" \/>\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=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/58453.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/58453.html\",\"name\":\"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-16T02:44:51+00:00\",\"dateModified\":\"2025-08-16T02:44:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/58453.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/58453.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/58453.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5\"}]},{\"@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":"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5 - \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\/58453.html","og_locale":"zh_CN","og_type":"article","og_title":"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb289\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf4\u6b21\u3002\u57fa\u4e8eAgent\u7684RAG\u589e\u5f3a\u7cfb\u7edf\u7814\u7a76 \u672c\u6587\u63d0\u51fa\u4e86\u4e00\u79cdAgentic RAG\uff08Agent-based Retrieval-Augmented Generation\uff09\u6846\u67b6\uff0c\u901a\u8fc7\u5f15\u5165\u667a\u80fd\u4f53\u7ec4\u4ef6\u6765\u589e\u5f3a\u4f20\u7edfRAG\u7cfb\u7edf\u7684\u68c0\u7d22\u548c\u751f\u6210\u80fd\u529b\u3002\u7814\u7a76\u6784\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u77e5\u8bc6\u5e93\u68c0\u7d22\u548c\u5b9e\u65f6\u7f51\u7edc\u641c\u7d22\u7684\u591a\u5de5\u5177\u667a\u80fd\u4f53\u7cfb\u7edf\uff0c\u91c7\u7528LangGraph\u56fe\u7ed3\u6784\u5b9e\u73b0\u6d41\u7a0b\u7f16\u6392\uff0c\u5305\u542b\u6a21\u578b\u8c03\u7528\u3001\u5de5\u5177\u6267\u884c\u548c\u6761\u4ef6\u8def\u7531\u7b49\u6838\u5fc3\u8282\u70b9\u3002\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u8be5\u7cfb\u7edf\u80fd\u591f\u667a\u80fd\u51b3\u7b56\u4f55\u65f6\u8c03\u7528\u5404\u7c7b\u68c0\u7d22\u5de5\u5177\uff0c\u5e76\u901a\u8fc7\u6d88\u606f\u4f20\u9012\u673a\u5236\u5b9e\u73b0\u7ec4\u4ef6\u95f4\u534f\u4f5c\uff0c\u6709\u6548\u89e3\u51b3\u4e86\u4f20\u7edfRAG\u5728\u52a8\u6001\u4fe1\u606f\u83b7\u53d6\u65b9\u9762\u7684\u5c40\u9650\u6027\u3002\u8be5\u6846\u67b6","og_url":"https:\/\/www.wsisp.com\/helps\/58453.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-16T02:44:51+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250816024448-689ff0a0e57af.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/58453.html","url":"https:\/\/www.wsisp.com\/helps\/58453.html","name":"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-16T02:44:51+00:00","dateModified":"2025-08-16T02:44:51+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/58453.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/58453.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/58453.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Agentic RAG\u7cfb\u5217\uff1a3\u3001Agentic RAG\u6d41\u7a0b\u548c\u6700\u4f73\u5b9e\u8df5-\u5b8c\u6574\u843d\u5730\u5b9e\u8df5"}]},{"@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\/58453","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=58453"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/58453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/58451"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=58453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=58453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=58453"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=58453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}