import{s as Sl,n as Fl,o as Yl}from"../chunks/scheduler.f6319a2a.js";import{S as Ll,i as Pl,g as M,s as n,r,A as Dl,h as o,f as e,c as a,j as El,u as c,x as p,k as xl,y as Kl,a as s,v as y,d as J,t as u,w as T}from"../chunks/index.85aa684c.js";import{C as E}from"../chunks/CodeBlock.3400fc53.js";import{D as Ol}from"../chunks/DocNotebookDropdown.3fc3604b.js";import{H as lt,E as tt}from"../chunks/getInferenceSnippets.55a93fbe.js";function et(fl){let i,F,x,Y,w,L,m,P,j,Cl="Retrieval-Augmented-Generation (RAG) 是“使用大语言模型（LLM）来回答用户查询，但基于从知识库中检索的信息”。它比使用普通或微调的 LLM 具有许多优势：举几个例子，它允许将答案基于真实事实并减少虚构；它允许提供 LLM 领域特定的知识；并允许对知识库中的信息访问进行精细控制。",D,U,gl="但是，普通的 RAG 存在一些局限性，以下两点尤为突出：",K,d,Zl="<li>它只执行一次检索步骤：如果结果不好，生成的内容也会不好。</li> <li>语义相似性是以用户查询为参考计算的，这可能不是最优的：例如，用户查询通常是一个问题，而包含真实答案的文档通常是肯定语态，因此其相似性得分会比其他以疑问形式呈现的源文档低，从而导致错失相关信息的风险。</li>",O,b,vl=`我们可以通过制作一个 RAG  agent来缓解这些问题：非常简单，一个配备了检索工具的agent！这个 agent 将
会：✅ 自己构建查询和检索，✅ 如果需要的话会重新检索。`,ll,I,Bl=`因此，它将比普通 RAG 更智能，因为它可以自己构建查询，而不是直接使用用户查询作为参考。这样，它可以更
接近目标文档，从而提高检索的准确性， <a href="https://huggingface.co/papers/2212.10496" rel="nofollow">HyDE</a>。此 agent 可以
使用生成的片段，并在需要时重新检索，就像 <a href="https://docs.llamaindex.ai/en/stable/examples/evaluation/RetryQuery/" rel="nofollow">Self-Query</a>。`,tl,h,Al="我们现在开始构建这个系统. 🛠️",el,f,Rl="运行以下代码以安装所需的依赖包：",sl,C,nl,g,_l="你需要一个有效的 token 作为环境变量 <code>HF_TOKEN</code> 来调用 Inference Providers。我们使用 python-dotenv 来加载它。",al,Z,Ml,v,kl='我们首先加载一个知识库以在其上执行 RAG：此数据集是许多 Hugging Face 库的文档页面的汇编，存储为 markdown 格式。我们将仅保留 <code>transformers</code> 库的文档。然后通过处理数据集并将其存储到向量数据库中，为检索器准备知识库。我们将使用 <a href="https://python.langchain.com/docs/introduction/" rel="nofollow">LangChain</a> 来利用其出色的向量数据库工具。',ol,B,pl,A,Gl=`现在文档已准备好。我们来一起构建我们的 agent RAG 系统！
👉 我们只需要一个 RetrieverTool，我们的 agent 可以利用它从知识库中检索信息。`,il,R,Nl='由于我们需要将 vectordb 添加为工具的属性，我们不能简单地使用带有 <code>@tool</code> 装饰器的简单工具构造函数：因此我们将遵循 <a href="../tutorials/tools">tools 教程</a> 中突出显示的高级设置。',rl,_,cl,k,Hl='BM25 检索方法是一个经典的检索方法，因为它的设置速度非常快。为了提高检索准确性，你可以使用语义搜索，使用文档的向量表示替换 BM25：因此你可以前往 <a href="https://huggingface.co/spaces/mteb/leaderboard" rel="nofollow">MTEB Leaderboard</a> 选择一个好的嵌入模型。',yl,G,Vl=`现在我们已经创建了一个可以从知识库中检索信息的工具，现在我们可以很容易地创建一个利用这个
<code>retriever_tool</code> 的 agent！此 agent 将使用如下参数初始化：`,Jl,N,Wl="<li><code>tools</code>：代理将能够调用的工具列表。</li> <li><code>model</code>：为代理提供动力的 LLM。</li>",ul,H,Ql="我们的 <code>model</code> 必须是一个可调用对象，它接受一个消息的 list 作为输入，并返回文本。它还需要接受一个 stop_sequences 参数，指示何时停止生成。为了方便起见，我们直接使用包中提供的 <code>HfEngine</code> 类来获取调用 Hugging Face 的 Inference API 的 LLM 引擎。",Tl,V,Xl=`接着，我们将使用 <a href="meta-llama/Llama-3.3-70B-Instruct">meta-llama/Llama-3.3-70B-Instruct</a> 作为 llm 引
擎，因为：`,wl,W,$l="<li>它有一个长 128k 上下文，这对处理长源文档很有用。</li> <li>它在 HF 的 Inference API 上始终免费提供！</li>",ml,Q,ql='<em>Note:</em> 此 Inference API 托管基于各种标准的模型，部署的模型可能会在没有事先通知的情况下进行更新或替换。了解更多信息，请点击<a href="https://huggingface.co/docs/api-inference/supported-models" rel="nofollow">这里</a>。',jl,X,Ul,$,zl="当我们初始化 CodeAgent 时，它已经自动获得了一个默认的系统提示，告诉 LLM 引擎按步骤处理并生成工具调用作为代码片段，但你可以根据需要替换此提示模板。接着，当其 <code>.run()</code> 方法被调用时，代理将负责调用 LLM 引擎，并在循环中执行工具调用，直到工具 <code>final_answer</code> 被调用，而其参数为最终答案。",dl,q,bl,z,Il,S,hl;return w=new lt({props:{title:"Agentic RAG",local:"agentic-rag",headingTag:"h1"}}),m=new Ol({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/zh/rag.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/zh/pytorch/rag.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/smolagents_doc/zh/tensorflow/rag.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/zh/rag.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/zh/pytorch/rag.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/smolagents_doc/zh/tensorflow/rag.ipynb"}]}}),C=new E({props:{code:"IXBpcCUyMGluc3RhbGwlMjBzbW9sYWdlbnRzJTIwcGFuZGFzJTIwbGFuZ2NoYWluJTIwbGFuZ2NoYWluLWNvbW11bml0eSUyMHNlbnRlbmNlLXRyYW5zZm9ybWVycyUyMHJhbmtfYm0yNSUyMC0tdXBncmFkZSUyMC1x",highlighted:"!pip install smolagents pandas langchain langchain-community sentence-transformers rank_bm25 --upgrade -q",wrap:!1}}),Z=new E({props:{code:"ZnJvbSUyMGRvdGVudiUyMGltcG9ydCUyMGxvYWRfZG90ZW52JTBBbG9hZF9kb3RlbnYoKQ==",highlighted:`<span class="hljs-keyword">from</span> dotenv <span class="hljs-keyword">import</span> load_dotenv
load_dotenv()`,wrap:!1}}),B=new E({props:{code:"aW1wb3J0JTIwZGF0YXNldHMlMEFmcm9tJTIwbGFuZ2NoYWluLmRvY3N0b3JlLmRvY3VtZW50JTIwaW1wb3J0JTIwRG9jdW1lbnQlMEFmcm9tJTIwbGFuZ2NoYWluLnRleHRfc3BsaXR0ZXIlMjBpbXBvcnQlMjBSZWN1cnNpdmVDaGFyYWN0ZXJUZXh0U3BsaXR0ZXIlMEFmcm9tJTIwbGFuZ2NoYWluX2NvbW11bml0eS5yZXRyaWV2ZXJzJTIwaW1wb3J0JTIwQk0yNVJldHJpZXZlciUwQSUwQWtub3dsZWRnZV9iYXNlJTIwJTNEJTIwZGF0YXNldHMubG9hZF9kYXRhc2V0KCUyMm0tcmljJTJGaHVnZ2luZ2ZhY2VfZG9jJTIyJTJDJTIwc3BsaXQlM0QlMjJ0cmFpbiUyMiklMEFrbm93bGVkZ2VfYmFzZSUyMCUzRCUyMGtub3dsZWRnZV9iYXNlLmZpbHRlcihsYW1iZGElMjByb3clM0ElMjByb3clNUIlMjJzb3VyY2UlMjIlNUQuc3RhcnRzd2l0aCglMjJodWdnaW5nZmFjZSUyRnRyYW5zZm9ybWVycyUyMikpJTBBJTBBc291cmNlX2RvY3MlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjBEb2N1bWVudChwYWdlX2NvbnRlbnQlM0Rkb2MlNUIlMjJ0ZXh0JTIyJTVEJTJDJTIwbWV0YWRhdGElM0QlN0IlMjJzb3VyY2UlMjIlM0ElMjBkb2MlNUIlMjJzb3VyY2UlMjIlNUQuc3BsaXQoJTIyJTJGJTIyKSU1QjElNUQlN0QpJTBBJTIwJTIwJTIwJTIwZm9yJTIwZG9jJTIwaW4lMjBrbm93bGVkZ2VfYmFzZSUwQSU1RCUwQSUwQXRleHRfc3BsaXR0ZXIlMjAlM0QlMjBSZWN1cnNpdmVDaGFyYWN0ZXJUZXh0U3BsaXR0ZXIoJTBBJTIwJTIwJTIwJTIwY2h1bmtfc2l6ZSUzRDUwMCUyQyUwQSUyMCUyMCUyMCUyMGNodW5rX292ZXJsYXAlM0Q1MCUyQyUwQSUyMCUyMCUyMCUyMGFkZF9zdGFydF9pbmRleCUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBzdHJpcF93aGl0ZXNwYWNlJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMHNlcGFyYXRvcnMlM0QlNUIlMjIlNUNuJTVDbiUyMiUyQyUyMCUyMiU1Q24lMjIlMkMlMjAlMjIuJTIyJTJDJTIwJTIyJTIwJTIyJTJDJTIwJTIyJTIyJTVEJTJDJTBBKSUwQWRvY3NfcHJvY2Vzc2VkJTIwJTNEJTIwdGV4dF9zcGxpdHRlci5zcGxpdF9kb2N1bWVudHMoc291cmNlX2RvY3Mp",highlighted:`<span class="hljs-keyword">import</span> datasets
<span class="hljs-keyword">from</span> langchain.docstore.document <span class="hljs-keyword">import</span> Document
<span class="hljs-keyword">from</span> langchain.text_splitter <span class="hljs-keyword">import</span> RecursiveCharacterTextSplitter
<span class="hljs-keyword">from</span> langchain_community.retrievers <span class="hljs-keyword">import</span> BM25Retriever

knowledge_base = datasets.load_dataset(<span class="hljs-string">&quot;m-ric/huggingface_doc&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
knowledge_base = knowledge_base.<span class="hljs-built_in">filter</span>(<span class="hljs-keyword">lambda</span> row: row[<span class="hljs-string">&quot;source&quot;</span>].startswith(<span class="hljs-string">&quot;huggingface/transformers&quot;</span>))

source_docs = [
    Document(page_content=doc[<span class="hljs-string">&quot;text&quot;</span>], metadata={<span class="hljs-string">&quot;source&quot;</span>: doc[<span class="hljs-string">&quot;source&quot;</span>].split(<span class="hljs-string">&quot;/&quot;</span>)[<span class="hljs-number">1</span>]})
    <span class="hljs-keyword">for</span> doc <span class="hljs-keyword">in</span> knowledge_base
]

text_splitter = RecursiveCharacterTextSplitter(
    chunk_size=<span class="hljs-number">500</span>,
    chunk_overlap=<span class="hljs-number">50</span>,
    add_start_index=<span class="hljs-literal">True</span>,
    strip_whitespace=<span class="hljs-literal">True</span>,
    separators=[<span class="hljs-string">&quot;\\n\\n&quot;</span>, <span class="hljs-string">&quot;\\n&quot;</span>, <span class="hljs-string">&quot;.&quot;</span>, <span class="hljs-string">&quot; &quot;</span>, <span class="hljs-string">&quot;&quot;</span>],
)
docs_processed = text_splitter.split_documents(source_docs)`,wrap:!1}}),_=new E({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBUb29sJTBBJTBBY2xhc3MlMjBSZXRyaWV2ZXJUb29sKFRvb2wpJTNBJTBBJTIwJTIwJTIwJTIwbmFtZSUyMCUzRCUyMCUyMnJldHJpZXZlciUyMiUwQSUyMCUyMCUyMCUyMGRlc2NyaXB0aW9uJTIwJTNEJTIwJTIyVXNlcyUyMHNlbWFudGljJTIwc2VhcmNoJTIwdG8lMjByZXRyaWV2ZSUyMHRoZSUyMHBhcnRzJTIwb2YlMjB0cmFuc2Zvcm1lcnMlMjBkb2N1bWVudGF0aW9uJTIwdGhhdCUyMGNvdWxkJTIwYmUlMjBtb3N0JTIwcmVsZXZhbnQlMjB0byUyMGFuc3dlciUyMHlvdXIlMjBxdWVyeS4lMjIlMEElMjAlMjAlMjAlMjBpbnB1dHMlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJxdWVyeSUyMiUzQSUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnR5cGUlMjIlM0ElMjAlMjJzdHJpbmclMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJkZXNjcmlwdGlvbiUyMiUzQSUyMCUyMlRoZSUyMHF1ZXJ5JTIwdG8lMjBwZXJmb3JtLiUyMFRoaXMlMjBzaG91bGQlMjBiZSUyMHNlbWFudGljYWxseSUyMGNsb3NlJTIwdG8lMjB5b3VyJTIwdGFyZ2V0JTIwZG9jdW1lbnRzLiUyMFVzZSUyMHRoZSUyMGFmZmlybWF0aXZlJTIwZm9ybSUyMHJhdGhlciUyMHRoYW4lMjBhJTIwcXVlc3Rpb24uJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwJTdEJTBBJTIwJTIwJTIwJTIwb3V0cHV0X3R5cGUlMjAlM0QlMjAlMjJzdHJpbmclMjIlMEElMEElMjAlMjAlMjAlMjBkZWYlMjBfX2luaXRfXyhzZWxmJTJDJTIwZG9jcyUyQyUyMCoqa3dhcmdzKSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHN1cGVyKCkuX19pbml0X18oKiprd2FyZ3MpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwc2VsZi5yZXRyaWV2ZXIlMjAlM0QlMjBCTTI1UmV0cmlldmVyLmZyb21fZG9jdW1lbnRzKCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRvY3MlMkMlMjBrJTNEMTAlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjApJTBBJTBBJTIwJTIwJTIwJTIwZGVmJTIwZm9yd2FyZChzZWxmJTJDJTIwcXVlcnklM0ElMjBzdHIpJTIwLSUzRSUyMHN0ciUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGFzc2VydCUyMGlzaW5zdGFuY2UocXVlcnklMkMlMjBzdHIpJTJDJTIwJTIyWW91ciUyMHNlYXJjaCUyMHF1ZXJ5JTIwbXVzdCUyMGJlJTIwYSUyMHN0cmluZyUyMiUwQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRvY3MlMjAlM0QlMjBzZWxmLnJldHJpZXZlci5pbnZva2UoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcXVlcnklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjApJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwJTIyJTVDblJldHJpZXZlZCUyMGRvY3VtZW50cyUzQSU1Q24lMjIlMjAlMkIlMjAlMjIlMjIuam9pbiglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmJTIyJTVDbiU1Q24lM0QlM0QlM0QlM0QlM0QlMjBEb2N1bWVudCUyMCU3QnN0cihpKSU3RCUyMCUzRCUzRCUzRCUzRCUzRCU1Q24lMjIlMjAlMkIlMjBkb2MucGFnZV9jb250ZW50JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZm9yJTIwaSUyQyUyMGRvYyUyMGluJTIwZW51bWVyYXRlKGRvY3MpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKSUwQSUwQXJldHJpZXZlcl90b29sJTIwJTNEJTIwUmV0cmlldmVyVG9vbChkb2NzX3Byb2Nlc3NlZCk=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> Tool

<span class="hljs-keyword">class</span> <span class="hljs-title class_">RetrieverTool</span>(<span class="hljs-title class_ inherited__">Tool</span>):
    name = <span class="hljs-string">&quot;retriever&quot;</span>
    description = <span class="hljs-string">&quot;Uses semantic search to retrieve the parts of transformers documentation that could be most relevant to answer your query.&quot;</span>
    inputs = {
        <span class="hljs-string">&quot;query&quot;</span>: {
            <span class="hljs-string">&quot;type&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
            <span class="hljs-string">&quot;description&quot;</span>: <span class="hljs-string">&quot;The query to perform. This should be semantically close to your target documents. Use the affirmative form rather than a question.&quot;</span>,
        }
    }
    output_type = <span class="hljs-string">&quot;string&quot;</span>

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__init__</span>(<span class="hljs-params">self, docs, **kwargs</span>):
        <span class="hljs-built_in">super</span>().__init__(**kwargs)
        self.retriever = BM25Retriever.from_documents(
            docs, k=<span class="hljs-number">10</span>
        )

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, query: <span class="hljs-built_in">str</span></span>) -&gt; <span class="hljs-built_in">str</span>:
        <span class="hljs-keyword">assert</span> <span class="hljs-built_in">isinstance</span>(query, <span class="hljs-built_in">str</span>), <span class="hljs-string">&quot;Your search query must be a string&quot;</span>

        docs = self.retriever.invoke(
            query,
        )
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;\\nRetrieved documents:\\n&quot;</span> + <span class="hljs-string">&quot;&quot;</span>.join(
            [
                <span class="hljs-string">f&quot;\\n\\n===== Document <span class="hljs-subst">{<span class="hljs-built_in">str</span>(i)}</span> =====\\n&quot;</span> + doc.page_content
                <span class="hljs-keyword">for</span> i, doc <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(docs)
            ]
        )

retriever_tool = RetrieverTool(docs_processed)`,wrap:!1}}),X=new E({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBJbmZlcmVuY2VDbGllbnRNb2RlbCUyQyUyMENvZGVBZ2VudCUwQSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMHRvb2xzJTNEJTVCcmV0cmlldmVyX3Rvb2wlNUQlMkMlMjBtb2RlbCUzREluZmVyZW5jZUNsaWVudE1vZGVsKG1vZGVsX2lkJTNEJTIybWV0YS1sbGFtYSUyRkxsYW1hLTMuMy03MEItSW5zdHJ1Y3QlMjIpJTJDJTIwbWF4X3N0ZXBzJTNENCUyQyUyMHZlcmJvc2UlM0RUcnVlJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> InferenceClientModel, CodeAgent

agent = CodeAgent(
    tools=[retriever_tool], model=InferenceClientModel(model_id=<span class="hljs-string">&quot;meta-llama/Llama-3.3-70B-Instruct&quot;</span>), max_steps=<span class="hljs-number">4</span>, verbose=<span class="hljs-literal">True</span>
)`,wrap:!1}}),q=new E({props:{code:"YWdlbnRfb3V0cHV0JTIwJTNEJTIwYWdlbnQucnVuKCUyMkZvciUyMGElMjB0cmFuc2Zvcm1lcnMlMjBtb2RlbCUyMHRyYWluaW5nJTJDJTIwd2hpY2glMjBpcyUyMHNsb3dlciUyQyUyMHRoZSUyMGZvcndhcmQlMjBvciUyMHRoZSUyMGJhY2t3YXJkJTIwcGFzcyUzRiUyMiklMEElMEFwcmludCglMjJGaW5hbCUyMG91dHB1dCUzQSUyMiklMEFwcmludChhZ2VudF9vdXRwdXQp",highlighted:`agent_output = agent.run(<span class="hljs-string">&quot;For a transformers model training, which is slower, the forward or the backward pass?&quot;</span>)

<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Final output:&quot;</span>)
<span class="hljs-built_in">print</span>(agent_output)`,wrap:!1}}),z=new tt({props:{source:"https://github.com/huggingface/smolagents/blob/main/docs/source/zh/examples/rag.md"}}),{c(){i=M("meta"),F=n(),x=M("p"),Y=n(),r(w.$$.fragment),L=n(),r(m.$$.fragment),P=n(),j=M("p"),j.textContent=Cl,D=n(),U=M("p"),U.textContent=gl,K=n(),d=M("ul"),d.innerHTML=Zl,O=n(),b=M("p"),b.textContent=vl,ll=n(),I=M("p"),I.innerHTML=Bl,tl=n(),h=M("p"),h.textContent=Al,el=n(),f=M("p"),f.textContent=Rl,sl=n(),r(C.$$.fragment),nl=n(),g=M("p"),g.innerHTML=_l,al=n(),r(Z.$$.fragment),Ml=n(),v=M("p"),v.innerHTML=kl,ol=n(),r(B.$$.fragment),pl=n(),A=M("p"),A.textContent=Gl,il=n(),R=M("p"),R.innerHTML=Nl,rl=n(),r(_.$$.fragment),cl=n(),k=M("p"),k.innerHTML=Hl,yl=n(),G=M("p"),G.innerHTML=Vl,Jl=n(),N=M("ul"),N.innerHTML=Wl,ul=n(),H=M("p"),H.innerHTML=Ql,Tl=n(),V=M("p"),V.innerHTML=Xl,wl=n(),W=M("ul"),W.innerHTML=$l,ml=n(),Q=M("p"),Q.innerHTML=ql,jl=n(),r(X.$$.fragment),Ul=n(),$=M("p"),$.innerHTML=zl,dl=n(),r(q.$$.fragment),bl=n(),r(z.$$.fragment),Il=n(),S=M("p"),this.h()},l(l){const t=Dl("svelte-u9bgzb",document.head);i=o(t,"META",{name:!0,content:!0}),t.forEach(e),F=a(l),x=o(l,"P",{}),El(x).forEach(e),Y=a(l),c(w.$$.fragment,l),L=a(l),c(m.$$.fragment,l),P=a(l),j=o(l,"P",{"data-svelte-h":!0}),p(j)!=="svelte-mhdtwz"&&(j.textContent=Cl),D=a(l),U=o(l,"P",{"data-svelte-h":!0}),p(U)!=="svelte-14tubvl"&&(U.textContent=gl),K=a(l),d=o(l,"UL",{"data-svelte-h":!0}),p(d)!=="svelte-16mtzo0"&&(d.innerHTML=Zl),O=a(l),b=o(l,"P",{"data-svelte-h":!0}),p(b)!=="svelte-xmboum"&&(b.textContent=vl),ll=a(l),I=o(l,"P",{"data-svelte-h":!0}),p(I)!=="svelte-lrjdxa"&&(I.innerHTML=Bl),tl=a(l),h=o(l,"P",{"data-svelte-h":!0}),p(h)!=="svelte-2ch6nl"&&(h.textContent=Al),el=a(l),f=o(l,"P",{"data-svelte-h":!0}),p(f)!=="svelte-54uamx"&&(f.textContent=Rl),sl=a(l),c(C.$$.fragment,l),nl=a(l),g=o(l,"P",{"data-svelte-h":!0}),p(g)!=="svelte-1rvxl6s"&&(g.innerHTML=_l),al=a(l),c(Z.$$.fragment,l),Ml=a(l),v=o(l,"P",{"data-svelte-h":!0}),p(v)!=="svelte-77u41g"&&(v.innerHTML=kl),ol=a(l),c(B.$$.fragment,l),pl=a(l),A=o(l,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1jt4w61"&&(A.textContent=Gl),il=a(l),R=o(l,"P",{"data-svelte-h":!0}),p(R)!=="svelte-d65l33"&&(R.innerHTML=Nl),rl=a(l),c(_.$$.fragment,l),cl=a(l),k=o(l,"P",{"data-svelte-h":!0}),p(k)!=="svelte-8u62jq"&&(k.innerHTML=Hl),yl=a(l),G=o(l,"P",{"data-svelte-h":!0}),p(G)!=="svelte-g2qdob"&&(G.innerHTML=Vl),Jl=a(l),N=o(l,"UL",{"data-svelte-h":!0}),p(N)!=="svelte-1bkhezl"&&(N.innerHTML=Wl),ul=a(l),H=o(l,"P",{"data-svelte-h":!0}),p(H)!=="svelte-1i51m6b"&&(H.innerHTML=Ql),Tl=a(l),V=o(l,"P",{"data-svelte-h":!0}),p(V)!=="svelte-1bx3er4"&&(V.innerHTML=Xl),wl=a(l),W=o(l,"UL",{"data-svelte-h":!0}),p(W)!=="svelte-1n3y97g"&&(W.innerHTML=$l),ml=a(l),Q=o(l,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-1835ngc"&&(Q.innerHTML=ql),jl=a(l),c(X.$$.fragment,l),Ul=a(l),$=o(l,"P",{"data-svelte-h":!0}),p($)!=="svelte-emwerr"&&($.innerHTML=zl),dl=a(l),c(q.$$.fragment,l),bl=a(l),c(z.$$.fragment,l),Il=a(l),S=o(l,"P",{}),El(S).forEach(e),this.h()},h(){xl(i,"name","hf:doc:metadata"),xl(i,"content",st)},m(l,t){Kl(document.head,i),s(l,F,t),s(l,x,t),s(l,Y,t),y(w,l,t),s(l,L,t),y(m,l,t),s(l,P,t),s(l,j,t),s(l,D,t),s(l,U,t),s(l,K,t),s(l,d,t),s(l,O,t),s(l,b,t),s(l,ll,t),s(l,I,t),s(l,tl,t),s(l,h,t),s(l,el,t),s(l,f,t),s(l,sl,t),y(C,l,t),s(l,nl,t),s(l,g,t),s(l,al,t),y(Z,l,t),s(l,Ml,t),s(l,v,t),s(l,ol,t),y(B,l,t),s(l,pl,t),s(l,A,t),s(l,il,t),s(l,R,t),s(l,rl,t),y(_,l,t),s(l,cl,t),s(l,k,t),s(l,yl,t),s(l,G,t),s(l,Jl,t),s(l,N,t),s(l,ul,t),s(l,H,t),s(l,Tl,t),s(l,V,t),s(l,wl,t),s(l,W,t),s(l,ml,t),s(l,Q,t),s(l,jl,t),y(X,l,t),s(l,Ul,t),s(l,$,t),s(l,dl,t),y(q,l,t),s(l,bl,t),y(z,l,t),s(l,Il,t),s(l,S,t),hl=!0},p:Fl,i(l){hl||(J(w.$$.fragment,l),J(m.$$.fragment,l),J(C.$$.fragment,l),J(Z.$$.fragment,l),J(B.$$.fragment,l),J(_.$$.fragment,l),J(X.$$.fragment,l),J(q.$$.fragment,l),J(z.$$.fragment,l),hl=!0)},o(l){u(w.$$.fragment,l),u(m.$$.fragment,l),u(C.$$.fragment,l),u(Z.$$.fragment,l),u(B.$$.fragment,l),u(_.$$.fragment,l),u(X.$$.fragment,l),u(q.$$.fragment,l),u(z.$$.fragment,l),hl=!1},d(l){l&&(e(F),e(x),e(Y),e(L),e(P),e(j),e(D),e(U),e(K),e(d),e(O),e(b),e(ll),e(I),e(tl),e(h),e(el),e(f),e(sl),e(nl),e(g),e(al),e(Ml),e(v),e(ol),e(pl),e(A),e(il),e(R),e(rl),e(cl),e(k),e(yl),e(G),e(Jl),e(N),e(ul),e(H),e(Tl),e(V),e(wl),e(W),e(ml),e(Q),e(jl),e(Ul),e($),e(dl),e(bl),e(Il),e(S)),e(i),T(w,l),T(m,l),T(C,l),T(Z,l),T(B,l),T(_,l),T(X,l),T(q,l),T(z,l)}}}const st='{"title":"Agentic RAG","local":"agentic-rag","sections":[],"depth":1}';function nt(fl){return Yl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class rt extends Ll{constructor(i){super(),Pl(this,i,nt,et,Sl,{})}}export{rt as component};
