All projects
FreeIntermediate 45 min pytest -q → 5 passed

Eval Harness: measure before you ship

Real cases from JSONL, pass/fail checks and a CI exit code.

A tiny evaluation harness that treats prompt changes like code changes. Load cases from JSONL, run your model, check required and forbidden text, print failures and exit non-zero in CI. The demo model scores 4/4; break it and watch the score fall.

README

# Eval Harness — measure your AI before you ship it

A tiny but real evaluation harness. It loads cases from JSONL, runs your model, checks required and forbidden text, prints failures and exits non-zero in CI.

## Run it

python3 evals.py
python3 -m pytest -q     # 5 passed

Try breaking the demo model and watch the score drop. That is the point: a prompt change is only an improvement if the eval score says so.

## Add cases

Append one JSON object per line to data/cases.jsonl:

{"name": "refund window", "input": "How long do refunds take?", "expected": "14 days", "forbidden": "30 days"}

Use real user questions (with PII removed). Start with 30, grow to hundreds as you find failures in production.

## Put it in CI

- name: Evals
  run: python evals.py

A failed eval fails the build, so a prompt regression cannot reach users silently.

MIT licensed.

Files in this download

data/cases.jsonl

demo_model.py

evals.py

README.md

requirements.txt

tests/test_evals.py

Push this project to GitHub

Create a repository and upload every file as one commit. Use it for your portfolio, a code review, or your first deploy.

Classic token: tick `repo`. Fine-grained token: give this repository Contents → Read and write and Metadata → Read. Create a token · Fine-grained token

Your token is stored in this tab's sessionStorage and sent only to api.github.com. keepUp AI never receives it.

No GitHub account? The project ZIP works on its own — push later whenever you like.

All projects

Generated from the same content the course teaches. If a lesson changes, its download and tests change with it.