import{s as Pt,n as ht,o as At}from"../chunks/scheduler.37c15a92.js";import{S as dt,i as bt,g as p,s as i,r as Z,A as wt,h as a,f as n,c as s,j as Mt,u as tt,x as f,k as st,y as Et,a as l,v as et,d as nt,t as lt,w as it}from"../chunks/index.2bf4358c.js";import{H as pt}from"../chunks/Heading.8ada512a.js";import{E as Gt}from"../chunks/getInferenceSnippets.0aa3753f.js";function Rt(at){let m,G,w,R,u,j,o,ft='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit3/agentic-rag/thumbnail.jpg" alt="代理增强 RAG 横幅图"/>',y,v,mt="在本单元中，我们将通过代理增强检索生成（Agentic RAG）技术，帮助负责主持晚会的友好智能体 Alfred 创建用于解答宾客问题的工具。",k,r,rt="<p>这是代理增强 RAG 的「真实世界」应用案例，您可直接应用于个人项目或工作场景。若想获得更多实践收获，何不尝试将其应用于您的实际场景并在 Discord 社区分享？</p>",z,x,ut="您可以选择课程中讨论的任何框架来实现本用例。我们已在独立标签页中为每个框架提供代码示例。",q,$,O,g,ot="现在让我们进入实战环节，为这场盛会搭建舞台！",S,_,vt="<strong>您决定举办本世纪最奢华、最盛大的派对</strong>——这意味着将包含：豪华宴席、魅惑舞者、知名 DJ、精致饮品、震撼烟花表演等极致元素。",D,C,xt="您的好邻居智能体 Alfred 正着手统筹派对的各项需求，<strong>Alfred 将全权管理所有事务</strong>。为此，他需要掌握包括菜单、宾客名单、日程安排、天气预报等在内的完整派对信息！",U,T,$t="除此之外，他还需确保派对圆满成功，因此<strong>必须具备在派对期间实时解答各类问题的能力</strong>，同时处理可能出现的突发状况。",B,c,gt="Alfred 无法孤军奋战，我们需要确保他能够获取所需的所有信息和工具。",J,H,_t="首先，让我们为晚会制定核心需求清单。",K,L,N,M,Ct=`在<strong>文艺复兴时期</strong>，真正受过良好教育的人需具备三大核心素养：
需精通<strong>体育、文化与科学知识</strong>。因此，我们必须通过知识储备给宾客留下深刻印象，呈现真正难忘的盛会。
但为避免冲突，<strong>政治与宗教等敏感话题应在晚会中回避</strong>，确保派对氛围轻松愉快，不涉及信仰与理念分歧。`,Q,P,Tt="根据礼仪规范，<strong>优秀的主办方应充分了解宾客背景</strong>，包括其兴趣爱好与事业成就。同时应善于通过宾客间的故事分享促进交流。",F,h,ct="最后，我们还需掌握<strong>基础天气知识</strong>，以便实时获取更新信息，精准把握烟花表演时机，为晚会画上完美句号！🎆",I,A,Ht=`由此可见，Alfred 需要大量信息支持才能办好晚会。
幸运的是，我们可以通过<strong>检索增强生成（RAG）训练</strong>为 Alfred 做好准备！`,V,d,Lt="现在让我们开始创建 Alfred 主持晚会所需的工具集！",W,b,X,E,Y;return u=new pt({props:{title:"代理增强检索生成（Agentic RAG）用例介绍",local:"代理增强检索生成agentic-rag用例介绍",headingTag:"h1"}}),$=new pt({props:{title:"值得铭记的盛会",local:"值得铭记的盛会",headingTag:"h2"}}),L=new pt({props:{title:"晚会核心需求",local:"晚会核心需求",headingTag:"h2"}}),b=new Gt({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/unit3/agentic-rag/introduction.mdx"}}),{c(){m=p("meta"),G=i(),w=p("p"),R=i(),Z(u.$$.fragment),j=i(),o=p("p"),o.innerHTML=ft,y=i(),v=p("p"),v.textContent=mt,k=i(),r=p("blockquote"),r.innerHTML=rt,z=i(),x=p("p"),x.textContent=ut,q=i(),Z($.$$.fragment),O=i(),g=p("p"),g.textContent=ot,S=i(),_=p("p"),_.innerHTML=vt,D=i(),C=p("p"),C.innerHTML=xt,U=i(),T=p("p"),T.innerHTML=$t,B=i(),c=p("p"),c.textContent=gt,J=i(),H=p("p"),H.textContent=_t,K=i(),Z(L.$$.fragment),N=i(),M=p("p"),M.innerHTML=Ct,Q=i(),P=p("p"),P.innerHTML=Tt,F=i(),h=p("p"),h.innerHTML=ct,I=i(),A=p("p"),A.innerHTML=Ht,V=i(),d=p("p"),d.textContent=Lt,W=i(),Z(b.$$.fragment),X=i(),E=p("p"),this.h()},l(t){const e=wt("svelte-u9bgzb",document.head);m=a(e,"META",{name:!0,content:!0}),e.forEach(n),G=s(t),w=a(t,"P",{}),Mt(w).forEach(n),R=s(t),tt(u.$$.fragment,t),j=s(t),o=a(t,"P",{"data-svelte-h":!0}),f(o)!=="svelte-pxhyh7"&&(o.innerHTML=ft),y=s(t),v=a(t,"P",{"data-svelte-h":!0}),f(v)!=="svelte-xj6p7h"&&(v.textContent=mt),k=s(t),r=a(t,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),f(r)!=="svelte-m0vces"&&(r.innerHTML=rt),z=s(t),x=a(t,"P",{"data-svelte-h":!0}),f(x)!=="svelte-12hv252"&&(x.textContent=ut),q=s(t),tt($.$$.fragment,t),O=s(t),g=a(t,"P",{"data-svelte-h":!0}),f(g)!=="svelte-mhfjgx"&&(g.textContent=ot),S=s(t),_=a(t,"P",{"data-svelte-h":!0}),f(_)!=="svelte-104pvwo"&&(_.innerHTML=vt),D=s(t),C=a(t,"P",{"data-svelte-h":!0}),f(C)!=="svelte-1p3kfyf"&&(C.innerHTML=xt),U=s(t),T=a(t,"P",{"data-svelte-h":!0}),f(T)!=="svelte-1u7z4b3"&&(T.innerHTML=$t),B=s(t),c=a(t,"P",{"data-svelte-h":!0}),f(c)!=="svelte-1gzseqk"&&(c.textContent=gt),J=s(t),H=a(t,"P",{"data-svelte-h":!0}),f(H)!=="svelte-1d9twtp"&&(H.textContent=_t),K=s(t),tt(L.$$.fragment,t),N=s(t),M=a(t,"P",{"data-svelte-h":!0}),f(M)!=="svelte-1j3ej1r"&&(M.innerHTML=Ct),Q=s(t),P=a(t,"P",{"data-svelte-h":!0}),f(P)!=="svelte-1xxsrzh"&&(P.innerHTML=Tt),F=s(t),h=a(t,"P",{"data-svelte-h":!0}),f(h)!=="svelte-16b6d7n"&&(h.innerHTML=ct),I=s(t),A=a(t,"P",{"data-svelte-h":!0}),f(A)!=="svelte-106osa6"&&(A.innerHTML=Ht),V=s(t),d=a(t,"P",{"data-svelte-h":!0}),f(d)!=="svelte-6xanh1"&&(d.textContent=Lt),W=s(t),tt(b.$$.fragment,t),X=s(t),E=a(t,"P",{}),Mt(E).forEach(n),this.h()},h(){st(m,"name","hf:doc:metadata"),st(m,"content",jt),st(r,"class","tip")},m(t,e){Et(document.head,m),l(t,G,e),l(t,w,e),l(t,R,e),et(u,t,e),l(t,j,e),l(t,o,e),l(t,y,e),l(t,v,e),l(t,k,e),l(t,r,e),l(t,z,e),l(t,x,e),l(t,q,e),et($,t,e),l(t,O,e),l(t,g,e),l(t,S,e),l(t,_,e),l(t,D,e),l(t,C,e),l(t,U,e),l(t,T,e),l(t,B,e),l(t,c,e),l(t,J,e),l(t,H,e),l(t,K,e),et(L,t,e),l(t,N,e),l(t,M,e),l(t,Q,e),l(t,P,e),l(t,F,e),l(t,h,e),l(t,I,e),l(t,A,e),l(t,V,e),l(t,d,e),l(t,W,e),et(b,t,e),l(t,X,e),l(t,E,e),Y=!0},p:ht,i(t){Y||(nt(u.$$.fragment,t),nt($.$$.fragment,t),nt(L.$$.fragment,t),nt(b.$$.fragment,t),Y=!0)},o(t){lt(u.$$.fragment,t),lt($.$$.fragment,t),lt(L.$$.fragment,t),lt(b.$$.fragment,t),Y=!1},d(t){t&&(n(G),n(w),n(R),n(j),n(o),n(y),n(v),n(k),n(r),n(z),n(x),n(q),n(O),n(g),n(S),n(_),n(D),n(C),n(U),n(T),n(B),n(c),n(J),n(H),n(K),n(N),n(M),n(Q),n(P),n(F),n(h),n(I),n(A),n(V),n(d),n(W),n(X),n(E)),n(m),it(u,t),it($,t),it(L,t),it(b,t)}}}const jt='{"title":"代理增强检索生成（Agentic RAG）用例介绍","local":"代理增强检索生成agentic-rag用例介绍","sections":[{"title":"值得铭记的盛会","local":"值得铭记的盛会","sections":[],"depth":2},{"title":"晚会核心需求","local":"晚会核心需求","sections":[],"depth":2}],"depth":1}';function yt(at){return At(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class St extends dt{constructor(m){super(),bt(this,m,yt,Rt,Pt,{})}}export{St as component};
