Add verify and decontaminate commands to cut wasted credits - #1
Merged
Conversation
For checkable domains the most common way to burn credits is adapting rows that were wrong to begin with, or reporting an improvement_percent inflated by benchmark overlap. Two new commands address both before any credits are spent: - verify: keep a row only if it actually checks out locally. Math answers are compared for equivalence (normalized string, then numeric, then symbolic via optional sympy) against a gold column; code solutions run against their unit tests in a sandboxed subprocess and are kept only if every test passes. --out writes just the verified rows. - decontaminate: drop any training row overlapping a benchmark test set by an n-gram (default 13) so the reported number is defensible. Wired into the CLI (lint -> verify -> decontaminate -> estimate -> pilot), documented in README, guides, diagrams, with a math/code walkthrough and an optional [verify] extra for sympy. 19 new tests; full suite 35 passing, ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.
Why
For checkable domains, the two most common ways beginners burn credits on multiple tries are: adapting rows that were wrong to begin with, and reporting an
improvement_percentthat is inflated by benchmark overlap. The kit already lints for dedup-collapse and estimates-before-spend; this adds the two missing pre-spend filters.What
adaption-kit verify <file> --kind math|code— keeps a row only if it actually checks out, locally and for free:sympy).--outwrites just the verified rows, so you upload only correct data.adaption-kit decontaminate <file> --against BENCH...— removes any training row overlapping a benchmark test set by an n-gram (default 13), so the reported number is defensible.Flow
Wired into the credit-safe path:
lint → verify → decontaminate → estimate → pilot. Both router and credit-safe-run diagrams updated to match.Docs & tests
guides/gotchas.md(+1),CHANGELOG.md,examples/math_code_walkthrough.md, and an optional[verify]extra inpyproject.tomlforsympy.test_verify.py,test_decontaminate.py); full suite 35 passing, ruff clean. Math tests pass with or withoutsympyinstalled.Community, unofficial; nothing here is official Adaption support.