jev-bisect
Python library that finds numeric answers by bisection, asking Jev higher, lower or exactly at each guess.
Overview
jev-bisect turns Jev into a bisection oracle for numeric questions. Instead of asking a model to guess a number, you supply a question and bounds, and the library computes guesses while Jev answers a Choice of higher, lower or exactly at each step; a result is returned only when Jev selects exactly. The result includes the answer, number of turns, final state and a history recording each state, choice, confidence, probabilities and model version.
A SearchConfig sets precision (the search increment, for example 1 for whole numbers or 0.01 for hundredths) and a maximum of up to 20 turns. Candidates are multiples of the precision from zero, and Jev is instructed to round to the nearest multiple before comparing. SDK retries are disabled for these calls. It uses the official TypeSafe Python SDK, requires Python 3.10+, is published on PyPI, and is MIT licensed.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Is the true answer higher than, lower than, or exactly this guess? | higher · lower · exactly |
How it works
- Call bisect with a question, min and max
- Library guesses the midpoint (or a supplied first guess)
- Jev answers higher, lower or exactly
- Narrow the range and repeat until exactly or max turns
Strengths
- Turns numeric estimation into simple comparisons Jev can make
- Full history with probabilities per turn
- Configurable precision and turn budget
Caveats
- Each turn is an API call
- Relies on Jev's comparison accuracy; numeric reasoning is a known weak spot
Getting started
`pip install jev-bisect`, set TYPESAFE_API_KEY, then `bisect("How many slices in a pizza?", min=0, max=100)`.At a glance
- Type
- Project
- Status
- beta
- Language
- Python
- Runtime
- library
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Numeric search: turns Jev into a bisection oracle, halving a range with typed yes/no answers to home in on a number instead of asking a model to guess it.
yibie/awesome-jev
Frequently asked questions
What does Jev decide?
Whether the true value is higher, lower or exactly the current guess.
How many calls does it make?
One per guess, up to max_turns (default 20).
Can it find decimals?
Yes, set precision, e.g. 0.01 for hundredths.
Related projects
Swift package for typed decisions (probability, choice, score) over local MLX or Core AI models, Clef decision heads, or the Jev API.
LibrarybetaSwiftPython wrapper that answers System One and OpenAI Decisions API questions using any OpenAI-compatible chat model.
LibrarybetaPython- OpenJev★ 2
Run System One-style typed decisions on any Hugging Face instruct model, with a typesafe-sdk-compatible server and calibration tools.
LibraryprototypePython TypeScript SDK and coding CLI where Jev only picks options: typed routers, decision programs and grammar-constrained AST building.
CLIprototypeTypeScriptpijev: drop-in wrapper for the TypeSafe Python SDK that averages Jev answers across option orders in one request.
LibrarybetaPythonHack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.
MCP serverproductionTypeScript