datadog-labs/agent-skills/agent-observability-eval-bootstrap

Claude Code and agent skill by datadog-labs/agent-skills

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Bootstrap evaluators from production traces — by default propose online LLM-judge evaluators and, after you confirm, create them in Datadog as disabled drafts (never auto-enabled); on request emit Python SDK code or a framework-agnostic JSON spec instead. Use when user says "bootstrap evaluators", "generate evaluators", "create evals from traces", "eval bootstrap", "write evaluators", "build eval suite", "publish evaluators", or wants to generate BaseEvaluator/LLMJudge code or online judge configs from production LLM trace data. Works with ml_app and optional RCA report or failure hypothesis.

Install

npx vskill@latest install datadog-labs/agent-skills/agent-observability-eval-bootstrap

SKILL.md

The same SKILL.md was published earlier as datadog-labs/agent-skills/agent-observability-eval-bootstrap.

Backend

Detection — At the start of every invocation, before taking any action, determine which backend to use:

  1. If the user passed --backend pup anywhere in their invocation → use pup mode immediately, regardless of whether MCP tools are present. Skip steps 2–4.
  2. Check whether MCP tools are present in your active tool list. The canonical signal is whether mcp__datadog-llmo-mcp__list_llmobs_evals appears in your available tools.
  3. If MCP tools are present → use MCP mode throughout. Call MCP tools exactly as named in this skill's workflow sections.
  4. If MCP tools are absent → check whether pup is executable: run pup --version via Bash. A JSON response containing "version" confirms pup is available.
  5. If pup responds → use pup mode throughout. Translate every MCP tool call to its pup equivalent using the Tool Reference appendix at the bottom of this file.
  6. If neither is available → stop and tell the user:

> "Neither the Datadog MCP server nor the pup CLI is available. Connect the MCP server (claude mcp add --scope user --transport http datadog-llmo-mcp 'https://mcp.datadoghq.com/v1/mcp?toolsets=llmobs') or install pup."

--backend pup is accepted anywhere in the invocation arguments and is stripped before passing remaining args to the skill logic.

pup invocation rules:

  • Invoke via Bash: pup llm-obs <subcommand> [flags]
  • pup always outputs JSON. Parse directly — no content-block unwrapping (unlike MCP results, which may wrap JSON in [{"type": "text", "text": "<json>"}]).
  • If pup returns an auth error, tell the user to run pup auth login and stop.
  • Parallelization: issue multiple Bash tool calls in a single message (one pup command per call).
  • Time flags: pup accepts bare duration strings (1h, 7d, 30m) and RFC3339 timestamps. Do not use now--prefixed strings — strip the prefix when converting from a skill --timeframe argument: now-7d → 7d, now-24h → 24h, now-30d → 30d.
  • --summary on pup llm-obs spans search strips payload fields to essential metadata only. Use it in bulk/search phases where content is not needed.

Invocation ID: At the very start of each invocation, before any MCP tool call, generate an 8-character hex invocation ID (e.g., 3a9f1c2b). Keep it constant for the entire invocation.

Intent tagging: On every MCP tool call, prefix telemetry.intent with skill:agent-observability-eval-bootstrap[<inv_id>] — followed by a description of why the tool is being called. On the first MCP tool call only, use skill:agent-observability-eval-bootstrap:start[<inv_id>] — instead (note the :start suffix). Example first call: skill:agent-observability-eval-bootstrap:start[3a9f1c2b] — Phase 0: map existing eval coverage for task-cruncher

Eval Bootstrap — Generate Evaluators from Production Traces

Given a sample of production LLM traces, analyze input/output patterns and quality dimensions, then propose a ready-to-use evaluator suite. Four output modes — online evaluators are the default; SDK code, the JSON spec, and the dataset-emit mode are produced on request:

  • `publish` (default) — propose online LLM-judge evaluators, then — only after you confirm the suite — write them to Datadog via create_or_update_llmobs_evaluator as disabled drafts (enabled: false). Nothing is created until you confirm at the Phase 2 checkpoint, and nothing scores any spans until you enable it in the UI — the skill never auto-publishes a live evaluator. Once you enable a draft, it runs automatically on matching production spans, traces, or sessions (no dataset, no task function). The skill auto-classifies each proposed evaluator as span-scoped, trace-scoped, or session-scoped based on what the judgment requires (a per-LLM-call tone check vs. an agent goal completion that needs the whole trace vs. user satisfaction across a whole multi-trace conversation) — you accept or override the classification at that checkpoint. Session-scoped evaluators are only proposed when the app's spans carry a session_id (verified by a probe in Phase 1).
  • `sdk_code` (on request — `--sdk-code`, or ask after a publish run) — Python .py file using the Datadog Evals SDK (BaseEvaluator / LLMJudge) for offline experiments.
  • `data_only` (on request — `--data-only`) — self-contained JSON spec, framework-agnostic.
  • `emit_dataset` (on request — `--emit-dataset <path>`) — sample production traces and write a DatasetRecordRaw[] JSON file shaped for LLMObs.create_dataset(records=...). Skips evaluator proposal and generation entirely — this mode produces a dataset, not evaluators. Used by agent-observability-eval-pipeline (Phase 4) to seed an experiment dataset from production behavior.

After a publish run, if the user wants the same suite as offline code or a portable spec, they just ask — the skill regenerates the already-confirmed suite in sdk_code / data_only mode without re-exploring (see "On-request code generation" in Phase 3). The emit_dataset mode is independent of the evaluator workflow and never re-uses a prior proposal — it always re-samples traces.

Usage

/agent-observability-eval-bootstrap <ml_app> [--timeframe <window>] [--sdk-code | --data-only | --emit-dataset <path>] [--trace-limit <N>]

