import{s as it,n as st,o as at}from"../chunks/scheduler.37c15a92.js";import{S as rt,i as mt,g as a,s as i,r as X,A as ut,h as r,f as n,c as s,j as Y,u as Z,x as m,k as S,y as pt,a as l,v as tt,d as et,t as nt,w as lt}from"../chunks/index.2bf4358c.js";import{H as ft}from"../chunks/Heading.8ada512a.js";import{E as ot}from"../chunks/getInferenceSnippets.0aa3753f.js";function ct(U){let u,$,h,M,f,T,o,B="在本单元中，我们将探讨如何利用智能体增强检索生成（Agentic RAG）帮助 Alfred 筹备精彩的晚会。",P,p,F="<p>提示：我们已在先前单元讨论过检索增强生成（RAG）和智能体增强 RAG，如果您已熟悉这些概念可跳过本节。</p>",G,c,K=`大语言模型（LLMs）通过海量数据训练获得通用知识。
但其世界知识模型可能包含过时或不相关信息。
<strong>RAG 通过从您的数据中检索相关信息并传递给大语言模型，有效解决了这个问题。</strong>`,R,g,N='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png" alt="RAG 示意图"/>',b,v,Q="思考 Alfred 的工作流程：",w,_,D="<li>我们要求 Alfred 协助策划晚会</li> <li>Alfred 需要获取最新新闻和天气信息</li> <li>Alfred 需要整理和检索宾客信息</li>",q,A,I=`正如 Alfred 需要搜索家庭信息才能提供有效帮助，任何智能体都需要理解和检索相关数据的能力。
<strong>智能体增强 RAG 是帮助智能体解答数据问题的强大工具</strong>，我们可以为 Alfred 提供多种工具来辅助问题解答。
与传统文档自动问答不同，Alfred 可以自主决定使用任何工具或流程来回答问题。`,E,x,J='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png" alt="智能体增强 RAG 架构"/>',z,d,V="现在让我们开始<strong>构建智能体增强 RAG 工作流</strong>！",k,C,W="首先创建用于检索最新受邀者详情的 RAG 工具，接着开发网络搜索、天气更新和 Hugging Face Hub 模型下载统计等工具，最终整合所有组件实现我们的智能体增强 RAG 智能体！",y,L,O,H,j;return f=new ft({props:{title:"智能体增强检索生成（Agentic RAG）",local:"智能体增强检索生成agentic-rag",headingTag:"h1"}}),L=new ot({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/unit3/agentic-rag/agentic-rag.mdx"}}),{c(){u=a("meta"),$=i(),h=a("p"),M=i(),X(f.$$.fragment),T=i(),o=a("p"),o.textContent=B,P=i(),p=a("blockquote"),p.innerHTML=F,G=i(),c=a("p"),c.innerHTML=K,R=i(),g=a("p"),g.innerHTML=N,b=i(),v=a("p"),v.textContent=Q,w=i(),_=a("ol"),_.innerHTML=D,q=i(),A=a("p"),A.innerHTML=I,E=i(),x=a("p"),x.innerHTML=J,z=i(),d=a("p"),d.innerHTML=V,k=i(),C=a("p"),C.textContent=W,y=i(),X(L.$$.fragment),O=i(),H=a("p"),this.h()},l(t){const e=ut("svelte-u9bgzb",document.head);u=r(e,"META",{name:!0,content:!0}),e.forEach(n),$=s(t),h=r(t,"P",{}),Y(h).forEach(n),M=s(t),Z(f.$$.fragment,t),T=s(t),o=r(t,"P",{"data-svelte-h":!0}),m(o)!=="svelte-acqz9p"&&(o.textContent=B),P=s(t),p=r(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),m(p)!=="svelte-nfng7s"&&(p.innerHTML=F),G=s(t),c=r(t,"P",{"data-svelte-h":!0}),m(c)!=="svelte-oqhrwa"&&(c.innerHTML=K),R=s(t),g=r(t,"P",{"data-svelte-h":!0}),m(g)!=="svelte-112ikv7"&&(g.innerHTML=N),b=s(t),v=r(t,"P",{"data-svelte-h":!0}),m(v)!=="svelte-1icrhmn"&&(v.textContent=Q),w=s(t),_=r(t,"OL",{"data-svelte-h":!0}),m(_)!=="svelte-11v7oma"&&(_.innerHTML=D),q=s(t),A=r(t,"P",{"data-svelte-h":!0}),m(A)!=="svelte-d1rfjs"&&(A.innerHTML=I),E=s(t),x=r(t,"P",{"data-svelte-h":!0}),m(x)!=="svelte-qrnqz4"&&(x.innerHTML=J),z=s(t),d=r(t,"P",{"data-svelte-h":!0}),m(d)!=="svelte-gcvxuv"&&(d.innerHTML=V),k=s(t),C=r(t,"P",{"data-svelte-h":!0}),m(C)!=="svelte-6ztjw6"&&(C.textContent=W),y=s(t),Z(L.$$.fragment,t),O=s(t),H=r(t,"P",{}),Y(H).forEach(n),this.h()},h(){S(u,"name","hf:doc:metadata"),S(u,"content",gt),S(p,"class","tip")},m(t,e){pt(document.head,u),l(t,$,e),l(t,h,e),l(t,M,e),tt(f,t,e),l(t,T,e),l(t,o,e),l(t,P,e),l(t,p,e),l(t,G,e),l(t,c,e),l(t,R,e),l(t,g,e),l(t,b,e),l(t,v,e),l(t,w,e),l(t,_,e),l(t,q,e),l(t,A,e),l(t,E,e),l(t,x,e),l(t,z,e),l(t,d,e),l(t,k,e),l(t,C,e),l(t,y,e),tt(L,t,e),l(t,O,e),l(t,H,e),j=!0},p:st,i(t){j||(et(f.$$.fragment,t),et(L.$$.fragment,t),j=!0)},o(t){nt(f.$$.fragment,t),nt(L.$$.fragment,t),j=!1},d(t){t&&(n($),n(h),n(M),n(T),n(o),n(P),n(p),n(G),n(c),n(R),n(g),n(b),n(v),n(w),n(_),n(q),n(A),n(E),n(x),n(z),n(d),n(k),n(C),n(y),n(O),n(H)),n(u),lt(f,t),lt(L,t)}}}const gt='{"title":"智能体增强检索生成（Agentic RAG）","local":"智能体增强检索生成agentic-rag","sections":[],"depth":1}';function vt(U){return at(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ct extends rt{constructor(u){super(),mt(this,u,vt,ct,it,{})}}export{Ct as component};
