import{s as UU,o as JU,n as tU}from"../chunks/scheduler.889ebb13.js";import{S as sU,i as TU,g as e,s,r as I,A as eU,h as n,f as J,c as T,j as Ll,u as j,x as M,k as Nl,y as nU,a as t,v as y,d as o,t as C,w as c,m as Pl,n as Kl}from"../chunks/index.ca18042b.js";import{T as MU}from"../chunks/Tip.b8116e3c.js";import{C as lU}from"../chunks/CodeBlock.1db71023.js";import{C as aU}from"../chunks/CourseFloatingBanner.bff79cca.js";import{H as L,E as iU}from"../chunks/EditOnGithub.b0b59db6.js";function pU(P){let i,p,r="此 Notebook",Q;return{c(){i=Pl("您可以通过 "),p=e("a"),p.textContent=r,Q=Pl(" 跟随代码实践，该文件支持在 Google Colab 中运行。"),this.h()},l(a){i=Kl(a,"您可以通过 "),p=n(a,"A",{href:!0,target:!0,"data-svelte-h":!0}),M(p)!=="svelte-gh8xb2"&&(p.textContent=r),Q=Kl(a," 跟随代码实践，该文件支持在 Google Colab 中运行。"),this.h()},h(){Nl(p,"href","https://huggingface.co/agents-course/notebooks/blob/main/unit2/smolagents/retrieval_agents.ipynb"),Nl(p,"target","_blank")},m(a,w){t(a,i,w),t(a,p,w),t(a,Q,w)},p:tU,d(a){a&&(J(i),J(p),J(Q))}}}function IU(P){let i,p,r,Q,a,w,R,K,u,ll,g,Al="检索增强生成（Retrieval-Augmented Generation，RAG）系统结合了数据检索和生成模型的能力，以提供上下文感知的响应。例如，用户的查询会被传递给搜索引擎，检索结果与查询一起提供给模型，模型随后根据查询和检索到的信息生成响应。",Ul,E,Ol="智能驱动的 RAG（Retrieval-Augmented Generation）通过<strong>将自主代理与动态知识检索相结合</strong>，扩展了传统 RAG 系统。",Jl,V,Bl="传统 RAG 系统使用 LLM 根据检索数据回答查询，而智能驱动的 RAG <strong>实现了对检索和生成流程的智能控制</strong>，从而提高了效率和准确性。",tl,h,dl="传统 RAG 系统面临关键限制，例如<strong>依赖单次检索步骤</strong>，以及过度关注与用户查询的直接语义相似性，这可能会忽略相关信息。",sl,m,Fl="智能驱动的 RAG 通过允许代理自主制定搜索查询、评估检索结果并进行多次检索步骤，以生成更定制化和全面的输出，从而解决这些问题。",Tl,k,el,N,bl="让我们构建一个能够使用 DuckDuckGo 进行网页搜索的简单代理。该代理将检索信息并综合响应来回答查询。通过智能驱动的 RAG，Alfred 的代理可以：",nl,A,fl="<li>搜索最新的超级英雄派对趋势</li> <li>优化结果以包含奢侈元素</li> <li>将信息综合成完整方案</li>",Ml,O,Sl="以下是 Alfred 的代理实现此功能的代码示例：",al,B,il,d,Gl="代理遵循以下流程：",pl,F,vl="<li><strong>请求分析：</strong> Alfred 的代理识别查询的关键要素——重点关注装饰、娱乐和餐饮的豪华超级英雄主题派对规划</li> <li><strong>执行检索：</strong> 代理利用 DuckDuckGo 搜索最新相关信息，确保符合 Alfred 对奢侈活动的精细要求</li> <li><strong>信息综合：</strong> 收集结果后，代理将其处理为覆盖派对所有方面的可执行方案</li> <li><strong>未来参考存储：</strong> 代理存储检索信息以便后续活动规划时快速访问，优化后续任务效率</li>",Il,b,jl,f,_l="对于专业任务，自定义知识库非常宝贵。让我们创建可以查询技术文档或专业知识的向量数据库工具。通过语义搜索，代理可以找到与 Alfred 需求最相关的信息。",yl,S,ql="向量数据库（vector database）是通过专业 ML 模型实现丰富文档表示的集合，能够快速搜索和检索文档。",ol,G,xl="该方法将预定义知识与语义搜索相结合，为活动规划提供上下文感知解决方案。通过专业知识访问，Alfred 可以完善派对的每个细节。",Cl,v,Dl="在此示例中，我们将创建从自定义知识库检索派对策划创意的工具。使用 BM25 检索器搜索知识库并返回最佳结果，同时使用 <code>RecursiveCharacterTextSplitter</code> 将文档分割为更小的块以提高搜索效率：",cl,_,Ql,q,Yl="增强后的代理能够：",rl,x,$l="<li>首先检查文档中的相关信息</li> <li>结合知识库的洞察</li> <li>在内存中维护对话上下文</li>",wl,D,ul,Y,Zl="构建智能驱动的 RAG 系统时，代理可以采用以下高级策略：",Rl,$,Xl="<li><strong>查询重构：</strong> 代理可以优化原始查询，生成更匹配目标文档的搜索词</li> <li><strong>多步检索：</strong> 代理可以进行多次搜索，利用初步结果优化后续查询</li> <li><strong>多源整合：</strong> 结合来自网页搜索和本地文档等多个来源的信息</li> <li><strong>结果验证：</strong> 在将检索内容纳入响应前分析其相关性和准确性</li>",gl,Z,Wl="有效的智能驱动 RAG 系统需要仔细考虑几个关键方面。代理<strong>应根据查询类型和上下文选择可用工具</strong>，记忆系统帮助维护对话历史避免重复检索，后备策略确保在主要检索方法失败时系统仍能提供价值，验证步骤则帮助确保检索信息的准确性和相关性。",El,X,Vl,W,zl='<li><a href="https://huggingface.co/learn/cookbook/agent_rag" rel="nofollow">Agentic RAG: 使用查询重构和自查询加速您的 RAG 系统！🚀</a> - 使用 smolagents 开发智能驱动 RAG 系统的实践指南</li>',hl,z,ml,H,kl;return a=new aU({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/agents-course/blob/main/notebooks/unit2/smolagents/retrieval_agents.ipynb"}]}}),R=new L({props:{title:"构建智能驱动的 RAG 系统",local:"构建智能驱动的-rag-系统",headingTag:"h1"}}),u=new MU({props:{$$slots:{default:[pU]},$$scope:{ctx:P}}}),k=new L({props:{title:"基于 DuckDuckGo 的基础检索",local:"基于-duckduckgo-的基础检索",headingTag:"h2"}}),B=new lU({props:{code:"ZnJvbSUyMHNtb2xhZ2VudHMlMjBpbXBvcnQlMjBDb2RlQWdlbnQlMkMlMjBEdWNrRHVja0dvU2VhcmNoVG9vbCUyQyUyMEhmQXBpTW9kZWwlMEElMEElMjMlMjAlRTUlODglOUQlRTUlQTclOEIlRTUlOEMlOTYlRTYlOTAlOUMlRTclQjQlQTIlRTUlQjclQTUlRTUlODUlQjclMEFzZWFyY2hfdG9vbCUyMCUzRCUyMER1Y2tEdWNrR29TZWFyY2hUb29sKCklMEElMEElMjMlMjAlRTUlODglOUQlRTUlQTclOEIlRTUlOEMlOTYlRTYlQTglQTElRTUlOUUlOEIlMEFtb2RlbCUyMCUzRCUyMEhmQXBpTW9kZWwoKSUwQSUwQWFnZW50JTIwJTNEJTIwQ29kZUFnZW50KCUwQSUyMCUyMCUyMCUyMG1vZGVsJTNEbW9kZWwlMkMlMEElMjAlMjAlMjAlMjB0b29scyUzRCU1QnNlYXJjaF90b29sJTVEJTBBKSUwQSUwQSUyMyUyMCVFNCVCRCVCRiVFNyU5NCVBOCVFNyVBNCVCQSVFNCVCRSU4QiUwQXJlc3BvbnNlJTIwJTNEJTIwYWdlbnQucnVuKCUwQSUyMCUyMCUyMCUyMCUyMiVFNiU5MCU5QyVFNyVCNCVBMiVFOCVCMSVBQSVFNSU4RCU4RSVFOCVCNiU4NSVFNyVCQSVBNyVFOCU4QiVCMSVFOSU5QiU4NCVFNCVCOCVCQiVFOSVBMiU5OCVFNiVCNCVCRSVFNSVBRiVCOSVFNSU4OCU5QiVFNiU4NCU4RiVFRiVCQyU4QyVFNSU4QyU4NSVFNiU4QiVBQyVFOCVBMyU4NSVFOSVBNSVCMCVFMyU4MCU4MSVFNSVBOCVCMSVFNCVCOSU5MCVFNSU5MiU4QyVFOSVBNCU5MCVFOSVBNSVBRSVFMyU4MCU4MiUyMiUwQSklMEFwcmludChyZXNwb25zZSk=",highlighted:`<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, DuckDuckGoSearchTool, HfApiModel

<span class="hljs-comment"># 初始化搜索工具</span>
search_tool = DuckDuckGoSearchTool()

<span class="hljs-comment"># 初始化模型</span>
model = HfApiModel()

agent = CodeAgent(
    model=model,
    tools=[search_tool]
)

<span class="hljs-comment"># 使用示例</span>
response = agent.run(
    <span class="hljs-string">&quot;搜索豪华超级英雄主题派对创意，包括装饰、娱乐和餐饮。&quot;</span>
)
<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),b=new L({props:{title:"自定义知识库工具",local:"自定义知识库工具",headingTag:"h2"}}),_=new lU({props:{code:" ",highlighted:`<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> smolagents <span class="hljs-keyword">import</span> Tool
<span class="hljs-keyword">from</span> langchain_community.retrievers <span class="hljs-keyword">import</span> BM25Retriever
<span class="hljs-keyword">from</span> smolagents <span class="hljs-keyword">import</span> CodeAgent, HfApiModel

<span class="hljs-keyword">class</span> <span class="hljs-title class_">PartyPlanningRetrieverTool</span>(<span class="hljs-title class_ inherited__">Tool</span>):
    name = <span class="hljs-string">&quot;party_planning_retriever&quot;</span>
    description = <span class="hljs-string">&quot;通过语义搜索为 Alfred 在韦恩庄园的超级英雄主题派对检索相关策划创意&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;搜索查询，应与派对策划或超级英雄主题相关&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">5</span>  <span class="hljs-comment"># 检索前 5 个文档</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;搜索查询必须是字符串类型&quot;</span>

        docs = self.retriever.invoke(
            query,
        )
        <span class="hljs-keyword">return</span> <span class="hljs-string">&quot;\\n检索到的创意：\\n&quot;</span> + <span class="hljs-string">&quot;&quot;</span>.join(
            [
                <span class="hljs-string">f&quot;\\n\\n===== 创意 <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)
            ]
        )

<span class="hljs-comment"># 模拟派对策划知识库</span>
party_ideas = [
    {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;举办超级英雄主题化装舞会，使用金色装饰和天鹅绒窗帘等豪华装饰&quot;</span>, <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-string">&quot;派对创意 1&quot;</span>},
    {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;聘请专业 DJ 播放蝙蝠侠和神奇女侠等超级英雄主题音乐&quot;</span>, <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-string">&quot;娱乐创意&quot;</span>},
    {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;餐饮提供以超级英雄命名的菜品，如『绿巨人绿色冰沙』和『钢铁侠能量牛排』&quot;</span>, <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-string">&quot;餐饮创意&quot;</span>},
    {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;用标志性超级英雄标志装饰场地，并投射哥谭市等超级英雄城市的投影&quot;</span>, <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-string">&quot;装饰创意&quot;</span>},
    {<span class="hljs-string">&quot;text&quot;</span>: <span class="hljs-string">&quot;通过 VR 互动体验让客人参与超级英雄模拟或主题游戏竞赛&quot;</span>, <span class="hljs-string">&quot;source&quot;</span>: <span class="hljs-string">&quot;娱乐创意&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>]})
    <span class="hljs-keyword">for</span> doc <span class="hljs-keyword">in</span> party_ideas
]

<span class="hljs-comment"># 分割文档以提高搜索效率</span>
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)

<span class="hljs-comment"># 创建检索工具</span>
party_planning_retriever = PartyPlanningRetrieverTool(docs_processed)

<span class="hljs-comment"># 初始化代理</span>
agent = CodeAgent(tools=[party_planning_retriever], model=HfApiModel())

<span class="hljs-comment"># 使用示例</span>
response = agent.run(
    <span class="hljs-string">&quot;寻找豪华超级英雄主题派对的创意，包括娱乐、餐饮和装饰选项。&quot;</span>
)

<span class="hljs-built_in">print</span>(response)`,wrap:!1}}),D=new L({props:{title:"增强的检索能力",local:"增强的检索能力",headingTag:"h2"}}),X=new L({props:{title:"资源",local:"资源",headingTag:"h2"}}),z=new iU({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/unit2/smolagents/retrieval_agents.mdx"}}),{c(){i=e("meta"),p=s(),r=e("p"),Q=s(),I(a.$$.fragment),w=s(),I(R.$$.fragment),K=s(),I(u.$$.fragment),ll=s(),g=e("p"),g.textContent=Al,Ul=s(),E=e("p"),E.innerHTML=Ol,Jl=s(),V=e("p"),V.innerHTML=Bl,tl=s(),h=e("p"),h.innerHTML=dl,sl=s(),m=e("p"),m.textContent=Fl,Tl=s(),I(k.$$.fragment),el=s(),N=e("p"),N.textContent=bl,nl=s(),A=e("ul"),A.innerHTML=fl,Ml=s(),O=e("p"),O.textContent=Sl,al=s(),I(B.$$.fragment),il=s(),d=e("p"),d.textContent=Gl,pl=s(),F=e("ol"),F.innerHTML=vl,Il=s(),I(b.$$.fragment),jl=s(),f=e("p"),f.textContent=_l,yl=s(),S=e("p"),S.textContent=ql,ol=s(),G=e("p"),G.textContent=xl,Cl=s(),v=e("p"),v.innerHTML=Dl,cl=s(),I(_.$$.fragment),Ql=s(),q=e("p"),q.textContent=Yl,rl=s(),x=e("ol"),x.innerHTML=$l,wl=s(),I(D.$$.fragment),ul=s(),Y=e("p"),Y.textContent=Zl,Rl=s(),$=e("ol"),$.innerHTML=Xl,gl=s(),Z=e("p"),Z.innerHTML=Wl,El=s(),I(X.$$.fragment),Vl=s(),W=e("ul"),W.innerHTML=zl,hl=s(),I(z.$$.fragment),ml=s(),H=e("p"),this.h()},l(l){const U=eU("svelte-u9bgzb",document.head);i=n(U,"META",{name:!0,content:!0}),U.forEach(J),p=T(l),r=n(l,"P",{}),Ll(r).forEach(J),Q=T(l),j(a.$$.fragment,l),w=T(l),j(R.$$.fragment,l),K=T(l),j(u.$$.fragment,l),ll=T(l),g=n(l,"P",{"data-svelte-h":!0}),M(g)!=="svelte-131e5hc"&&(g.textContent=Al),Ul=T(l),E=n(l,"P",{"data-svelte-h":!0}),M(E)!=="svelte-m53c1a"&&(E.innerHTML=Ol),Jl=T(l),V=n(l,"P",{"data-svelte-h":!0}),M(V)!=="svelte-z9ik08"&&(V.innerHTML=Bl),tl=T(l),h=n(l,"P",{"data-svelte-h":!0}),M(h)!=="svelte-n4cl59"&&(h.innerHTML=dl),sl=T(l),m=n(l,"P",{"data-svelte-h":!0}),M(m)!=="svelte-1ck38g1"&&(m.textContent=Fl),Tl=T(l),j(k.$$.fragment,l),el=T(l),N=n(l,"P",{"data-svelte-h":!0}),M(N)!=="svelte-dkolbh"&&(N.textContent=bl),nl=T(l),A=n(l,"UL",{"data-svelte-h":!0}),M(A)!=="svelte-6o8aq3"&&(A.innerHTML=fl),Ml=T(l),O=n(l,"P",{"data-svelte-h":!0}),M(O)!=="svelte-1lcz7vb"&&(O.textContent=Sl),al=T(l),j(B.$$.fragment,l),il=T(l),d=n(l,"P",{"data-svelte-h":!0}),M(d)!=="svelte-13otnvs"&&(d.textContent=Gl),pl=T(l),F=n(l,"OL",{"data-svelte-h":!0}),M(F)!=="svelte-1vh4e6j"&&(F.innerHTML=vl),Il=T(l),j(b.$$.fragment,l),jl=T(l),f=n(l,"P",{"data-svelte-h":!0}),M(f)!=="svelte-1es8ht2"&&(f.textContent=_l),yl=T(l),S=n(l,"P",{"data-svelte-h":!0}),M(S)!=="svelte-78a1w"&&(S.textContent=ql),ol=T(l),G=n(l,"P",{"data-svelte-h":!0}),M(G)!=="svelte-zibh65"&&(G.textContent=xl),Cl=T(l),v=n(l,"P",{"data-svelte-h":!0}),M(v)!=="svelte-zbqlw2"&&(v.innerHTML=Dl),cl=T(l),j(_.$$.fragment,l),Ql=T(l),q=n(l,"P",{"data-svelte-h":!0}),M(q)!=="svelte-ji1u9f"&&(q.textContent=Yl),rl=T(l),x=n(l,"OL",{"data-svelte-h":!0}),M(x)!=="svelte-jgex8e"&&(x.innerHTML=$l),wl=T(l),j(D.$$.fragment,l),ul=T(l),Y=n(l,"P",{"data-svelte-h":!0}),M(Y)!=="svelte-n68xg"&&(Y.textContent=Zl),Rl=T(l),$=n(l,"OL",{"data-svelte-h":!0}),M($)!=="svelte-phe9wi"&&($.innerHTML=Xl),gl=T(l),Z=n(l,"P",{"data-svelte-h":!0}),M(Z)!=="svelte-gxo1ib"&&(Z.innerHTML=Wl),El=T(l),j(X.$$.fragment,l),Vl=T(l),W=n(l,"UL",{"data-svelte-h":!0}),M(W)!=="svelte-w048vk"&&(W.innerHTML=zl),hl=T(l),j(z.$$.fragment,l),ml=T(l),H=n(l,"P",{}),Ll(H).forEach(J),this.h()},h(){Nl(i,"name","hf:doc:metadata"),Nl(i,"content",jU)},m(l,U){nU(document.head,i),t(l,p,U),t(l,r,U),t(l,Q,U),y(a,l,U),t(l,w,U),y(R,l,U),t(l,K,U),y(u,l,U),t(l,ll,U),t(l,g,U),t(l,Ul,U),t(l,E,U),t(l,Jl,U),t(l,V,U),t(l,tl,U),t(l,h,U),t(l,sl,U),t(l,m,U),t(l,Tl,U),y(k,l,U),t(l,el,U),t(l,N,U),t(l,nl,U),t(l,A,U),t(l,Ml,U),t(l,O,U),t(l,al,U),y(B,l,U),t(l,il,U),t(l,d,U),t(l,pl,U),t(l,F,U),t(l,Il,U),y(b,l,U),t(l,jl,U),t(l,f,U),t(l,yl,U),t(l,S,U),t(l,ol,U),t(l,G,U),t(l,Cl,U),t(l,v,U),t(l,cl,U),y(_,l,U),t(l,Ql,U),t(l,q,U),t(l,rl,U),t(l,x,U),t(l,wl,U),y(D,l,U),t(l,ul,U),t(l,Y,U),t(l,Rl,U),t(l,$,U),t(l,gl,U),t(l,Z,U),t(l,El,U),y(X,l,U),t(l,Vl,U),t(l,W,U),t(l,hl,U),y(z,l,U),t(l,ml,U),t(l,H,U),kl=!0},p(l,[U]){const Hl={};U&2&&(Hl.$$scope={dirty:U,ctx:l}),u.$set(Hl)},i(l){kl||(o(a.$$.fragment,l),o(R.$$.fragment,l),o(u.$$.fragment,l),o(k.$$.fragment,l),o(B.$$.fragment,l),o(b.$$.fragment,l),o(_.$$.fragment,l),o(D.$$.fragment,l),o(X.$$.fragment,l),o(z.$$.fragment,l),kl=!0)},o(l){C(a.$$.fragment,l),C(R.$$.fragment,l),C(u.$$.fragment,l),C(k.$$.fragment,l),C(B.$$.fragment,l),C(b.$$.fragment,l),C(_.$$.fragment,l),C(D.$$.fragment,l),C(X.$$.fragment,l),C(z.$$.fragment,l),kl=!1},d(l){l&&(J(p),J(r),J(Q),J(w),J(K),J(ll),J(g),J(Ul),J(E),J(Jl),J(V),J(tl),J(h),J(sl),J(m),J(Tl),J(el),J(N),J(nl),J(A),J(Ml),J(O),J(al),J(il),J(d),J(pl),J(F),J(Il),J(jl),J(f),J(yl),J(S),J(ol),J(G),J(Cl),J(v),J(cl),J(Ql),J(q),J(rl),J(x),J(wl),J(ul),J(Y),J(Rl),J($),J(gl),J(Z),J(El),J(Vl),J(W),J(hl),J(ml),J(H)),J(i),c(a,l),c(R,l),c(u,l),c(k,l),c(B,l),c(b,l),c(_,l),c(D,l),c(X,l),c(z,l)}}}const jU='{"title":"构建智能驱动的 RAG 系统","local":"构建智能驱动的-rag-系统","sections":[{"title":"基于 DuckDuckGo 的基础检索","local":"基于-duckduckgo-的基础检索","sections":[],"depth":2},{"title":"自定义知识库工具","local":"自定义知识库工具","sections":[],"depth":2},{"title":"增强的检索能力","local":"增强的检索能力","sections":[],"depth":2},{"title":"资源","local":"资源","sections":[],"depth":2}],"depth":1}';function yU(P){return JU(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class uU extends sU{constructor(i){super(),TU(this,i,yU,IU,UU,{})}}export{uU as component};
