Repository navigation
Add a corpus run that asks the model and grades its answers - #2
Merged
Merged
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, and fixes two checks that failed correct Turkmen.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.--jobs). Answers and a report (report.md,report.json) go tocorpus-results/, and the report also goes to the job summary.--print-failedprints the text of each failed answer to the log.--answers DIRgrades saved answers without the API,--dry-runshows what would be sent,--case a,bruns only some cases..github/workflows/corpus.ymlruns it by hand only (Actions > Corpus run > Run workflow, with variant, number of runs and cases as inputs), because one full run costs about 8 USD. It uses theANTHROPIC_API_KEYsecret.AGENTS.mdexplains when to run it.Grader fixes
must_keep, a count from 2 to 9 may be written in digits or in words, with or withoutsany:üç täze seýilgähnow also accepts3 täze seýilgähand3 sany täze seýilgäh.re:is a regular expression. Theiçinentries of seven cases are nowre:\bi[cç]in\b, so the Turkishiçinis still caught but the Turkmeniçindeis not.First run
Run on this branch before the grader fixes: 6 of 11 cases pass, in about 10 minutes. Tokens: 87,732 input, 1,478,433 cache read, 384,724 output, about 8.3 USD, almost all of it output.
Failures that look real, for a follow-up change to the skill:
kompýuteri oturdyldyin all three kitaphana-habary answers,**bold in the hunar-gollanma guide, lost numbers in the terjime-mary translation.Checks
npm test: 64 tests pass (55 before).python3 scripts/validate-package.py: valid.