Repository navigation
feat(eval): run a model through a skill against the simulator and check the outcome (#61) - #96
Merged
Merged
Conversation
…ck the outcome (#61)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #61
Adds
npm run eval -- <skill>/<scenario> --model <model>: it runs a model through a skill against theghsimulator and judges what it left behind with the scenario checker.How it works
worldand builds a sandbox: a bareoriginplus a checkout with a branch per open PR, sogit pushworks and a push is visible.inputs, aSkilltool and abashtool (simulator first onPATH). EverySkillcall is recorded; the entry skill andkind: referenceskills are not counted as calls.diffWorlds(before, after).checkScenarioon that gives violations of the contract. A comparison with the golden (result, effects by op/target/label/marker, calls, rerun) gives deviations. Report ispass,deviationorviolation, with the effect diff.Constraints from the issue
ANTHROPIC_API_KEYit exits 2 and says so before making anything. Not innpm test's runs of the API, not in CI.--max-tokens(whole invocation, default 500000),--max-turns(per run),--max-runs. A run that hits a cap isincomplete, not judged.--model/EVAL_MODEL, no default..eval/transcripts/(git-ignored).PATH(no API key, no GitHub token).--skills-dir <copy>shows the model a modified copy of the skills while the verdict still comes from the package's contract; this is how to try a deliberately wrong skill.Acceptance criteria
shepherd-github-pr/conflict-without-checks.the oracle says pr#40 is eligible, but the result is ...). Verified with a scripted runner; see below.checkScenario'scallscheck uses it.Not verified here
No model was run. There was no API key available, so
apiRunneris tested against a fakefetch(tool loop, token accounting, caps, API errors) and the judge against scripted runs. A first real run is the remaining check. In particular, the first two criteria are shown with a stand-in for the model, not an actual one.Tests
tests/eval.test.mjs(22 tests, added tonpm test), including: every golden of every item skill, applied as a run's effects, judges as a pass.npm run checkis green.Limits (ADR 0016)
Item skills only; prose-only world fields are not visible to the model (the report says when a scenario has them); one run is one sample; the model's commands run on the host (use a container for untrusted skills).