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.

September 20, 2026
jevtypesafetype-safe-aidecision-modelsai-agentsmodel-routing

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 callJev call
ReturnsFree text or JSONTyped answer + probability per question
Answer spaceOpen-endedThe options you define (Choice) or a scale (Score)
LatencySecondsTens to hundreds of milliseconds
CostPer input and output tokenInput only, $0.042/M
ReasoningMulti-step, explainableOne judgment per question, no explanation
Failure modeMalformed output, hallucinationA 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_publish contributes nothing. The requirement must live in the instructions and criteria you 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