Turn LLM failure hypotheses into minimum discriminating regression benchmarks.
Project description
Hypothesize
Turn informal LLM failure hypotheses into minimum discriminating regression benchmarks.
A stakeholder complains. An engineer wants to verify the complaint and produce a targeted regression test in under a few minutes and a few dollars of tokens. Hypothesize is built for that loop: it generates the minimum set of inputs that discriminate between a current system and a plausibly-better alternative, given a stated hypothesis. Tests have a stated reason for existing — the hypothesis they prove.
Status: 0.1.0 (early development). See .spec/ for the current plan.
Install
The PyPI distribution name is hypothesize-cli; the import name and
console script are hypothesize.
With pip:
pip install hypothesize-cli
hypothesize setup
With uvx (no permanent install):
uvx --from hypothesize-cli hypothesize setup
If you don't have uv yet: pip install uv.
The setup wizard will:
- Configure your Anthropic API key (written to
~/.config/hypothesize/.envwith mode0600) - Install the Claude Code skill if
claudeis on your PATH - Register the MCP server with Claude Desktop if its config directory is present
You can skip any step. Re-run hypothesize setup anytime to reconfigure.
For CI use:
hypothesize setup \
--non-interactive \
--api-key sk-ant-... \
--skip-claude-code \
--skip-claude-desktop
Quickstart
After setup, try the bundled sarcasm example:
hypothesize run \
--config examples/sarcasm/config.yaml \
--hypothesis "the sentiment classifier mislabels sarcastic positive text"
About 60-90 seconds and ~$0.10-$0.20 in Haiku tokens later, a YAML
file appears in tests/discriminating/. Each entry is an input the
baseline classifier got wrong and the rewritten alternative got right.
hypothesize list .
hypothesize validate tests/discriminating/<your_file>.yaml
For more detail, read examples/sarcasm/README.md. The same flow
works on your own system once you write a config.yaml pointing at
it.
In Claude Code, just paste a complaint:
My classifier is mislabeling sarcastic reviews as positive.
The hypothesize skill will discover your system, run the discrimination, and write the regression suite to your repo.
Surfaces
- CLI:
hypothesize runis the primary command.hypothesize setupconfigures your environment.hypothesize listandhypothesize validatebrowse and check existing benchmarks. - Claude Code skill: bundled with the package and installable via
hypothesize setup. Teaches Claude Code to orchestrate the workflow when a developer pastes a complaint. - MCP server:
python -m hypothesize.mcp.serverexposes hypothesize's primitives as MCP tools (discover_systems, list_benchmarks, read_benchmark, formulate_hypothesis, run_discrimination).hypothesize setupregisters it with Claude Desktop.
Examples
examples/sarcasm/— full demo. Sentiment classifier with a deliberately weak baseline prompt, sarcasm hypothesis, auto-rewritten alternative.examples/hotpotqa/— multi-hop QA over a curated 50-item slice.examples/acme_support/— emoji-policy filter on a support chatbot (programmatic judge).
Development
Editable install (for contributors):
git clone https://github.com/gkuwanto/hypothesize
cd hypothesize
pip install -e ".[dev]"
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
Test commands:
pytest tests/ -n auto -m "not live"— full non-live suite (~3s).pytest --cov=src/hypothesize— coverage.ruff check src/ tests/— lint.pytest -m live— opt-in live integration tests; requireANTHROPIC_API_KEY.
License
MIT
Project details
Release history Release notifications | RSS feed
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 hypothesize_cli-0.1.0.tar.gz.
File metadata
- Download URL: hypothesize_cli-0.1.0.tar.gz
- Upload date:
- Size: 49.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39275bd25a63a732d27d40f741ae242040f025ffe1433e4d6ec40df7ff5d9551
|
|
| MD5 |
ec444d121370e385b1f0599b1ba995c1
|
|
| BLAKE2b-256 |
d6485a5bd5bbb1427e0d6c1a3012ed0d408c63a99aa0362bd54b07f233c0f224
|
File details
Details for the file hypothesize_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hypothesize_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 63.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f92e625581dca267766ff4f50d4807e63433908b9b58d34631d6bb548db7eb1
|
|
| MD5 |
720d3ed0e7322a29d6ac79dc12d7c455
|
|
| BLAKE2b-256 |
a5973754ccfbc60808ed9e34ed2f95a3a65f41a42cdc3cf95346bce2ec75f2b5
|