import{s as ft,n as ot,o as $t}from"../chunks/scheduler.37c15a92.js";import{S as gt,i as _t,g as a,s as i,r as d,A as vt,h as m,f as l,c as s,j as ut,u as w,x as u,k as rt,y as xt,a as n,v as M,d as P,t as A,w as y}from"../chunks/index.2bf4358c.js";import{H as Z}from"../chunks/Heading.8ada512a.js";import{E as ht}from"../chunks/getInferenceSnippets.0aa3753f.js";function Ct(tt){let p,I,L,E,r,k,f,et='<img src="https://langfuse.com/images/cookbook/huggingface-agent-course/agent-observability-and-evaluation.png" alt="Bonus Unit 2 Thumbnail"/>',R,o,lt="欢迎来到 <strong>附加单元 2</strong>！在本章中，你将探索用于观测、评估、并最终提升你的AI智能体性能的高级策略。",S,U,q,$,z,g,nt="如果你符合以下情况，那么这个附加单元非常适合你：",G,_,it="<li><strong>开发和部署 AI 智能体：</strong> 你希望确保你的智能体在生产环境中能够可靠地运行。</li> <li><strong>需要详细的洞察：</strong> 你希望诊断问题、优化性能或理解你的智能体的内部工作原理。</li> <li><strong>旨在减少运营开销：</strong> 通过监控智能体成本、延迟和执行细节，你可以高效地管理资源。</li> <li><strong>寻求持续改进：</strong> 你对将实时用户反馈和自动化评估集成到你的 AI 应用中感兴趣。</li>",O,v,st="简而言之，对于每个想要将他们的智能体带到用户面前的人！",j,B,K,x,N,h,at="在本单元中，你将学习：",D,C,mt="<li><strong>检测你的智能体：</strong> 学习如何通过 OpenTelemetry 将可观测性工具与 <em>smolagents</em> 集成。</li> <li><strong>监控指标：</strong> 追踪性能指标，例如 token 使用量（成本）、延迟和错误追踪。</li> <li><strong>实时评估：</strong> 理解用于实时评估的技术，包括收集用户反馈和利用 LLM 作为评判者。</li> <li><strong>离线分析：</strong> 使用基准数据集（例如 GSM8K）来测试和比较智能体性能。</li>",F,J,Q,T,V,c,pt="在下一节中，你将学习智能体可观测性与评估的基础知识。之后，就该看它在实践中的应用了！",W,H,X,b,Y;return r=new Z({props:{title:"AI 智能体(AI Agent)的可观测性与评估",local:"ai-智能体ai-agent的可观测性与评估",headingTag:"h1"}}),$=new Z({props:{title:"📚 我应该在什么时候学习这个附加单元？",local:"-我应该在什么时候学习这个附加单元",headingTag:"h2"}}),x=new Z({props:{title:"🤓 你将学到什么",local:"-你将学到什么",headingTag:"h2"}}),T=new Z({props:{title:"🚀 准备好开始了吗？",local:"-准备好开始了吗",headingTag:"h2"}}),H=new ht({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/bonus_unit2/introduction.mdx"}}),{c(){p=a("meta"),I=i(),L=a("p"),E=i(),d(r.$$.fragment),k=i(),f=a("p"),f.innerHTML=et,R=i(),o=a("p"),o.innerHTML=lt,S=i(),U=a("hr"),q=i(),d($.$$.fragment),z=i(),g=a("p"),g.textContent=nt,G=i(),_=a("ul"),_.innerHTML=it,O=i(),v=a("p"),v.textContent=st,j=i(),B=a("hr"),K=i(),d(x.$$.fragment),N=i(),h=a("p"),h.textContent=at,D=i(),C=a("ul"),C.innerHTML=mt,F=i(),J=a("hr"),Q=i(),d(T.$$.fragment),V=i(),c=a("p"),c.textContent=pt,W=i(),d(H.$$.fragment),X=i(),b=a("p"),this.h()},l(t){const e=vt("svelte-u9bgzb",document.head);p=m(e,"META",{name:!0,content:!0}),e.forEach(l),I=s(t),L=m(t,"P",{}),ut(L).forEach(l),E=s(t),w(r.$$.fragment,t),k=s(t),f=m(t,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1927uig"&&(f.innerHTML=et),R=s(t),o=m(t,"P",{"data-svelte-h":!0}),u(o)!=="svelte-1nmdacw"&&(o.innerHTML=lt),S=s(t),U=m(t,"HR",{}),q=s(t),w($.$$.fragment,t),z=s(t),g=m(t,"P",{"data-svelte-h":!0}),u(g)!=="svelte-ttlxd4"&&(g.textContent=nt),G=s(t),_=m(t,"UL",{"data-svelte-h":!0}),u(_)!=="svelte-1st85yt"&&(_.innerHTML=it),O=s(t),v=m(t,"P",{"data-svelte-h":!0}),u(v)!=="svelte-1oanoe0"&&(v.textContent=st),j=s(t),B=m(t,"HR",{}),K=s(t),w(x.$$.fragment,t),N=s(t),h=m(t,"P",{"data-svelte-h":!0}),u(h)!=="svelte-rl1vpd"&&(h.textContent=at),D=s(t),C=m(t,"UL",{"data-svelte-h":!0}),u(C)!=="svelte-uxqdt"&&(C.innerHTML=mt),F=s(t),J=m(t,"HR",{}),Q=s(t),w(T.$$.fragment,t),V=s(t),c=m(t,"P",{"data-svelte-h":!0}),u(c)!=="svelte-14dlgwa"&&(c.textContent=pt),W=s(t),w(H.$$.fragment,t),X=s(t),b=m(t,"P",{}),ut(b).forEach(l),this.h()},h(){rt(p,"name","hf:doc:metadata"),rt(p,"content",Tt)},m(t,e){xt(document.head,p),n(t,I,e),n(t,L,e),n(t,E,e),M(r,t,e),n(t,k,e),n(t,f,e),n(t,R,e),n(t,o,e),n(t,S,e),n(t,U,e),n(t,q,e),M($,t,e),n(t,z,e),n(t,g,e),n(t,G,e),n(t,_,e),n(t,O,e),n(t,v,e),n(t,j,e),n(t,B,e),n(t,K,e),M(x,t,e),n(t,N,e),n(t,h,e),n(t,D,e),n(t,C,e),n(t,F,e),n(t,J,e),n(t,Q,e),M(T,t,e),n(t,V,e),n(t,c,e),n(t,W,e),M(H,t,e),n(t,X,e),n(t,b,e),Y=!0},p:ot,i(t){Y||(P(r.$$.fragment,t),P($.$$.fragment,t),P(x.$$.fragment,t),P(T.$$.fragment,t),P(H.$$.fragment,t),Y=!0)},o(t){A(r.$$.fragment,t),A($.$$.fragment,t),A(x.$$.fragment,t),A(T.$$.fragment,t),A(H.$$.fragment,t),Y=!1},d(t){t&&(l(I),l(L),l(E),l(k),l(f),l(R),l(o),l(S),l(U),l(q),l(z),l(g),l(G),l(_),l(O),l(v),l(j),l(B),l(K),l(N),l(h),l(D),l(C),l(F),l(J),l(Q),l(V),l(c),l(W),l(X),l(b)),l(p),y(r,t),y($,t),y(x,t),y(T,t),y(H,t)}}}const Tt='{"title":"AI 智能体(AI Agent)的可观测性与评估","local":"ai-智能体ai-agent的可观测性与评估","sections":[{"title":"📚 我应该在什么时候学习这个附加单元？","local":"-我应该在什么时候学习这个附加单元","sections":[],"depth":2},{"title":"🤓 你将学到什么","local":"-你将学到什么","sections":[],"depth":2},{"title":"🚀 准备好开始了吗？","local":"-准备好开始了吗","sections":[],"depth":2}],"depth":1}';function ct(tt){return $t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends gt{constructor(p){super(),_t(this,p,ct,Ct,ft,{})}}export{wt as component};