Arguments: $ARGUMENTS

Inputs
InputRequiredDefaultDescription
ml_appYes—ML application to scope traces
timeframeNonow-7dHow far back to look
rca_reportNo—Failure taxonomy from agent-observability-trace-rca, or a free-text failure hypothesis
--sdk-codeNooffEmit a Python SDK .py file for offline experiments instead of publishing online. Mutually exclusive with --data-only and --emit-dataset.
--data-onlyNooffEmit a self-contained JSON spec file instead of publishing online. Mutually exclusive with --sdk-code and --emit-dataset.
--emit-dataset <path>NooffDataset-only mode. Sample production traces and write a DatasetRecordRaw[] JSON to <path>. Skips the evaluator workflow entirely. Mutually exclusive with --sdk-code and --data-only.
--trace-limitNo20 (cap 50)Max traces to sample in emit_dataset mode

If ml_app is missing, ask the user before proceeding. With no mode flag, the skill defaults to `publish` — it proposes online evaluators and, only after you confirm, creates them as disabled drafts (it never auto-enables them). If more than one of --sdk-code, --data-only, --emit-dataset is supplied, error out and ask which mode the user wants.

Available Tools

ToolPurpose
search_llmobs_spansFind spans by eval presence, tags, span kind, query syntax. Paginate with cursor.
get_llmobs_span_detailsMetadata, evaluations (scores, labels, reasoning), and content_info map showing available fields + sizes.
get_llmobs_span_contentActual content for a span field. Supports JSONPath via path param for targeted extraction.
get_llmobs_traceFull trace hierarchy as span tree with span counts by kind.
get_llmobs_agent_loopChronological agent execution timeline (LLM calls, tool invocations, decisions).
list_llmobs_evalsList every evaluator configured for the caller's org across all ml_apps, with enabled status and ml_app per result. Call once in Phase 0 to map existing coverage before proposing new evaluators — filter the result by ml_app client-side.
get_llmobs_evaluatorFetch the full persisted evaluator config by name (target ml_app + sampling + filter, provider, prompt template, parsing type, output schema, assessment criteria). Use in Phase 0 to understand what each existing custom eval measures, and (in publish mode) before any update — create_or_update_llmobs_evaluator is full-replace, so you must round-trip the full config to avoid clobbering fields. Not all evaluators have a stored config (notably source=ootb); a not-found error there is expected — skip those.
create_or_update_llmobs_evaluator(publish mode) Write an LLM-judge evaluator config to Datadog. Full-replace semantics: any omitted optional field resets to its default. See "Publishing Conventions" for required fields and structured output → JSON schema mapping.
delete_llmobs_evaluator(publish mode) Only used if the user explicitly asks to remove an evaluator. Never invoke speculatively.
Key get_llmobs_span_content Patterns

Use the path parameter to extract targeted data without fetching full payloads:

FieldPathWhat you get
messages$.messages[0]System prompt (first message, usually system role)
messages$.messages[-1]Last assistant response
messages(no path)Full conversation including tool calls
input / output—Span I/O
documents—Retrieved documents (RAG apps)
metadata—Custom metadata (prompt versions, feature flags, user segments)
How to Use search_llmobs_spans

Additional filters combine with space (AND): @status:error @ml_app:my-app. Dedicated params (span_kind, root_spans_only, ml_app) work alongside query, but query takes precedence over tags.

To find spans with a specific eval: @evaluations.custom.<eval_name>:* — you can only query for eval presence, not specific results.

To detect whether the app uses sessions: session_id:* matches any span carrying a session_id (session_id is a first-class field — no @ prefix). The Phase 1 session probe uses this to gate session-scope evaluators.

Parallelization Rules
  1. `get_llmobs_span_details`: Group span_ids by trace_id. One call per trace_id with ALL its span_ids. Issue ALL calls for a page in a single message.
  2. `get_llmobs_span_content`: Each call is independent — always issue ALL in a single message.
  3. `get_llmobs_trace` / `get_llmobs_agent_loop`: Parallelize across different traces in a single message.
  4. Pipeline parallelism: Start get_llmobs_span_details for page 1 results immediately — don't wait to collect all pages.

Evaluator SDK Reference

Applies to `sdk_code` mode only. In data_only mode, use this section as domain context when writing rubric prompts — no SDK classes are emitted.
Imports
python
# Core classes
from ddtrace.llmobs._experiment import BaseEvaluator, EvaluatorContext, EvaluatorResult
# LLM-as-judge
from ddtrace.llmobs._evaluators.llm_judge import (
LLMJudge,
BooleanStructuredOutput,
ScoreStructuredOutput,
CategoricalStructuredOutput,
)
# Built-in evaluators (use only if needed)
from ddtrace.llmobs._evaluators.format import JSONEvaluator, LengthEvaluator
from ddtrace.llmobs._evaluators.string_matching import StringCheckEvaluator, RegexMatchEvaluator

Only import what the generated file actually uses.

EvaluatorContext (what evaluate() receives)
python
@dataclass(frozen=True)
class EvaluatorContext:
input_data: dict[str, Any] # Task inputs (from dataset record, NOT from span)
output_data: Any # Task output (from task function return, NOT from span)
expected_output: Optional[JSONType] = None # Ground truth (if available)
metadata: dict[str, Any] = {} # Additional metadata
span_id: Optional[str] = None # LLMObs span ID
trace_id: Optional[str] = None # LLMObs trace ID

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
173
Repository forks
29
7-day trend score
26

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/datadog-labs/agent-skills/agent-observability-eval-bootstrap/badge)](https://verified-skill.com/skills/datadog-labs/agent-skills/agent-observability-eval-bootstrap)

Something wrong with this skill or its page? Tell us.