Index of every page on this site: llms.txt
All skills
confident-ai avatar

/eval-grade

@1ae0870
Run it yourself

Implement and calibrate failure-specific AI evaluators against expert labels. Supports code checks, managed grading, local DeepEval/Jev, and other judges; not application prompt optimization.

Use this Skill: https://skilld.dev/gh/confident-ai/eval-skills/eval-grade

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesgrader-contract.md

≈623 tokens on demand. Your agent reads this file only when SKILL.md points to it.

<!-- Synced from shared/grader-contract.md by scripts/sync_shared.py. Edit shared/grader-contract.md, not this copy. -->

Local grader contract

On the local tracks, every grader is a plain function with the same shape, so the eval runner, the validation script, and the monitoring job can call any of them without knowing how it works inside.

Python

def grade(case: dict, result: dict) -> dict:
    """Return {"passed": bool, "reason": str, "score": float, "confidence": float | None}."""

Graders live in .eval/default/graders/graders.py, collected in a registry:

GRADERS = {
    "invented-policy": invented_policy,     # failure-mode id -> grader function
    "missing-order-id": missing_order_id,
}

Async graders (async def) are allowed; callers await them.

TypeScript

export type Grade = { passed: boolean; reason: string; score?: number; confidence?: number | null };
export type Grader = (testCase: EvalCase, result: AppResult) => Grade | Promise<Grade>;
export const GRADERS: Record<string, Grader> = { 'invented-policy': inventedPolicy };

Graders live in .eval/default/graders/graders.ts.

Arguments

  • case: one dataset row from .eval/default/dataset/goldens.jsonl (id, input, expected_output, context, tags, metadata, or the conversational fields).

  • result: what the app produced for that case, as assembled by the runner:

    {
      "output": "the final answer (text or JSON)",
      "turns": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}],
      "retrieval_context": ["chunk text", "..."],
      "tools_called": [{"name": "lookup_order", "input": {"order_id": "A17"}, "output": {"status": "delivered"}}],
      "trace_id": "5b8aa5a2…"
    }

    Only output is always present. The runner fills the rest when the app exposes them (see run-evals).

Return value

Field Meaning
passed The verdict. true means the failure mode was not observed.
reason One or two sentences a person can check against the trace.
score Optional number in [0, 1] when the underlying check has one (a judge's probability, a similarity). Reports use passed.
confidence Optional, for judges that report calibrated confidence.

A grader that can't decide (missing field, API error) must raise, not return passed: false. The runner records raised errors separately so a broken grader never looks like a failing app.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill eval-grade by Confident AI is a toolkit for developing and validating AI-based evaluators. It includes workspace setup scripts, templates for LLM and code-based graders, and utilities for statistical validation. The skill follows security best practices, such as using environment variables for secrets and implementing boundary markers to prevent prompt injection when processing untrusted trace data. All technical behaviors, including dynamic code loading and file system operations, are consistent with its primary purpose as a developer tool.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 1ae0870. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 2 months ago
metadata
{
  "author": "Confident AI",
  "version": "1.1.0"
}

README badge

README badge for confident-ai/eval-skills/eval-grade