deepeval-tracing
它能做什么
为 AI 应用添加追踪,使智能体、检索或模型调用的每一步都能在 Confident AI 仪表板中看到。它适用于希望看清楚 AI 应用每次运行所做之事的开发者。
适用场景
- ✓当你想为 LLM 应用或聊天机器人添加追踪的时候。
- ✓当你想追踪用 LangGraph、LangChain 或类似框架构建的智能体的时候。
- ✓当你需要为 AI 流水线的步骤加上标签和标记的时候。
技能链接
https://github.com/confident-ai/deepeval/blob/main/docs/public/.well-known/agent-skills/deepeval-tracing/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的 LangGraph 智能体添加 DeepEval 追踪,让我能在仪表板中看到每一次工具调用。”
每周 5 个新技能,1 分钟读完。
工作原理
如果存在受支持的框架集成,该技能会选择它;否则使用手动追踪标记。它会为每个步骤指定类型,例如模型调用、检索、工具或智能体,并添加标签和元数据。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
DeepEval Tracing
Use this skill to instrument an AI application — an LLM app, agent, RAG
pipeline, or chatbot — with DeepEval's native tracing so its execution is
visible span by span in Confident AI's Observatory. The work is: pick a
supported integration when one exists, fall back to manual @observe
otherwise, give each span a meaningful type, and add tags and metadata.
This skill stops at producing well-formed traces. Attaching evaluation metrics
and running evals is the deepeval skill's job.
Scope: AI Applications Only
Instrument only the AI parts of the system — agent loops and planning, LLM
calls, retrieval / vector search, and tool calls. The span types (llm,
retriever, tool, agent) describe AI components. Do not trace non-AI
software (web servers, CRUD backends, infrastructure). If the target has no
LLM, agent, retrieval, or tool-calling component, this skill does not apply.
When to Use vs the deepeval and deepeval-otel Skills
- This skill (
deepeval-tracing) — instrument an app with the DeepEval SDK (@observe, framework integrations) so traces reach Confident AI. deepevalskill — build pytest eval suites: datasets, metrics, traced evals,deepeval test run, iteration. It runs evals against an app this skill instrumented.deepeval-otelskill — instrument with the vendor-neutral OpenTelemetry SDK instead of the DeepEval SDK (raw OTLP, including non-Python apps).
The three are complementary. If unsure between this skill and deepeval-otel:
use this one when the app is Python and you want the DeepEval SDK; use
deepeval-otel when you want raw OpenTelemetry or the app is not Python.
Prerequisites
- An AI application in Python with
pip install deepeval. - For traces to reach Confident AI:
deepeval login, or an exportedCONFIDENT_API_KEY(preferred for CI and non-interactive runs).
Workflow
- Confirm the target is an AI application (it has LLM calls, an agent loop, retrieval, or tool calls). If it has none of these, stop — this skill does not apply.
- Detect the framework, model provider, agent SDK, and vector database in use.
- Read
references/integrations.mdand the exact integration doc for what was detected. Prefer a native integration over manual instrumentation. - If no native integration fits, instrument manually with
@observe. Readreferences/tracing.md. - Give each span a meaningful
type(llm,retriever,tool,agent) and capture inputs/outputs. - Add trace-level tags and metadata where they help diagnose failure patterns. Never trace secrets, credentials, or raw sensitive data.
- Confirm
deepeval loginorCONFIDENT_API_KEY, then verify traces appear in the Confident AI Observatory.
Core Principles
- Instrument AI components only —
llm,retriever,tool,agentspans. Never trace non-AI software. - Prefer a supported integration over manual
@observe. Manual tracing is the fallback for unsupported frameworks and app-owned wrapper boundaries. - Read the exact integration doc before writing tracing code.
- Give spans meaningful types; let names default to function names unless there is a strong reason to override.
- Never trace secrets, credentials, API keys, or raw sensitive user data.
- Producing traces is the scope. Attaching metrics and running evals belong to
the
deepevalskill; raw OpenTelemetry export belongs todeepeval-otel.
References
| Topic | File |
|---|---|
Manual instrumentation: @observe, span types, tags, metadata |
references/tracing.md |
| Integration selection rule and framework / model / vector-DB doc index | references/integrations.md |
常见问题
它也会运行评估吗?
不会。运行评估是另一项工作,本技能只生成格式正确的追踪。
它会追踪非 AI 代码吗?
不会。网络服务器、数据库和基础设施都不在其范围内。
它支持哪些框架?
支持多种,包括 LangGraph、LangChain、OpenAI Agents、LlamaIndex、Pydantic AI 和 CrewAI。
详情
作者的原始描述
Instrument an AI application with DeepEval's native tracing so its behavior is visible in Confident AI. TRIGGER when the user wants to add DeepEval tracing or @observe to an LLM app, agent, RAG pipeline, or chatbot; wire a framework, model-provider, or vector-database integration (LangGraph, LangChain, OpenAI Agents, LlamaIndex, Pydantic AI, CrewAI, and others); choose between a native integration and manual instrumentation; set span types, tags, or metadata; or send DeepEval-SDK traces to Confident AI's Observatory. DO NOT TRIGGER for building DeepEval pytest eval suites, datasets, goldens, m
repo: confident-ai/deepeval
热度
- GitHub 星标
- 19k
- 排名
- #10481
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …