Phoenix Evals
GitHubOfficialFirst committed by jimbobbennettDistributed by GitHub
- Skill
- Tool integration
- Software development
- Apache-2.0
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Phoenix Evals provides a structured approach to building, running, and validating evaluators for AI and LLM applications. It supports both Python and TypeScript, offering tools for code-based and LLM-based evaluation, experiment management, and error analysis. The framework emphasizes a code-first approach, encouraging developers to define deterministic evaluations before moving to LLM-based judges, and provides mechanisms to validate evaluator accuracy against human-labeled data.
What it does
- Builds custom code-based and LLM-based evaluators for AI applications.
- Supports batch evaluation of datasets using structured dataframes.
- Facilitates experiment management, including dataset creation and synthetic data generation.
- Provides tools for error analysis, including axial coding and failure taxonomy creation.
- Enables validation of evaluator accuracy against human-provided labels.
- Integrates with tracing and observability to sample and review application traces.
When to use it
- When you need to systematically evaluate the performance of LLM application outputs.
- When building RAG systems that require specific retrieval and faithfulness metrics.
- When you need to categorize and analyze failure patterns in AI agent workflows.
- When transitioning from manual testing to automated, repeatable evaluation experiments.
- When you need to validate that your automated judges align with human expectations.
Advantages
- Supports a code-first approach to evaluation for deterministic results.
- Provides a clear path for validating judge model accuracy.
- Offers structured methods for building failure taxonomies.
- Enables consistent evaluation across both Python and TypeScript environments.
- Integrates directly with tracing data for context-aware evaluation.
Usage examples
- “How do I build a custom LLM evaluator in Python?”
- The skill provides guidance on using the LLM class and custom templates to define evaluators that assess specific model outputs.
- “How can I categorize failures in my AI agent?”
- The skill outlines an axial coding process to group failure notes into structured taxonomies like planning, tool selection, or execution errors.
- “How do I run a batch evaluation on my dataset?”
- The skill demonstrates using the evaluate_dataframe function to process a dataframe and return scores for defined metrics.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/github/phoenix-evals/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip phoenix-evals.zip -d .agents/skills
Documentation by jimbobbennett
Phoenix Evals
Build evaluators for AI/LLM applications. Code first, LLM for nuance, validate against humans.
Quick Reference
Workflows
Starting Fresh: observe-tracing-setup → error-analysis → axial-coding → evaluators-overview
Building Evaluator: fundamentals → common-mistakes-python → evaluators-{code|llm}-{python|typescript} → validation-evaluators-{python|typescript}
RAG Systems: evaluators-rag → evaluators-code-* (retrieval) → evaluators-llm-* (faithfulness)
Production: production-overview → production-guardrails → production-continuous
Reference Categories
| Prefix | Description |
|---|---|
fundamentals-* | Types, scores, anti-patterns |
observe-* | Tracing, sampling |
error-analysis-* | Finding failures |
axial-coding-* | Categorizing failures |
evaluators-* | Code, LLM, RAG evaluators |
experiments-* | Datasets, running experiments |
validation-* | Validating evaluator accuracy against human labels |
production-* | CI/CD, monitoring |
Key Principles
| Principle | Action |
|---|---|
| Error analysis first | Can't automate what you haven't observed |
| Custom > generic | Build from your failures |
| Code first | Deterministic before LLM |
| Validate judges | >80% TPR/TNR |
| Binary > Likert | Pass/fail, not 1-5 |
Files
- ATTRIBUTION.mdAdded by AutoGineer931 B
- LICENSEAdded by AutoGineer10.0 KiB
- SKILL.md4.5 KiB
- references/axial-coding.md2.3 KiB
- references/common-mistakes-python.md7.0 KiB
- references/error-analysis-multi-turn.md1.3 KiB
- references/error-analysis.md4.2 KiB
- references/evaluate-dataframe-python.md4.4 KiB
- references/evaluators-code-python.md3.0 KiB
- references/evaluators-code-typescript.md1.2 KiB
- references/evaluators-custom-templates.md1.2 KiB
- references/evaluators-llm-python.md2.6 KiB
- references/evaluators-llm-typescript.md1.4 KiB
- references/evaluators-overview.md1.1 KiB
- references/evaluators-pre-built.md2.4 KiB
- references/evaluators-rag.md3.1 KiB
- references/experiments-datasets-python.md4.8 KiB
- references/experiments-datasets-typescript.md2.7 KiB
- references/experiments-overview.md1.7 KiB
- references/experiments-running-python.md2.9 KiB
- references/experiments-running-typescript.md3.1 KiB
- references/experiments-synthetic-python.md1.8 KiB
- references/experiments-synthetic-typescript.md2.2 KiB
- references/fundamentals-anti-patterns.md1.6 KiB
- references/fundamentals-model-selection.md1.4 KiB
- references/fundamentals.md1.8 KiB
- references/observe-sampling-python.md2.4 KiB
- references/observe-sampling-typescript.md3.9 KiB
- references/observe-tracing-setup.md3.3 KiB
- references/production-continuous.md3.6 KiB
- references/production-guardrails.md1.3 KiB
- references/production-overview.md2.3 KiB
- references/setup-python.md1.9 KiB
- references/setup-typescript.md981 B
- references/validation-evaluators-python.md1.0 KiB
- references/validation-evaluators-typescript.md4.4 KiB
- references/validation.md1.7 KiB
references/observe-sampling-typescript.md
Observe: Sampling Strategies (TypeScript)
How to efficiently sample production traces for review.
Strategies
1. Failure-Focused (Highest Priority)
Use server-side filters to fetch only what you need:
import { getSpans } from "@arizeai/phoenix-client/spans";
// Server-side filter — only ERROR spans are returned
const { spans: errors } = await getSpans({
project: { projectName: "my-project" },
statusCode: "ERROR",
limit: 100,
});
// Fetch only LLM spans
const { spans: llmSpans } = await getSpans({
project: { projectName: "my-project" },
spanKind: "LLM",
limit: 100,
});
// Filter by span name
const { spans: chatSpans } = await getSpans({
project: { projectName: "my-project" },
name: "chat_completion",
limit: 100,
});2. Outliers
const { spans } = await getSpans({
project: { projectName: "my-project" },
limit: 200,
});
const latency = (s: (typeof spans)[number]) =>
new Date(s.end_time).getTime() - new Date(s.start_time).getTime();
const sorted = [...spans].sort((a, b) => latency(b) - latency(a));
const slowResponses = sorted.slice(0, 50);3. Stratified (Coverage)
// Sample equally from each category
function stratifiedSample<T>(items: T[], groupBy: (item: T) => string, perGroup: number): T[] {
const groups = new Map<string, T[]>();
for (const item of items) {
const key = groupBy(item);
if (!groups.has(key)) groups.set(key, []);
groups.get(key)!.push(item);
}
return [...groups.values()].flatMap((g) => g.slice(0, perGroup));
}
const { spans } = await getSpans({
project: { projectName: "my-project" },
limit: 500,
});
const byQueryType = stratifiedSample(spans, (s) => s.attributes?.["metadata.query_type"] ?? "unknown", 20);4. Metric-Guided
import { getSpanAnnotations } from "@arizeai/phoenix-client/spans";
// Fetch annotations for your spans, then filter by label
const { annotations } = await getSpanAnnotations({
project: { projectName: "my-project" },
spanIds: spans.map((s) => s.context.span_id),
includeAnnotationNames: ["hallucination"],
});
const flaggedSpanIds = new Set(
annotations.filter((a) => a.result?.label === "hallucinated").map((a) => a.span_id)
);
const flagged = spans.filter((s) => flaggedSpanIds.has(s.context.span_id));Trace-Level Sampling
When you need whole requests (all spans in a trace), use getTraces:
import { getTraces } from "@arizeai/phoenix-client/traces";
// Recent traces with full span trees
const { traces } = await getTraces({
project: { projectName: "my-project" },
limit: 100,
includeSpans: true,
});
// Filter by session (e.g., multi-turn conversations)
const { traces: sessionTraces } = await getTraces({
project: { projectName: "my-project" },
sessionId: "user-session-abc",
includeSpans: true,
});
// Time-windowed sampling
const { traces: recentTraces } = await getTraces({
project: { projectName: "my-project" },
startTime: new Date(Date.now() - 60 * 60 * 1000), // last hour
limit: 50,
includeSpans: true,
});Building a Review Queue
// Combine server-side filters into a review queue
const { spans: errorSpans } = await getSpans({
project: { projectName: "my-project" },
statusCode: "ERROR",
limit: 30,
});
const { spans: allSpans } = await getSpans({
project: { projectName: "my-project" },
limit: 100,
});
const random = allSpans.sort(() => Math.random() - 0.5).slice(0, 30);
const combined = [...errorSpans, ...random];
const unique = [...new Map(combined.map((s) => [s.context.span_id, s])).values()];
const reviewQueue = unique.slice(0, 100);Sample Size Guidelines
| Purpose | Size |
|---|---|
| Initial exploration | 50-100 |
| Error analysis | 100+ (until saturation) |
| Golden dataset | 100-500 |
| Judge calibration | 100+ per class |
Saturation: Stop when new traces show the same failure patterns.
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
The author says: Requires Phoenix server. Python skills need phoenix and openai packages; TypeScript skills need @arizeai/phoenix-client.
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
jimbobbennett
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · skills/phoenix-evals · commit 797337f
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (written by AutoGineer)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- jimbobbennett, stbenjam
AutoGineer is not affiliated with or endorsed by jimbobbennett or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download phoenix-evals.zip