hunch (steven-shoemaker)
Python library with a TypeScript port that turns Jev questions into functions over lists and DataFrames, with caching and escalation.
Overview
hunch (published as hunch-jev) makes judgment a Python function. Verbs such as classify, score, check, where, extract, pick, rank and verify run over a string, a list or a pandas column and return answers in the same shape, so code can branch on them. Each verb is built on a Jev primitive: Choice for classify, pick, extract and verify; Score for score and rank; Noul for check, where and multi-label classify. Extra context like a policy or a diff can ride along with every row.
It is aimed at data and application developers who would otherwise write prompt-and-parse code. Duplicate rows are asked once, multiple questions per row go in one request, requests run in parallel, and answers are cached. detail=True returns the full distribution plus a shape label (sure, split, unsure) to decide which rows to trust, re-ask or send to a person. An optional LLM can generate data, propose category names or give second opinions on hard rows, but Jev makes every final call and code owns thresholds.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which theme does this review belong to? | delivery · food quality · pricing · app |
| Yes / no | the customer is angry | yes · no |
| Extract | Extract total (money) and due (date) from this invoice | — |
How it works
- Configure a TypeSafe key (and optionally an LLM and cache)
- Call a verb on a string, list, Series or DataFrame
- hunch deduplicates rows and batches questions per row
- Answers come back aligned to the input with optional distributions
- Route unsure rows to re-asking, an LLM second opinion or a person
Strengths
- Deduplication and caching mean reruns cost nothing
- Shape labels (sure/split/unsure) make abstention easy
- Same verbs in Python and TypeScript
- An agent skill steers coding agents to these verbs instead of ad hoc prompts
Caveats
- Unofficial library; depends on the TypeSafe API
- LLM-backed verbs need a separately configured provider
Getting started
`pip install hunch-jev`, then `hunch.configure(api_key=TYPESAFE_API_KEY)`; agents can add the skill with `npx skills add steven-shoemaker/hunch --skill hunch`.At a glance
- Type
- Library
- Status
- beta
- Language
- Python, TypeScript
- Runtime
- library (pandas-aware)
- Has code
- yes
Use cases and integrations
How curated lists describe it
Python and TypeScript ecosystem: libraries that turn Jev Choice, Score, and Noul questions into functions over lists and DataFrames (classify, score, check, where, extract, pick, rank, verify), with request deduplication, caching, and optional escalation of unsure rows to an LLM that must pick from the same labels; TypeScript port at [hunch-js](https://github.com/steven-shoemaker/hunch-js).
yibie/awesome-jevUnofficial Python library, with a TypeScript port, that turns Choice / Score / Noul into functions over lists and DataFrames (classify, score, check, where, extract, pick, rank, verify), with deduplication, caching, and optional escalation of unsure rows to an LLM that must pick from the same labels
AnotiaWang/awesome-decision-modelsPython library that asks Jev closed-set questions over each item in a list or DataFrame (classify, score, rank, check, where, extract, pick, verify), caches the answers, and joins them back, while code owns candidates, thresholds, and actions; a [TypeScript port](https://github.com/steven-shoemaker/hunch-js) offers the same verbs.
cobanov/awesome-jevPython library, with a TypeScript port, that turns Jev Choice, Score, and Noul questions into functions over lists and DataFrames: classify, score, check, where, extract, pick, rank, verify.
hellogumbo/awesome-jev
Frequently asked questions
What does hunch decide?
Whatever your verb asks per row: a class, a score, a yes/no, an extracted value, or a ranking.
Does it require an LLM?
No. Only generate, discover, refine and escalation use one; Jev makes every decision.
How does it control cost?
It asks each distinct row once, batches questions per row and caches answers.
Related projects
Python and Node library that classifies Hugging Face dataset rows on typed Choice, Score and Noul dimensions using Jev.
ProjectbetaPython, TypeScriptMines timestamped driving scenes from vehicle logs by asking Jev lateral and longitudinal manoeuvre questions per moment.
ProjectbetaPythonPolars library for parallel LLM inference that also asks Jev per-row Noul, Choice and Score questions through a native Rust layer.
LibrarybetaPythonPipeline that ingests Google Maps restaurant reviews and classifies sentiment, five rating pillars and flags with Jev or an LLM.
ServiceprototypeTypeScriptpandas and Polars .jev accessor for classifying, sentiment-scoring and grading DataFrame rows with Jev probabilities.
DemobetaPythonPython library that converts a JSON Schema into Jev questions and returns JSON that validates against the original schema.
ServicebetaPython