pydantic-evals

pydantic-evals is a skill for Claude Code, Codex from Fuenfgeld/pydantic-ai-skills. It costs 130 tokens per session (2,800 once invoked), scanned A, original, MIT.

A code-based framework for testing and assessing AI agents and language-model outputs. It uses test cases, collections of cases called datasets, and evaluators that judge results.

In plain words
What is it for?
Use it to create evaluation datasets, define fixed or model-based checks, run experiments, and produce reports.
Why use it?
It turns agent quality checks into repeatable tests that can be stored with the code and run over time. This helps reveal when changes improve or weaken results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create evaluation datasets, define fixed or model-based checks, run experiments, and produce reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fuenfgeld/pydantic-ai-skills/pydantic-evals
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Fuenfgeld/pydantic-ai-skills --skill pydantic-evals
Clone the repo
git clone --depth 1 https://github.com/Fuenfgeld/pydantic-ai-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pydantic-evals

README.md
[![agentmods](https://agentmods.dev/badge/skills/fuenfgeld/pydantic-ai-skills/pydantic-evals/github.svg)](https://agentmods.dev/skills/fuenfgeld/pydantic-ai-skills/pydantic-evals)
Your own site
<a href="https://agentmods.dev/skills/fuenfgeld/pydantic-ai-skills/pydantic-evals"><img src="https://agentmods.dev/badge/skills/fuenfgeld/pydantic-ai-skills/pydantic-evals/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pydantic-evals

Your own site · 80×15
<a href="https://agentmods.dev/skills/fuenfgeld/pydantic-ai-skills/pydantic-evals"><img src="https://agentmods.dev/badge/skills/fuenfgeld/pydantic-ai-skills/pydantic-evals.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,800 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.02800
Opus 5 $0.00065 $0.01400
Sonnet 5 $0.00026 $0.00560
Haiku 4.5 $0.00013 $0.00280

Measured 12d ago against content hash b72764f7fbf7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pydantic-evals scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (references/examples/add_custom_evaluators.py, references/examples/agent.py, references/examples/compare_models.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pydantic-evals/SKILL.md · 379 lines

How it starts

The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pydantic Evals

Overview

Pydantic Evals provides rigorous testing and evaluation for AI agents and LLM outputs using a code-first approach with Pydantic models. It enables "Evaluation-Driven Development" (EDD) where evaluation suites live alongside application code, subject to version control and CI/CD.

Core Concepts

Understand these key primitives:

Case

A single test scenario with inputs, optional expected output, and metadata.

from pydantic_evals import Case

case = Case(
    name="refund_request",
    inputs="What is your refund policy?",
    expected_output="30 days full refund",
    metadata={"category": "policy"}
)

Dataset

Collection of Cases with default evaluators. Generic over input/output types.

from pydantic_evals import Dataset

dataset = Dataset(
    name="my_eval_suite",  # v2: name is REQUIRED (keyword-only)
    cases=[case1, case2, case3],
    evaluators=[evaluator1, evaluator2]
)

Evaluator

Logic engine that assesses outputs. Returns bool (Pass/Fail), float/int (score), or str (label).

Experiment

Point-in-time performance capture when Dataset runs against a Task.

For detailed explanations, see references/core-concepts.md

Quick Start

Create and run a simple evaluation:

from pydantic_evals import Case, Dataset
from pydantic_evals.evaluators import Contains, LLMJudge

# Define cases
cases = [
    Case(
        name="greeting",
        inputs="Hello, who are you?",
        expected_output="I am an AI assistant."
    )
]

# Define evaluators
evaluators = [
    Contains(value="AI assistant"),
    LLMJudge(rubric="Is this response polite? Answer PASS or FAIL.")
]

# Create dataset
dataset = Dataset(name="quickstart", cases=cases, evaluators=evaluators)

# Run evaluation
async def my_agent(query: str) -> str:
    # Your agent logic here
    return "I am an AI assistant."

report = dataset.evaluate_sync(my_agent)
report.print()

Evaluator Types

Read the full file on GitHub · 379 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 379 lines · 130 tokens per session scan A b72764f7fbf7

Subscribe to this mod's changes

pydantic-evals is a skill published in the GitHub repository Fuenfgeld/pydantic-ai-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 130 tokens to every session and 2,800 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

evaluating-llms-harness

Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K, TruthfulQA, HellaSwag). Use when benchmarking model quality, comparing models, reporting academic results, or tracking training progress. Industry standard used by EleutherAI, HuggingFace, and major labs. Supports HuggingFace, vLLM, APIs.

NousResearch/hermes-agent · 29 tokens

pydantic-ai

Build production-ready AI agents with PydanticAI — type-safe tool use, structured outputs, dependency injection, and multi-model support.

davila7/claude-code-templates · 32 tokens

building-pydantic-ai-agents

Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydanticai, or asks to build an AI agent, add tools/capabilities, defer capability loading, stream output, define agents…

pydantic/pydantic-ai · 85 tokens

darwinian-evolver

Evolve prompts/regex/SQL/code with Imbue's evolution loop.

NousResearch/hermes-agent · 22 tokens

tool-abuse-detection

Detect tool misuse and unexpected code execution via dialogue testing. Use when the agent exposes file, code-execution, or network tools.

Tencent/AI-Infra-Guard · 32 tokens

building-gold-corpus

Scaffold a synthetic gold-standard annotation project for evaluating OpenMed NER and de-identification models — label schema, annotation guidelines, BRAT or Label Studio config, and disjoint train/dev/test splits. Use when the user wants to create eval fixtures, set up annotation, define a label set, write guidelines…

maziyarpanahi/openmed · 159 tokens