Skip to main content

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; pass via register_runtime(extra_adapters=...) 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

  1. Evaluation — batched, efficient sweeps over candidates and tasks; configurable splits, graph rollouts, concurrency, and durable evidence. Bundled reference drivers: GraphRolloutEvalDriver (eval/drivers/graph_rollout.py) — the default, parallel in-process graph rollouts with injected EvalProcedureRunner — and SubprocessGraphRolloutEvalDriver (eval/drivers/subprocess_graph_rollout.py), which runs the same rows on a dr-exec worker pool with per-row and per-batch wall-time budgets.
  2. Evaluation analysis — bootstrap confidence intervals, power analysis, and anchor calibration over persisted evaluation evidence (eval/analysis/).
  3. 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.
  4. Sandbox & interpretation — dry-run previews and toy-graph helpers to step through optimizer behavior before spending full eval budget (whetstone-sandbox).
  5. Codex MCP evalwhetstone-mcp-eval serves 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: Codex optimizer steps, and the subprocess rollout driver's worker pool
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
  • StepContractProvider — each optimizer declares its first-step and continuation contracts and parses its own launch control, registered by adapter key; StepRequestBuilder and HarnessRunController dispatch through it
  • Step evidence — a step reports evaluations it asked the harness to run in resolved_intents, and evaluations its own search drove in search_evidence, each bound to its run and step index and verified by the harness; a terminal step whose contract sets terminal_proposal_count and that accepted no improvement over the run's own initial candidate sets seed_retained
  • Graph rolloutsexperiment/graph/ builds standard two-node graphs; drivers execute them per row

Platform pipeline

The optim pipeline (whetstone.optim.v1) has stages optim_stepeval_roweval_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

whetstone_ai-0.1.2.tar.gz (328.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whetstone_ai-0.1.2-py3-none-any.whl (429.0 kB view details)

Uploaded Python 3

File details

Details for the file whetstone_ai-0.1.2.tar.gz.

File metadata

  • Download URL: whetstone_ai-0.1.2.tar.gz
  • Upload date:
  • Size: 328.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for whetstone_ai-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c2720e891210bb0e2cc1f3fa2f337f2c0410d6f54eb4d7a7ad5da1a4a6fc4490
MD5 8c6ca3f5d9919b2370c9185f37cc9ca1
BLAKE2b-256 624a914112da46469d1301b56ff774a8b656e4d84068eef02d20bf91e4aae20c

See more details on using hashes here.

Provenance

The following attestation bundles were made for whetstone_ai-0.1.2.tar.gz:

Publisher: release.yml on danielle-rothermel/whetstone-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file whetstone_ai-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: whetstone_ai-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 429.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for whetstone_ai-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 be87c2d8e3f08d8b062363e54d824feef9d24f603937f425dd75e7f05b12e223
MD5 a7e11a91c35c5c478026794f793f40c6
BLAKE2b-256 ebf1a4ce1027919073b35d63b5883fdc9f87ac55216e5a64e3ca0f165b6f7d7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for whetstone_ai-0.1.2-py3-none-any.whl:

Publisher: release.yml on danielle-rothermel/whetstone-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page