Skip to content

Add verify and decontaminate commands to cut wasted credits - #1

Merged
A1VARA5 merged 1 commit into
mainfrom
feat/verify-and-decontaminate
Jun 24, 2026
Merged

Add verify and decontaminate commands to cut wasted credits#1
A1VARA5 merged 1 commit into
mainfrom
feat/verify-and-decontaminate

Conversation

@A1VARA5

@A1VARA5 A1VARA5 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

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_percent that 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:
    • math: the final answer is compared for equivalence to a gold column (normalized string → numeric → symbolic via optional sympy).
    • code: the solution runs against its unit tests in a sandboxed subprocess (hard timeout, hidden window) and is kept only if every test passes.
    • --out writes 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

  • README features + repo map, guides/gotchas.md (+1), CHANGELOG.md, examples/math_code_walkthrough.md, and an optional [verify] extra in pyproject.toml for sympy.
  • 19 new tests (test_verify.py, test_decontaminate.py); full suite 35 passing, ruff clean. Math tests pass with or without sympy installed.

Community, unofficial; nothing here is official Adaption support.

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]>
@A1VARA5
A1VARA5 merged commit 7267b08 into main Jun 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant