Repository navigation
Conversation
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.
Until now the corpus was graded only by hand: someone had to ask the model, save the answer and run
tests/grade.py. This adds a run that does it on its own.What changes
tests/run_corpus.pysends each case oftests/corpus/to the model, withSKILL.mdand every file ofreferences/as instructions (orprompts/system-prompt.mdplusreferences/with--variant prompt). The finished text is taken from between<<<TEXTandTEXT>>>markers, so the list of changes after it is not graded, then checked withgrade.py.report.md,report.json) go tocorpus-results/, and the report also goes to the job summary.--answers DIRgrades saved answers without the API,--dry-runshows what would be sent..github/workflows/corpus.ymlruns it on pull requests that touchSKILL.md,references/,prompts/, the checker or the corpus, and by hand (variant and number of runs as inputs). It uses theANTHROPIC_API_KEYsecret and skips forks.tests/test_run_corpus.py: 5 tests for the marker parsing, the prompt build and the saved-answers mode. Reference answers pass; inputs fail.AGENTS.mdexplains when to run it.Checks
npm test: 60 tests pass (55 before).python3 scripts/validate-package.py: valid.Corpus runjob, since it touchestests/run_corpus.py.Cost: one run of 11 cases × 3 answers with prompt caching is estimated at a few dollars; the report prints the token counts.