agentleFS
ychampionychampion/ystack/skills/eval-judge/SKILL.md

eval-judge

Skill4 starsChanged 2 days agoMITView on GitHub

Build a grader for an agent's or model's outputs that agrees with the user's own judgment: collect about 20 real runs, have the user label them, write a rubric, run the grader, measure agreement, fix the disagreements, repeat, and check on a held-out set. Works with any model or CLI. Use for "build an eval", "LLM as judge", "grade these outputs", "auto-score the agent", "is the new prompt better", or before tuning a prompt or skill by numbers.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Cost: Every grader run calls a model once per output.

    line 18
  2. Distinctive:

    Code first: If a property can be checked by code (valid JSON, tests pass, length, a required field, a banned word), check it with code.

    line 21
  3. Distinctive:

    Put about a quarter aside, untouched until step 7.

    line 34
  4. Distinctive:

    Ask for the reason before the verdict.

    line 53
  5. Distinctive:

    Run it on the working set with any model you can call headlessly, e.g.

    line 57
  6. Distinctive:

    Never tune on the held-out set.

    line 87
  7. Distinctive:

    No paid API key without the user's okay and a cap.

    line 89

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Eval judge

A grader that doesn't match the user's judgment makes every later number a lie. This skill builds one, then proves it agrees with the user before anyone trusts its scores.

Before you start

  • Cost. Every grader run calls a model once per output. Estimate runs x outputs x tokens and tell the user. Use a model the user is already signed in to (a CLI subscription, a local model). Never use a paid API key without the user's explicit okay for this task, and agree a spend cap.
  • Code first. If a property can be checked by code (valid JSON, tests pass, length, a required field, a banned word), check it with code. Use a model grader only for judgment calls.

Procedure

1. Collect real outputs

Gather about 20 real outputs of the thing being judged, with their inputs. Real runs beat invented ones. Include clear passes, clear failures and borderline cases. Save them as one file per case or one JSONL file: {id, input, output}.

2. Split off a held-out set

Put about a quarter aside, untouched until step 7. Tuning the rubric on them makes the final check worthless.

3. Get the user's labels

Show the user each working-set case and ask for pass/fail plus one line of why. The why is the raw material for the rubric. Don't label for them; if the user can't decide, mark it unclear and leave it out.

4. Write the rubric

From the user's reasons, write 3-6 criteria. Each one:

<criterion>: pass if <observable condition>; fail if <observable condition>.
Example pass: <short quote>   Example fail: <short quote>

The grader returns, per case, JSON: {"id", "verdict": "pass"|"fail", "failed_criteria": [], "reason"}. Ask for the reason before the verdict. Binary verdicts agree far better than 1-10 scores.

5. Run the grader

Run it on the working set with any model you can call headlessly, e.g. a CLI in print mode reading the rubric plus one case per call. Use a fixed prompt and temperature 0 if the tool allows. Save every raw verdict.

6. Measure and fix

Agreement = cases where grader and user match / labelled cases. Also list false passes and false fails separately: a grader that passes bad output is worse than one that is strict.

For each disagreement, read the grader's reason. Then either sharpen a criterion, add an example of that case to the rubric, or, if the user's label looks inconsistent, ask the user again. Change one thing per round and re-run. Stop at about 90% agreement or after 3 rounds.

7. Check on the held-out set

Have the user label the held-out cases, run the grader once, and report agreement. If it drops well below the working-set number, the rubric was overfit: add cases and go back to step 4.

Report

Grader: <model/CLI>   Rubric: <path>   Cases: <n working> + <n held out>
Agreement: working <x%>, held-out <y%>   False passes: <n>   False fails: <n>
Cost per full run: <calls, est. tokens or $>
Known weak spots: <case types it still gets wrong>

Rules

  • The user's labels are the ground truth, not yours.
  • Never tune on the held-out set.
  • Re-check agreement whenever the rubric, the grader model or the kind of output changes.
  • No paid API key without the user's okay and a cap.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.