Skip to main content
One Enron email proposes comments on a regulator’s draft rule. Another reports that a rate relief bill passed. Both concern public policy. Which belongs in a review of lobbying efforts? The quickstart lets you ask a model, then check its answers against published judgments. The harder job is applying that distinction to thousands more emails, then changing the question without losing track of what moved. A probability for one answer cannot tell you the rule’s error rate. Reviewed cases and a record of what changed can. A person considers a checked card, a question card and a decision still to make

Why not call Jev directly?

For a one-off question, call Jev directly. Jev already gives you typed answers, probabilities and several questions in one call. hunch is useful when the answer becomes part of a workflow you need to run again, measure, review and change safely. You usually do not need hunch for a single request-path call with no reviewed data, no reruns and no plan to compare changes. The direct API is simpler there.

If you know dbt

dbt keeps SQL transformations in versioned models with tests. A hunch spec is the versioned judgment definition. hunch run applies it, hunch test measures it, and hunch diff compares an edit before you adopt it. You can also call the same spec from an app or DuckDB query.

Where decisions live

The same shape, a question, a typed answer, a bar for acting and a person for the rest, turns up across a whole company: The same workflow can serve each case: define the answer, inspect the evidence, and decide what may happen without a person.

Worked examples

Each cookbook starts with a real dataset, shows the question and its results, and explains how those results were measured.

A guard for an agent's shell commands

Over 1,315 real commands, it stopped 153 for a person to check, about 1 in 9. In a random sample of the commands it let run, 1 in 91 should have been stopped.

Agents say they fixed it

An agent claimed a fix in 160 of 200 runs; 66 of those failed the tests. Of the 55 patches the model gave under a 20% chance, 52 failed.

Did that turn work?

The developer’s next message says whether a coding agent’s turn worked. Read by a model, it was right about 9 times in 10, and diff caught a “clearer” wording that did worse.

100,000 reviews in one run

96,000 new requests cost $1.55; 4,000 answers were already cached. A fully cached re-run took 4.1 seconds and cost nothing.

How it works

Write a spec, run it on rows, review a sample, and test the answers. Before changing the spec, use diff to see which rows would change. Concepts shows the decision and review paths. Here is the first Enron quickstart spec. It reads emails and asks one yes/no question, without an action threshold yet:
lobbying.yml
hunch run asks the question for each email and stores each answer under its exact input. hunch test compares the answers with reviewed labels and reports the mistakes. Then you can edit the wording and use hunch diff to see which emails would change before the new wording ships. Inside your app, hunch.judge() answers one row at a time from the same spec and store. A Pydantic AI agent on a decision model can be recorded and tested on past rows. hunch docs makes a project report for whoever signs off on the policy.

Quickstart

Start with Enron emails, run a small lobbying judgment, test it and inspect what a wording change would flip.