whetstone-ai
Generic toolkit for evaluating and optimizing LLM prompts and programs.
Whetstone sits above the dr-* libraries (graphs, providers, store, serialize, exec, platform) and below domain-specific environments. It owns the reusable experiment contract, batched evaluation engine, optimizer harness, and evidence/analysis plumbing — not task datasets, domain scoring rules, or application UI.
In scope here: evaluation at scale, a shared optimization harness, and stepping through runs to inspect behavior. Optimizers are not co-equal:
| Optimizer | Harness adapter | Platform pipeline | Sandbox |
|---|---|---|---|
| COPRO | Live; the only adapter register_runtime wires |
Wired (submit_optim_run, inline and PLATFORM deferral) |
whetstone-sandbox copro |
| GEPA | Live harness adapter + step engine; not in the default runtime | Not registered | whetstone-sandbox gepa |
| MIPROv2 | Adapter/control exist | Not on the pipeline | whetstone-sandbox miprov2 (plan preview only) |
Out of scope here: particular benchmarks or envs (those live in separate packages or repos), one-off experiment scripts, and product-facing runners.
Core capabilities
- Evaluation — batched, efficient sweeps over candidates and tasks;
configurable splits, graph rollouts, concurrency, and durable evidence.
Bundled reference driver:
GraphRolloutEvalDriver(eval/drivers/graph_rollout.py) — parallel in-process graph rollouts with injectedEvalProcedureRunner. - Evaluation analysis — bootstrap confidence intervals, power analysis, and
anchor calibration over persisted evaluation evidence (
eval/analysis/). - Optimization — shared harness and adapters that propose candidates and drive evaluation intents in a loop. COPRO is the platform-wired optimizer; GEPA and MIPROv2 exist as adapters (GEPA also has a step engine) but are not registered in the default runtime.
- Sandbox & interpretation — dry-run previews and toy-graph helpers to step
through optimizer behavior before spending full eval budget
(
whetstone-sandbox). - Codex MCP eval —
whetstone-mcp-evalserves the Codex evaluate-candidate tool over stdio.
Evaluation → Evaluation analysis
↓
Optimization → Sandbox / interpretation
dr-* libraries
| Package | Role in whetstone |
|---|---|
| dr-graph | Rollout graphs: LLM-call → eval nodes, executed per task row |
| dr-providers | Provider call configs, transport, and invocation evidence |
| dr-store | Content-addressed persistence for candidates, evidence, and step records |
| dr-serialize | Strict JSON and canonical identity hashing |
| dr-exec | Budgeted subprocess execution (e.g. Codex optimizer steps) |
| dr-platform | Durable pipeline stages, deferral/fan-in, and run submission (platform extra) |
Stable seams
- Experiment — generation graph, initial/ceiling candidates, eval configs, reward policy
- EvaluationEngine — validates and evaluates a candidate; returns typed evidence refs
- OptimizerAdapter — COPRO plugs into the shared harness on the default runtime; GEPA and MIPROv2 adapters exist but are not platform-wired
- Graph rollouts —
experiment/graph/builds standard two-node graphs; drivers execute them per row
Platform pipeline
The optim pipeline (whetstone.optim.v1) has stages optim_step → eval_row
→ eval_fanin, plus run_completion. EvalDispatchMode.INLINE evaluates
inside the step. EvalDispatchMode.PLATFORM persists eval intents, fans out
row jobs, fans results back in, then resumes the step. Submit a run with
submit_optim_run.
whetstone-optim run is a stub until step 5; it echoes the control ref and
exits 2.
Sandbox
uv run whetstone-sandbox copro --task-prompt "Say hello"
uv run whetstone-sandbox graph --run
Requires Python 3.13+. Optional extras: dbos, postgres, platform.
Platform integration tests
Tier 2 tests exercise the dr-platform harness against Postgres + DBOS:
uv sync --extra platform
createdb whetstone_platform_test # once, if needed
uv run pytest -m integration tests/integration/
Set WHETSTONE_TEST_DATABASE_URL when not using the default
postgresql+psycopg:///whetstone_platform_test. Locally, tests skip when
Postgres is unavailable; in CI they fail hard. Default uv run pytest excludes
integration tests via the pytest marker.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whetstone_ai-0.1.1.tar.gz.
File metadata
- Download URL: whetstone_ai-0.1.1.tar.gz
- Upload date:
- Size: 327.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1780c9fd38ba0a24c72b7b7681f822e028b32ea1f03e947bbce153ad8056877e
|
|
| MD5 |
c9507d899ec7f62161075c83866b25fd
|
|
| BLAKE2b-256 |
e71d041f28c433826b133fee9bfb9b746b310c4801d329356c25f1f4bd299c08
|
Provenance
The following attestation bundles were made for whetstone_ai-0.1.1.tar.gz:
Publisher:
release.yml on danielle-rothermel/whetstone-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whetstone_ai-0.1.1.tar.gz -
Subject digest:
1780c9fd38ba0a24c72b7b7681f822e028b32ea1f03e947bbce153ad8056877e - Sigstore transparency entry: 2551820807
- Sigstore integration time:
-
Permalink:
danielle-rothermel/whetstone-ai@286081f58255cdf30292530ab08e4b4cdd0b9bb2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/danielle-rothermel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@286081f58255cdf30292530ab08e4b4cdd0b9bb2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whetstone_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: whetstone_ai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 431.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2f098c6613451caf4b0d0ea581e64c23d5fd3cfadeac436bdbb79e5ff396ea5
|
|
| MD5 |
fd41b851c2dd1bc273f0f0480c01fb1b
|
|
| BLAKE2b-256 |
b5846c45386ba3d09e69287c3f69e9446ded87a19d7c9e378f7eafb27434b772
|
Provenance
The following attestation bundles were made for whetstone_ai-0.1.1-py3-none-any.whl:
Publisher:
release.yml on danielle-rothermel/whetstone-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whetstone_ai-0.1.1-py3-none-any.whl -
Subject digest:
e2f098c6613451caf4b0d0ea581e64c23d5fd3cfadeac436bdbb79e5ff396ea5 - Sigstore transparency entry: 2551820828
- Sigstore integration time:
-
Permalink:
danielle-rothermel/whetstone-ai@286081f58255cdf30292530ab08e4b4cdd0b9bb2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/danielle-rothermel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@286081f58255cdf30292530ab08e4b4cdd0b9bb2 -
Trigger Event:
push
-
Statement type: