Jev — TypeSafe's Decision Model Guide
Jev is a System One decision model: send typed state and questions, get probabilities instead of prose. Setup, prompt engineering, patterns, and integrations.
Jev — TypeSafe's Decision Model
Jev, from TypeSafe AI, is a decision model rather than a chat model. You send it a state — text or a JSON object — and a set of typed questions. It returns one answer per question with probabilities. No generated prose, no output parsing, no retries for malformed JSON. The docs call it "a smart if statement," and in practice it sits inside ordinary application code where you would otherwise call an LLM to make a bounded judgment.
That distinction is the whole reason to learn it. An LLM generates; Jev decides. Everything in this section follows from keeping those two jobs separate.
Where Jev Fits
An if statement branches on things a computer can check exactly. Jev handles the conditions that require judgment but still have a small, nameable set of answers:
- Is this support message angry, and does it request a refund?
- Which of these five tools should the agent call next?
- Is this diff safe to ship, or does it touch authentication?
- Which model should handle this request?
Today you answer those with a prompt to an LLM. Jev removes the generation step: the answer is a probability, a chosen option, or a score on a scale you defined. Input costs $0.042 per million tokens, and output is billed free.
How It Compares to an LLM Call
| LLM call | Jev call | |
|---|---|---|
| Returns | Free text or JSON | Typed answer + probability per question |
| Answer space | Open-ended | The options you define (Choice) or a scale (Score) |
| Latency | Seconds | Tens to hundreds of milliseconds |
| Cost | Per input and output token | Input only, $0.042/M |
| Reasoning | Multi-step, explainable | One judgment per question, no explanation |
| Failure mode | Malformed output, hallucination | A well-formed but wrong answer |
The last row matters most. Jev guarantees a schema-valid answer; it does not guarantee a correct one. Design your system so a wrong answer is caught by a confidence band or a cheap downstream check, and never auto-execute a destructive action on a returned choice alone.
What Makes It Different
- Three primitives, no prompt template. A Noul is a true/false probability. A Choice picks one option from a list you define (up to 255). A Score places the input on a 2–10 level scale you describe.
- Every question in a call runs in parallel. Ask everything you might need in one request; extra questions cost only their tokens and barely change latency.
- Question IDs are invisible to the model. Naming a field
safe_to_publishcontributes nothing. The requirement must live in theinstructionsandcriteriayou write. - Confidence is distribution shape, not accuracy. A concentrated answer scores high confidence; a split one scores low. It tells you when to act, ask, or escalate — not how often the model is right.
Section Contents
- Getting Started — install the SDK, make a first call, and understand the three primitives.
- Prompt Engineering — how to write questions and criteria that hold up, and what Jev does badly.
- Use Cases — where decision models beat generation, and where they do not.
- Confidence Gating — the three-band pattern for automating the obvious and escalating the rest.
- Model Routing — route each request to the cheapest model that can handle it.
- Skill Routing — pick the right skill or rule before the main model runs.
- Context Compaction — score which tool results are still worth keeping.
- Integrations — SDKs, LangChain middleware, the Vercel AI SDK, and MCP.
Frequently Asked Questions
Related Resources
- TypeSafe's Jev: The Decision Model Everyone Is Talking About — the launch story, the team, and what the hype claims actually mean
- Model Routing — the broader pattern of picking the cheapest capable model
- Agentic Guardrails — where decision gating fits in an agent's safety layer
- Context Compression — the summarization-based approach Jev-based scoring competes with
- Tool Comparison — how the coding harnesses in this section compare
Related Articles & Guides
Jev Getting Started — Install, First Call & Limits
Install the TypeSafe SDK, make your first Jev decision with Noul, Choice, and Score, and learn the model aliases, size limits, and error codes.
Jev Integrations — SDKs, LangChain, Vercel & MCP
Wire Jev into your stack: official SDKs, raw HTTP, LangChain middleware, the Vercel AI SDK evaluation path, gateways, and MCP servers.
Jev Prompt Engineering — Questions, Criteria & State
How to write Jev questions and criteria that hold up: one judgment per question, situation-based criteria, clean state, parallelism, and the model's known failures.