import{s as Ae,o as Ce}from"../chunks/scheduler.37c15a92.js";import{S as Te,i as ke,g as i,s,r as R,A as He,h as l,f as n,c as o,j as xe,u as G,x as u,k as _e,y as Le,a,v as q,d as j,t as E,w as I,m as Pe,n as Me}from"../chunks/index.2bf4358c.js";import{T as Re}from"../chunks/Tip.363c041f.js";import{H as ie}from"../chunks/Heading.8ada512a.js";import{E as Ge}from"../chunks/getInferenceSnippets.42ccd5ac.js";function qe(S){let r;return{c(){r=Pe("This is a 'real-world' use case for Agentic RAG, that you could use in your own projects or workplaces. If you want to get more out of this project, why not try it out on your own use case and share in Discord?")},l(h){r=Me(h,"This is a 'real-world' use case for Agentic RAG, that you could use in your own projects or workplaces. If you want to get more out of this project, why not try it out on your own use case and share in Discord?")},m(h,f){a(h,r,f)},d(h){h&&n(r)}}}function je(S){let r,h,f,z,p,D,d,le='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit3/agentic-rag/thumbnail.jpg" alt="Agentic RAG banner"/>',U,g,re="In this unit, we will help Alfred, our friendly agent who is hosting the gala, by using Agentic RAG to create a tool that can be used to answer questions about the guests at the gala.",N,m,Y,c,ue="You can choose any of the frameworks discussed in the course for this use case. We provide code samples for each in separate tabs.",F,w,J,v,he="Now, it’s time to get our hands dirty with an actual use case. Let’s set the stage!",O,$,me="<strong>You decided to host the most extravagant and opulent party of the century.</strong> This means lavish feasts, enchanting dancers, renowned DJs, exquisite drinks, a breathtaking fireworks display, and much more.",W,y,fe="Alfred, your friendly neighbourhood agent, is getting ready to watch over all of your needs for this party, and <strong>Alfred is going to manage everything himself</strong>. To do so, he needs to have access to all of the information about the party, including the menu, the guests, the schedule, weather forecasts, and much more!",B,b,pe="Not only that, but he also needs to make sure that the party is going to be a success, so <strong>he needs to be able to answer any questions about the party during the party</strong>, whilst handling unexpected situations that may arise.",K,x,de="He can’t do this alone, so we need to make sure that Alfred has access to all of the information and tools he needs.",Q,_,ge="First, let’s give him a list of hard requirements for the gala.",V,A,X,C,ce=`A properly educated person in the age of the <strong>Renaissance</strong> needs to have three main traits.
He or she needed to be profound in the <strong>knowledge of sports, culture, and science</strong>. So, we need to make sure we can impress our guests with our knowledge and provide them with a truly unforgettable gala.
However, to avoid any conflicts, there are some <strong>topics, like politics and religion, that are to be avoided at a gala.</strong> It needs to be a fun party without conflicts related to beliefs and ideals.`,Z,T,we="According to etiquette, <strong>a good host should be aware of guests’ backgrounds</strong>, including their interests and endeavours. A good host also gossips and shares stories about the guests with one another.",ee,k,ve="Lastly, we need to make sure that we’ve got <strong>some general knowledge about the weather</strong> to ensure we can continuously find a real-time update to ensure perfect timing to launch the fireworks and end the gala with a bang! 🎆",te,H,$e=`As you can see, Alfred needs a lot of information to host the gala.
Luckily, we can help and prepare Alfred by giving him some <strong>Retrieval Augmented Generation (RAG) training!</strong>`,ne,L,ye="Let’s start by creating the tools that Alfred needs to be able to host the gala!",ae,P,se,M,oe;return p=new ie({props:{title:"Introduction to Use Case for Agentic RAG",local:"introduction-to-use-case-for-agentic-rag",headingTag:"h1"}}),m=new Re({props:{$$slots:{default:[qe]},$$scope:{ctx:S}}}),w=new ie({props:{title:"A Gala to Remember",local:"a-gala-to-remember",headingTag:"h2"}}),A=new ie({props:{title:"The Gala Requirements",local:"the-gala-requirements",headingTag:"h2"}}),P=new Ge({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/en/unit3/agentic-rag/introduction.mdx"}}),{c(){r=i("meta"),h=s(),f=i("p"),z=s(),R(p.$$.fragment),D=s(),d=i("p"),d.innerHTML=le,U=s(),g=i("p"),g.textContent=re,N=s(),R(m.$$.fragment),Y=s(),c=i("p"),c.textContent=ue,F=s(),R(w.$$.fragment),J=s(),v=i("p"),v.textContent=he,O=s(),$=i("p"),$.innerHTML=me,W=s(),y=i("p"),y.innerHTML=fe,B=s(),b=i("p"),b.innerHTML=pe,K=s(),x=i("p"),x.textContent=de,Q=s(),_=i("p"),_.textContent=ge,V=s(),R(A.$$.fragment),X=s(),C=i("p"),C.innerHTML=ce,Z=s(),T=i("p"),T.innerHTML=we,ee=s(),k=i("p"),k.innerHTML=ve,te=s(),H=i("p"),H.innerHTML=$e,ne=s(),L=i("p"),L.textContent=ye,ae=s(),R(P.$$.fragment),se=s(),M=i("p"),this.h()},l(e){const t=He("svelte-u9bgzb",document.head);r=l(t,"META",{name:!0,content:!0}),t.forEach(n),h=o(e),f=l(e,"P",{}),xe(f).forEach(n),z=o(e),G(p.$$.fragment,e),D=o(e),d=l(e,"P",{"data-svelte-h":!0}),u(d)!=="svelte-10xg9bk"&&(d.innerHTML=le),U=o(e),g=l(e,"P",{"data-svelte-h":!0}),u(g)!=="svelte-dln0jb"&&(g.textContent=re),N=o(e),G(m.$$.fragment,e),Y=o(e),c=l(e,"P",{"data-svelte-h":!0}),u(c)!=="svelte-chbkr8"&&(c.textContent=ue),F=o(e),G(w.$$.fragment,e),J=o(e),v=l(e,"P",{"data-svelte-h":!0}),u(v)!=="svelte-lwee7a"&&(v.textContent=he),O=o(e),$=l(e,"P",{"data-svelte-h":!0}),u($)!=="svelte-ywrlwx"&&($.innerHTML=me),W=o(e),y=l(e,"P",{"data-svelte-h":!0}),u(y)!=="svelte-1yu8jhn"&&(y.innerHTML=fe),B=o(e),b=l(e,"P",{"data-svelte-h":!0}),u(b)!=="svelte-1b2ats5"&&(b.innerHTML=pe),K=o(e),x=l(e,"P",{"data-svelte-h":!0}),u(x)!=="svelte-8od5zx"&&(x.textContent=de),Q=o(e),_=l(e,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1qicvrg"&&(_.textContent=ge),V=o(e),G(A.$$.fragment,e),X=o(e),C=l(e,"P",{"data-svelte-h":!0}),u(C)!=="svelte-90d9lk"&&(C.innerHTML=ce),Z=o(e),T=l(e,"P",{"data-svelte-h":!0}),u(T)!=="svelte-md96cy"&&(T.innerHTML=we),ee=o(e),k=l(e,"P",{"data-svelte-h":!0}),u(k)!=="svelte-50f9pa"&&(k.innerHTML=ve),te=o(e),H=l(e,"P",{"data-svelte-h":!0}),u(H)!=="svelte-xqu6bj"&&(H.innerHTML=$e),ne=o(e),L=l(e,"P",{"data-svelte-h":!0}),u(L)!=="svelte-16zvcod"&&(L.textContent=ye),ae=o(e),G(P.$$.fragment,e),se=o(e),M=l(e,"P",{}),xe(M).forEach(n),this.h()},h(){_e(r,"name","hf:doc:metadata"),_e(r,"content",Ee)},m(e,t){Le(document.head,r),a(e,h,t),a(e,f,t),a(e,z,t),q(p,e,t),a(e,D,t),a(e,d,t),a(e,U,t),a(e,g,t),a(e,N,t),q(m,e,t),a(e,Y,t),a(e,c,t),a(e,F,t),q(w,e,t),a(e,J,t),a(e,v,t),a(e,O,t),a(e,$,t),a(e,W,t),a(e,y,t),a(e,B,t),a(e,b,t),a(e,K,t),a(e,x,t),a(e,Q,t),a(e,_,t),a(e,V,t),q(A,e,t),a(e,X,t),a(e,C,t),a(e,Z,t),a(e,T,t),a(e,ee,t),a(e,k,t),a(e,te,t),a(e,H,t),a(e,ne,t),a(e,L,t),a(e,ae,t),q(P,e,t),a(e,se,t),a(e,M,t),oe=!0},p(e,[t]){const be={};t&2&&(be.$$scope={dirty:t,ctx:e}),m.$set(be)},i(e){oe||(j(p.$$.fragment,e),j(m.$$.fragment,e),j(w.$$.fragment,e),j(A.$$.fragment,e),j(P.$$.fragment,e),oe=!0)},o(e){E(p.$$.fragment,e),E(m.$$.fragment,e),E(w.$$.fragment,e),E(A.$$.fragment,e),E(P.$$.fragment,e),oe=!1},d(e){e&&(n(h),n(f),n(z),n(D),n(d),n(U),n(g),n(N),n(Y),n(c),n(F),n(J),n(v),n(O),n($),n(W),n(y),n(B),n(b),n(K),n(x),n(Q),n(_),n(V),n(X),n(C),n(Z),n(T),n(ee),n(k),n(te),n(H),n(ne),n(L),n(ae),n(se),n(M)),n(r),I(p,e),I(m,e),I(w,e),I(A,e),I(P,e)}}}const Ee='{"title":"Introduction to Use Case for Agentic RAG","local":"introduction-to-use-case-for-agentic-rag","sections":[{"title":"A Gala to Remember","local":"a-gala-to-remember","sections":[],"depth":2},{"title":"The Gala Requirements","local":"the-gala-requirements","sections":[],"depth":2}],"depth":1}';function Ie(S){return Ce(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ye extends Te{constructor(r){super(),ke(this,r,Ie,je,Ae,{})}}export{Ye as component};
