import{s as ie,n as le,o as se}from"../chunks/scheduler.37c15a92.js";import{S as oe,i as re,g as s,s as i,r as X,A as ue,h as o,f as n,c as l,j as Y,u as Z,x as r,k as W,y as de,a,v as ee,d as te,t as ne,w as ae}from"../chunks/index.2bf4358c.js";import{H as me}from"../chunks/Heading.8ada512a.js";import{E as fe}from"../chunks/getInferenceSnippets.0aa3753f.js";function pe(j){let u,y,L,H,m,M,f,z="In this unit, we’ll be taking a look at how we can use Agentic RAG to help Alfred prepare for the amazing gala.",C,d,N="<p>We know we’ve already discussed Retrieval Augmented Generation (RAG) and agentic RAG in the previous unit, so feel free to skip ahead if you’re already familiar with the concepts.</p>",$,p,U=`LLMs are trained on enormous bodies of data to learn general knowledge.
However, the world knowledge model of LLMs may not always be relevant and up-to-date information.
<strong>RAG solves this problem by finding and retrieving relevant information from your data and forwarding that to the LLM.</strong>`,T,g,B='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png" alt="RAG"/>',k,c,I="Now, think about how Alfred works:",G,h,J="<li>We’ve asked Alfred to help plan a gala</li> <li>Alfred needs to find the latest news and weather information</li> <li>Alfred needs to structure and search the guest information</li>",R,v,K=`Just as Alfred needs to search through your household information to be helpful, any agent needs a way to find and understand relevant data.
<strong>Agentic RAG is a powerful way to use agents to answer questions about your data.</strong> We can pass various tools to Alfred to help him answer questions.
However, instead of answering the question on top of documents automatically, Alfred can decide to use any other tool or flow to answer the question.`,P,w,Q='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png" alt="Agentic RAG"/>',q,A,D="Let’s start <strong>building our agentic RAG workflow!</strong>",E,_,V="First, we’ll create a RAG tool to retrieve up-to-date details about the invitees. Next, we’ll develop tools for web search, weather updates, and Hugging Face Hub model download statistics. Finally, we’ll integrate everything to bring our agentic RAG agent to life!",O,x,F,b,S;return m=new me({props:{title:"Agentic Retrieval Augmented Generation (RAG)",local:"agentic-retrieval-augmented-generation-rag",headingTag:"h1"}}),x=new fe({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/en/unit3/agentic-rag/agentic-rag.mdx"}}),{c(){u=s("meta"),y=i(),L=s("p"),H=i(),X(m.$$.fragment),M=i(),f=s("p"),f.textContent=z,C=i(),d=s("blockquote"),d.innerHTML=N,$=i(),p=s("p"),p.innerHTML=U,T=i(),g=s("p"),g.innerHTML=B,k=i(),c=s("p"),c.textContent=I,G=i(),h=s("ol"),h.innerHTML=J,R=i(),v=s("p"),v.innerHTML=K,P=i(),w=s("p"),w.innerHTML=Q,q=i(),A=s("p"),A.innerHTML=D,E=i(),_=s("p"),_.textContent=V,O=i(),X(x.$$.fragment),F=i(),b=s("p"),this.h()},l(e){const t=ue("svelte-u9bgzb",document.head);u=o(t,"META",{name:!0,content:!0}),t.forEach(n),y=l(e),L=o(e,"P",{}),Y(L).forEach(n),H=l(e),Z(m.$$.fragment,e),M=l(e),f=o(e,"P",{"data-svelte-h":!0}),r(f)!=="svelte-y9578v"&&(f.textContent=z),C=l(e),d=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),r(d)!=="svelte-sml7hr"&&(d.innerHTML=N),$=l(e),p=o(e,"P",{"data-svelte-h":!0}),r(p)!=="svelte-140qrhf"&&(p.innerHTML=U),T=l(e),g=o(e,"P",{"data-svelte-h":!0}),r(g)!=="svelte-kysd50"&&(g.innerHTML=B),k=l(e),c=o(e,"P",{"data-svelte-h":!0}),r(c)!=="svelte-aqkixd"&&(c.textContent=I),G=l(e),h=o(e,"OL",{"data-svelte-h":!0}),r(h)!=="svelte-1j2u100"&&(h.innerHTML=J),R=l(e),v=o(e,"P",{"data-svelte-h":!0}),r(v)!=="svelte-kv63c9"&&(v.innerHTML=K),P=l(e),w=o(e,"P",{"data-svelte-h":!0}),r(w)!=="svelte-1srircl"&&(w.innerHTML=Q),q=l(e),A=o(e,"P",{"data-svelte-h":!0}),r(A)!=="svelte-ipidlv"&&(A.innerHTML=D),E=l(e),_=o(e,"P",{"data-svelte-h":!0}),r(_)!=="svelte-aaolqu"&&(_.textContent=V),O=l(e),Z(x.$$.fragment,e),F=l(e),b=o(e,"P",{}),Y(b).forEach(n),this.h()},h(){W(u,"name","hf:doc:metadata"),W(u,"content",ge),W(d,"class","tip")},m(e,t){de(document.head,u),a(e,y,t),a(e,L,t),a(e,H,t),ee(m,e,t),a(e,M,t),a(e,f,t),a(e,C,t),a(e,d,t),a(e,$,t),a(e,p,t),a(e,T,t),a(e,g,t),a(e,k,t),a(e,c,t),a(e,G,t),a(e,h,t),a(e,R,t),a(e,v,t),a(e,P,t),a(e,w,t),a(e,q,t),a(e,A,t),a(e,E,t),a(e,_,t),a(e,O,t),ee(x,e,t),a(e,F,t),a(e,b,t),S=!0},p:le,i(e){S||(te(m.$$.fragment,e),te(x.$$.fragment,e),S=!0)},o(e){ne(m.$$.fragment,e),ne(x.$$.fragment,e),S=!1},d(e){e&&(n(y),n(L),n(H),n(M),n(f),n(C),n(d),n($),n(p),n(T),n(g),n(k),n(c),n(G),n(h),n(R),n(v),n(P),n(w),n(q),n(A),n(E),n(_),n(O),n(F),n(b)),n(u),ae(m,e),ae(x,e)}}}const ge='{"title":"Agentic Retrieval Augmented Generation (RAG)","local":"agentic-retrieval-augmented-generation-rag","sections":[],"depth":1}';function ce(j){return se(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _e extends oe{constructor(u){super(),re(this,u,ce,pe,ie,{})}}export{_e as component};
