GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - yksanjo/agent-eval-check: Deterministic scoring of recorded agent outputs against golden cases: substring/regex/length expectations, per-model pass rates, baseline regression diffs (Python, no dependencies)

BranchesTags
Open more actions menu

Latest commit

 

History

5 Commits
5 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 
demo.py
demo.py
 
 
eval_check.py
eval_check.py
 
 
test_eval_check.py
test_eval_check.py
 
 

Repository files navigation

agent-eval-check

Deterministic scoring of recorded agent outputs against golden cases, in dependency-free Python.

When you change a prompt, swap a model, or bump a library, you want to know which answers got worse. agent-eval-check scores recorded outputs (from any agent or model, captured earlier) against written expectations and diffs the result against a saved baseline, so regressions show up as failing cases instead of vibes. It makes no live model calls and uses no judge model: substring, exclusion, regex, and length checks only.

How it works

Cases file (JSONL), one case per line:

{"id": "founding-year", "prompt": "What year was Acme Demo founded?",
 "expect": {"contains": ["2142"], "not_contains": ["2141"],
            "regex": ["\\b21\\d{2}\\b"], "max_chars": 300}}

Expectation keys: contains, not_contains, regex (each a list of strings; every one must hold), max_chars, min_chars (integers).

Outputs file (JSONL), one row per case per model:

{"case_id": "founding-year", "model": "model-a", "output": "Founded in 2142."}

Scoring: every expectation check is evaluated per output; a case passes when all its checks pass. The report gives a per-model pass rate and one FAIL line per failed check. With --baseline results.json, any case+model that passed in the baseline and fails now is reported as a REGRESSION.

Usage

# Score this week's recorded outputs
python3 eval_check.py score --cases cases.jsonl --outputs outputs.jsonl

# Save this run as the baseline, then diff next week's run against it
python3 eval_check.py score --cases cases.jsonl --outputs outputs.jsonl \
  --save-baseline baseline.json
python3 eval_check.py score --cases cases.jsonl --outputs next.jsonl \
  --baseline baseline.json

python3 eval_check.py score --cases cases.jsonl --outputs outputs.jsonl --json

Exit codes: 0 every case passes for every model and no regressions, 1 any failure or regression, 2 usage or input error.

python3 demo.py runs a synthetic comparison of three fictional models on four trivia cases, including a baseline regression.

Limits

  • Pattern matching, not understanding. These checks verify that expected strings appear and forbidden ones do not. They cannot judge whether an answer is good, only whether it matches what you wrote down. A pass is not quality; a fail is a mismatch worth reading.
  • Case sensitivity is literal. contains: ["spice"] does not match "Spice". Write expectations accordingly, or use regex.
  • You supply the outputs. The tool never calls a model. Record outputs with your own harness and keep the recording settings (temperature, prompt) with the file, or comparisons across runs mean little.
  • Golden cases rot. When the correct answer changes, the case file must change too. A regression flag against a stale baseline is a stale baseline, not a broken model.
  • No semantic, fuzzy, or LLM-judged scoring by design; add that layer yourself if you need it.

Tests

python3 -m unittest test_eval_check -v

25 tests cover case/output validation, every check kind, pass/fail scoring, duplicate and unknown-output findings, baseline regressions, and CLI exit codes.

License

MIT

About

Deterministic scoring of recorded agent outputs against golden cases: substring/regex/length expectations, per-model pass rates, baseline regression diffs (Python, no dependencies)

Topics

agent-safetyai-agentsdeveloper-toolsevalsllm-toolsofflinepythontesting

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.