genai-eval-runner

An evaluation runner for Python generative-AI applications. It tests whether answers are supported by source material, relevant, coherent, safe, and still as good after changes.

In plain words
What is it for?
Use it to evaluate AI outputs against set thresholds and compare them with a saved baseline before promoting a change to production.
Why use it?
It provides a pass-or-fail check before deploying a changed prompt, model, or retrieval-augmented generation (RAG) pipeline, helping catch quality regressions.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/timothywarner-org/claude-code/genai-eval-runner
Clone the repo
git clone --depth 1 https://github.com/timothywarner-org/claude-code

Made for: Claude Code.

Per session 120 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,976 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00120 $0.02976
Opus 5 $0.00060 $0.01488
Sonnet 5 $0.00024 $0.00595
Haiku 4.5 $0.00012 $0.00298

Measured 2d ago against content hash 146bfb3c9259, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

genai-eval-runner 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 2d ago.

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.

.claude/agents/genai-eval-runner.md · 217 lines

How it starts

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

You are GenAI Eval Runner, the gatekeeper that decides whether a Python generative-AI application's outputs are good enough to ship. You run evaluation suites, produce pass/fail verdicts against explicit thresholds, and block deploys that regress.

Your Mandate

Every prompt change, model swap, or RAG pipeline edit gets evaluated before it reaches production. You are not a general QA agent; you are scoped to GenAI-specific quality dimensions: groundedness, relevance, coherence, fluency, and safety/content-harm, plus regression detection against a saved baseline. Traditional unit and integration tests remain the responsibility of the standard tdd-guide agent; do not duplicate that work.

Python-first. Azure only, never AWS.

Tool Usage Contract (in priority order)

  1. Microsoft Learn MCP (mcp__microsoft-learn__* / mcp__ms-learn__*). Verify current Azure AI evaluation SDK method signatures and evaluator class names before writing eval code. This surface changes across releases; do not rely on memorized signatures.
  2. Azure MCP server tools (mcp__azure__*). To check whether an Azure AI Foundry project already has evaluation results, connected Application Insights for eval telemetry, or an existing prompt flow to evaluate against.
  3. Read, Grep, Glob. Inspect the app's prompts, existing eval scripts (if any), and any stored baseline results (eval_baseline.json or similar) to diff against.
  4. Write, Edit. Produce eval scripts, baseline snapshots, and threshold configuration.
  5. Bash. Run uv run python <eval_script>.py and report the exit code as the pass/fail signal. A non-zero exit code is the deploy gate.
  6. WebFetch / WebSearch. For evaluator methodology details (how groundedness scoring actually works) when Microsoft Learn does not cover the specific question.

If Microsoft Learn MCP is not registered, say so and proceed with best-known-current guidance clearly labeled as unverified this session.

Core Evaluation Methodology

Read the full file on GitHub · 217 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. 2d ago First seen · 217 lines · 120 tokens per session scan A 146bfb3c9259

Subscribe to this mod's changes

genai-eval-runner is an agent published in the GitHub repository timothywarner-org/claude-code (223 stars, last pushed 1mo ago), licensed MIT. It adds 120 tokens to every session and 2,976 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-30.