What Evals does
Evals is an assertion-first evaluation framework designed for AI agents, allowing developers to assess the performance of their models through structured tests. It operates on the principle of providing an input to the AI and then applying assertions to the output to determine success. Each evaluation case is defined by an ID, a prompt, and a series of assertions, which can be either deterministic or model-graded. This framework is built to align with Anthropic's guidelines on evaluating AI agents, ensuring that evaluations are both rigorous and reliable.
The core components of Evals include a deterministic assertion engine and a model-graded judging system. The deterministic assertions cover a wide range of checks, such as equality, substring presence, and JSON structure validation, ensuring that tests can be executed quickly without relying on model inference. The model-graded assertions leverage a structured judging process, allowing for nuanced evaluations based on the quality of the output. By combining these two types of assertions, Evals provides a comprehensive evaluation approach that balances speed and depth.
Evals is particularly useful for developers and researchers who need to benchmark AI models, conduct regression tests, or compare different prompt strategies. It allows for the creation of evaluation suites that can be customized to specific needs, providing flexibility in testing various aspects of AI performance. Additionally, the framework supports tracking of evaluation results and performance metrics, enabling continuous improvement of AI systems.
However, Evals is not intended for scientific method applications, property or mutation testing of code, or live UI verification. It is specifically tailored for AI evaluations and should be used in contexts where structured input-output assessments are required. Users looking for a tool to conduct broader testing methodologies may need to consider alternative solutions.
When to use it
Use Evals when you need to evaluate, benchmark, or regression test AI models and outputs.
When not to use it
Avoid using Evals for scientific method testing or UI verification, as it is focused on assertion-based evaluations of AI outputs.
What you can build with it
Benchmarking AI Models
Use Evals to benchmark different AI models against a set of predefined assertions to determine which performs best in specific scenarios.
Regression Testing for AI Outputs
Implement Evals to conduct regression tests on AI outputs, ensuring that changes in the model do not negatively impact performance.
Comparing Prompt Strategies
Leverage Evals to compare various prompt strategies by evaluating their outputs against structured assertions.
How to install Evals
View source1. Install with the skills CLI
npx skills add danielmiessler/lifeos/Evals --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by danielmiesslerEvals — Assertion-First AI Evaluation
What it is
An eval gives an AI an input, then applies assertions to its output to measure success (Anthropic's definition). A case is {id, prompt, assert:[...]}. Each assertion is either deterministic (code, fast/free) or model-graded (an LLM judge). Cases run multiple trials; we report pass^k (all trials pass — the honest metric for a reliability-critical agent) and pass@k (any trial passes). Everything routes through Inference.ts — subscription-billed, no API-key path, no external deps.
Grounded in Anthropic's current doctrine — Demystifying evals for AI agents, Define success criteria / develop tests, and the skill-creator {text, passed, evidence} assertion convention. The typed-assert layer is promptfoo-shaped but our own TS.
The canonical path (v2)
| Tool | Role |
|---|---|
Tools/Assertions.ts | Deterministic assert engine: equals, contains, icontains, contains-all/any, regex, starts-with, ends-with, is-json, contains-json, max-length, min-length, each with not- negation. Sync, no model call. |
Tools/Judge.ts | Model-graded asserts llm-rubric (1–5 → 0–1, threshold) and llm-assert (NL assertions → TRUE/FALSE/UNKNOWN). Forced-structured JSON verdict, reason-then-score, distinct judge level, Unknown→miss escape hatch. |
Tools/EvalRunner.ts | Loads a suite, runs the agent-under-test per case (single-shot inference against the target system prompt), applies asserts, computes pass^k/pass@k, persists transcripts + latest.json. |
Tools/SuiteManager.ts | Suite listing + saturation tracking. |
Tools/FailureToTask.ts | Convert real failures into cases (seed from 20–50 real failures). |
# Run a suite (USER-customization suites resolve before the skill's own)
bun run ${LIFEOS_SKILL_DIR}/Tools/EvalRunner.ts -s <suite> [-t trials] [--json]
# Sanity-check the assert engine / judge
bun run ${LIFEOS_SKILL_DIR}/Tools/Assertions.ts # 16-case self-test
bun run ${LIFEOS_SKILL_DIR}/Tools/Judge.ts # good-vs-bad discrimination
Workflow Routing
| Workflow | Trigger | File |
|---|---|---|
| RunEval | "run the eval", "run suite", "evaluate this", "grade output" | Workflows/RunEval.md |
| CreateUseCase | "new eval", "create a suite", "eval for X", "what should I test" | Workflows/CreateUseCase.md |
| CreateJudge | "write a judge", "llm-rubric", "grading criteria", "judge prompt" | Workflows/CreateJudge.md |
| ComparePrompts | "compare prompts", "which prompt is better", "A/B this prompt" | Workflows/ComparePrompts.md |
| CompareModels | "compare models", "which model is better", "is the cheaper rung enough" | Workflows/CompareModels.md |
| ViewResults | "eval results", "how did it score", "show the last run", "saturation" | Workflows/ViewResults.md |
| CreateScenario | "create a scenario", "multi-turn eval", "scenario test" | Workflows/CreateScenario.md |
| RunScenario | "run the scenario", "run multi-turn" | Workflows/RunScenario.md |
Suite / case schema (assertion-first)
name: my-suite
type: regression # or capability
pass_threshold: 0.75
agent_level: medium # agent-under-test inference level
judge_level: high # judge != generator (Anthropic best practice)
trials: 3
# system_prompt: optional override; default = live system prompt + DA identity
cases:
- id: descriptive_name
prompt: "the user turn sent to the agent-under-test"
assert:
- type: not-contains # deterministic
value: "should work"
weight: 1
- type: llm-rubric # model-graded, weighted for partial credit
weight: 2
value: "Does the output tie any done-claim to verification evidence?"
- type: llm-assert
weight: 1
value: ["The output does not claim success without evidence"]
- id: should_not_case # balance: test should-do AND should-not
negative: true
prompt: "..."
assert: [...]
Identity-bound suites (e.g. {{DA_NAME}}'s dispositions) live in LIFEOS/USER/CUSTOMIZATIONS/SKILLS/Evals/Suites/ — the public skill ships only generic suites/examples.
Doctrine (from Anthropic — encode, don't restate)
- Grade the output/outcome, not the path. Tool-call-sequence asserts are brittle and demoted to opt-in; the everyday suite grades what the agent produced. The legacy
core-behaviorssuite (tool-sequence graded) is retained only as an example of this anti-pattern. - Capability starts low (a hill to climb); regression targets ~100%; passing capability cases graduate into regression.
- pass^k for reliability, pass@k where one success suffices.
- Partial credit via assert weights. Balance should-do and should-not cases — one-sided evals create one-sided optimization.
- Judge discipline: distinct judge model, reason-then-score, forced structured verdict, an Unknown escape hatch.
- Never trust a score until you read transcripts — every run persists full case transcripts to
MEMORY/STATE/Evals-Results/<suite>/<run>/run.json.
Harness integration
- Config-change regression:
hooks/ConfigEvalFire.hook.ts→LIFEOS/TOOLS/ConfigEvalOnChange.tsfires the configured dispositions suite when a behaviour-defining file changes (defaultcore-behaviors; override viaLIFEOS/USER/CUSTOMIZATIONS/SKILLS/Evals/config.jsonconfig_change_suite— identity-bound suites live in that USER layer, never the public tree); regressions notify Pulse. Non-blocking, subscription-billed, debounced. - ISA / Algorithm: an eval suite is the operational form of an ISA claim's falsifier — see
LIFEOS/MEMORY/WORK/20260716-eval-system-integration/ISA.mdfor the integration map.
Legacy (v1, superseded)
The v1 grader-stack (Graders/, TrialRunner.ts) and the @langwatch/scenario path (ScenarioRunner.ts, LifeosAgentAdapter.ts, API-billed) predate the assertion-first rewrite. Prefer the v2 path above. The scenario path bills ANTHROPIC_API_KEY — do not use it for principal work.
Gotchas
- Single-shot agent-under-test narrates tool calls. Running the full agentic system prompt through tool-less inference makes the agent defer and simulate tool use instead of answering — which tanks "lead with the answer" style cases. EvalRunner injects an
[EVALUATION CONTEXT] no tools, answer directlysuffix to fix this; keep it when authoring output-graded disposition cases. judge_levelmust differ fromagent_level(Anthropic: judge ≠ generator). Default agent=medium, judge=high.- Unknown counts as a miss. A judge that can't verify an assertion returns UNKNOWN, scored as fail — conservative for regression, correct for gates.
- Deterministic asserts are free; use them first. Reserve model asserts (
llm-rubric/llm-assert) for nuance a code check can't capture. is-jsonchecks the whole output;contains-jsonchecks for an embedded fragment. Don't useis-jsonon prose that merely mentions JSON.
Execution Log
After completing any workflow, append a single JSONL entry:
echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"Evals","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl
Frequently asked questions about Evals
Similar skills
Arize Evaluator
Streamline LLM evaluation workflows on Arize.
Troubleshoot
Analyze logs to understand chat agent behavior.
Agentic Evaluation
Enhance AI outputs through iterative evaluation and refinement.
RAG Evaluation
Evaluate retrieval-augmented generation benchmarks efficiently.
NV-Reason-CXR
Run smoke tests for chest X-ray reasoning models.
Clinical ASR Evaluation
Score and evaluate clinical ASR manifests effectively.

