import{s as ie,o as le}from"../chunks/scheduler.37c15a92.js";import{S as se,i as oe,g as o,s as l,r as z,A as re,h as r,f as n,c as s,j as ne,u as N,x as f,k as ae,y as ue,a,v as O,d as I,t as J,w as U,m as fe,n as de}from"../chunks/index.2bf4358c.js";import{T as me}from"../chunks/Tip.363c041f.js";import{H as pe}from"../chunks/Heading.8ada512a.js";import{E as ge}from"../chunks/getInferenceSnippets.42ccd5ac.js";function ce(b){let i;return{c(){i=fe("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.")},l(u){i=de(u,"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.")},m(u,m){a(u,i,m)},d(u){u&&n(i)}}}function he(b){let i,u,m,G,p,R,g,B="In this unit, we’ll be taking a look at how we can use Agentic RAG to help Alfred prepare for the amazing gala.",H,d,M,c,D=`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>`,k,h,K='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/rag.png" alt="RAG"/>',C,v,Q="Now, think about how Alfred works:",T,w,V="<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>",P,A,X=`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.`,q,$,Y='<img src="https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/agentic-rag.png" alt="Agentic RAG"/>',E,_,Z="Let’s start <strong>building our agentic RAG workflow!</strong>",W,x,ee="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!",F,y,S,L,j;return p=new pe({props:{title:"Agentic Retrieval Augmented Generation (RAG)",local:"agentic-retrieval-augmented-generation-rag",headingTag:"h1"}}),d=new me({props:{$$slots:{default:[ce]},$$scope:{ctx:b}}}),y=new ge({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/en/unit3/agentic-rag/agentic-rag.mdx"}}),{c(){i=o("meta"),u=l(),m=o("p"),G=l(),z(p.$$.fragment),R=l(),g=o("p"),g.textContent=B,H=l(),z(d.$$.fragment),M=l(),c=o("p"),c.innerHTML=D,k=l(),h=o("p"),h.innerHTML=K,C=l(),v=o("p"),v.textContent=Q,T=l(),w=o("ol"),w.innerHTML=V,P=l(),A=o("p"),A.innerHTML=X,q=l(),$=o("p"),$.innerHTML=Y,E=l(),_=o("p"),_.innerHTML=Z,W=l(),x=o("p"),x.textContent=ee,F=l(),z(y.$$.fragment),S=l(),L=o("p"),this.h()},l(e){const t=re("svelte-u9bgzb",document.head);i=r(t,"META",{name:!0,content:!0}),t.forEach(n),u=s(e),m=r(e,"P",{}),ne(m).forEach(n),G=s(e),N(p.$$.fragment,e),R=s(e),g=r(e,"P",{"data-svelte-h":!0}),f(g)!=="svelte-y9578v"&&(g.textContent=B),H=s(e),N(d.$$.fragment,e),M=s(e),c=r(e,"P",{"data-svelte-h":!0}),f(c)!=="svelte-140qrhf"&&(c.innerHTML=D),k=s(e),h=r(e,"P",{"data-svelte-h":!0}),f(h)!=="svelte-kysd50"&&(h.innerHTML=K),C=s(e),v=r(e,"P",{"data-svelte-h":!0}),f(v)!=="svelte-aqkixd"&&(v.textContent=Q),T=s(e),w=r(e,"OL",{"data-svelte-h":!0}),f(w)!=="svelte-1j2u100"&&(w.innerHTML=V),P=s(e),A=r(e,"P",{"data-svelte-h":!0}),f(A)!=="svelte-kv63c9"&&(A.innerHTML=X),q=s(e),$=r(e,"P",{"data-svelte-h":!0}),f($)!=="svelte-1srircl"&&($.innerHTML=Y),E=s(e),_=r(e,"P",{"data-svelte-h":!0}),f(_)!=="svelte-ipidlv"&&(_.innerHTML=Z),W=s(e),x=r(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-aaolqu"&&(x.textContent=ee),F=s(e),N(y.$$.fragment,e),S=s(e),L=r(e,"P",{}),ne(L).forEach(n),this.h()},h(){ae(i,"name","hf:doc:metadata"),ae(i,"content",ve)},m(e,t){ue(document.head,i),a(e,u,t),a(e,m,t),a(e,G,t),O(p,e,t),a(e,R,t),a(e,g,t),a(e,H,t),O(d,e,t),a(e,M,t),a(e,c,t),a(e,k,t),a(e,h,t),a(e,C,t),a(e,v,t),a(e,T,t),a(e,w,t),a(e,P,t),a(e,A,t),a(e,q,t),a(e,$,t),a(e,E,t),a(e,_,t),a(e,W,t),a(e,x,t),a(e,F,t),O(y,e,t),a(e,S,t),a(e,L,t),j=!0},p(e,[t]){const te={};t&2&&(te.$$scope={dirty:t,ctx:e}),d.$set(te)},i(e){j||(I(p.$$.fragment,e),I(d.$$.fragment,e),I(y.$$.fragment,e),j=!0)},o(e){J(p.$$.fragment,e),J(d.$$.fragment,e),J(y.$$.fragment,e),j=!1},d(e){e&&(n(u),n(m),n(G),n(R),n(g),n(H),n(M),n(c),n(k),n(h),n(C),n(v),n(T),n(w),n(P),n(A),n(q),n($),n(E),n(_),n(W),n(x),n(F),n(S),n(L)),n(i),U(p,e),U(d,e),U(y,e)}}}const ve='{"title":"Agentic Retrieval Augmented Generation (RAG)","local":"agentic-retrieval-augmented-generation-rag","sections":[],"depth":1}';function we(b){return le(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Le extends se{constructor(i){super(),oe(this,i,we,he,ie,{})}}export{Le as component};
